File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 115
115
116
116
set -ex
117
117
118
- echo " rollback to the default admin config"
118
+ echo " passed: rollback to the default admin config"
Original file line number Diff line number Diff line change @@ -781,6 +781,17 @@ local function init_etcd(show_output)
781
781
782
782
local host_count = # (yaml_conf .etcd .host )
783
783
784
+ -- check whether the user has enabled etcd v2 protocol
785
+ for index , host in ipairs (yaml_conf .etcd .host ) do
786
+ uri = host .. " /v2/keys"
787
+ local cmd = " curl -i -m " .. timeout * 2 .. " -o /dev/null -s -w %{http_code} " .. uri
788
+ local res = excute_cmd (cmd )
789
+ if res == " 404" then
790
+ io.stderr :write (string.format (" failed: please make sure that you have enabled the v2 protocol of etcd on %s.\n " , host ))
791
+ return
792
+ end
793
+ end
794
+
784
795
local etcd_ok = false
785
796
for index , host in ipairs (yaml_conf .etcd .host ) do
786
797
You can’t perform that action at this time.
0 commit comments