Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple etcd support. #1283

Merged
merged 5 commits into from
Mar 19, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix for review comments.
  • Loading branch information
Akayeshmantha committed Mar 18, 2020
commit 11288e0d2ffaf88627673b43996d2103ee2a51dc
4 changes: 2 additions & 2 deletions bin/apisix
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ local function init_etcd(show_output)

local timeout = etcd_conf.timeout or 3
local uri
local hostCount = table.getn(yaml_conf.etcd.host)
local host_count = #(yaml_conf.etcd.host)
Akayeshmantha marked this conversation as resolved.
Show resolved Hide resolved
Akayeshmantha marked this conversation as resolved.
Show resolved Hide resolved

for index, host in ipairs(yaml_conf.etcd.host) do

Expand All @@ -728,7 +728,7 @@ local function init_etcd(show_output)
local res = exec(cmd)
if not res:find("index", 1, true)
and not res:find("createdIndex", 1, true) then
is_success = false;
is_success = false
if (index == hostCount) then
error(cmd .. "\n" .. res)
end
Expand Down