Yiyiyimu commented on a change in pull request #2036: URL: https://github.com/apache/apisix/pull/2036#discussion_r479714677
########## File path: bin/apisix ########## @@ -870,35 +870,21 @@ 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 - io.stderr:write(string.format("failed: please make sure that you have enabled the v2 protocol of etcd on %s.\n", host)) - return - end - end - local etcd_ok = false for index, host in ipairs(yaml_conf.etcd.host) do local is_success = true - uri = host .. "/v2/keys" .. (etcd_conf.prefix or "") for _, dir_name in ipairs({"/routes", "/upstreams", "/services", Review comment: I noticed users could still set up multiple addresses for the etcd cluster, so maybe we need to keep the loop? https://github.com/apache/apisix/blob/c54aec8f6cec2bd31c7c8717bf5220327584be03/conf/config-default.yaml#L133-L135 ---------------------------------------------------------------- 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: us...@infra.apache.org