You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/06/08 03:28:50 UTC

[GitHub] [incubator-apisix] dabue commented on a change in pull request #1665: [bugfix(CLI)]: check whether the user has enabled etcd v2 protocol.

dabue commented on a change in pull request #1665:
URL: https://github.com/apache/incubator-apisix/pull/1665#discussion_r436441118



##########
File path: bin/apisix
##########
@@ -781,6 +781,17 @@ local function init_etcd(show_output)
 
     local host_count = #(yaml_conf.etcd.host)
 
+    -- check whether the user has enabled etcd v2 protocol
+    for index, host in ipairs(yaml_conf.etcd.host) do
+        uri = host .. "/v2/keys"
+        local cmd = "curl -i -m ".. timeout * 2 .. " -o /dev/null -s -w %{http_code} " .. uri
+        local res = excute_cmd(cmd)
+        if res == "404" then
+            print("failed: Please make sure that you have enabled the v2 protocol of etcd on " .. host)

Review comment:
       have updated it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org