Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis/apisix_cli_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ fi

set -ex

echo "rollback to the default admin config"
echo "passed: rollback to the default admin config"
11 changes: 11 additions & 0 deletions bin/apisix
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

Expand Down