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/03/15 11:52:07 UTC
[GitHub] [incubator-apisix] Akayeshmantha opened a new pull request #1275:
Add multiple etcd address support.
Akayeshmantha opened a new pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275
Add multiple etcd address support
### Issues resolved
Fix #1231
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha commented on issue #1275: Add
multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599270894
Hi @membphis
Most of the test cases fails with the below log
`" should not match any line in error.log but matches line "2020/03/15 22:47:57 [error] 17269#17269: *169 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/ssl?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/ssl, context: ngx.timer" (req 0)
# 2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:205: waitdir key: /apisix/global_rules prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/global_rules, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:205: waitdir key: /apisix/services prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/services, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *175 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/proto?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# '
# at /home/ayesh/Documents/API_ASPIX/incubator-apisix/../test-nginx/lib/Test/Nginx/Socket.pm line 1280.
# Failed test 'TEST 9: invalid route: wrong count - pattern "[error]" should not match any line in error.log but matches line "2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer" (req 0)
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:205: waitdir key: /apisix/global_rules prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/global_rules, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:205: waitdir key: /apisix/services prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/services, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *175 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/proto?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *175 [lua] config_etcd.lua:205: waitdir key: /apisix/proto prev_index: 10100, context: ngx.timer
# '
# at /home/ayesh/Documents/API_ASPIX/incubator-apisix/../test-nginx/lib/Test/Nginx/Socket.pm line 1280.
`
Hm I have no clue is it because now we are defining set of etcd hosts it can't find a leader ?
Some help here would be great
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request
#1275: Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#discussion_r393567710
##########
File path: bin/apisix
##########
@@ -661,28 +661,32 @@ local function init_etcd(show_output)
end
local etcd_conf = yaml_conf.etcd
- local uri = etcd_conf.host .. "/v2/keys" .. (etcd_conf.prefix or "")
-
local timeout = etcd_conf.timeout or 3
+ local uri
+
+ for _, host in ipairs(yaml_conf.etcd.host) do
Review comment:
that is the fake code, please take a view.
```lua
-- fake code
for i, host in ipairs(yaml_conf.etcd.host) do
local is_success = true
for _, dir_name in ipairs({"/routes", "/upstreams", ...}) do
local ok = ...
if not ok then
is_success = false
break
end
end
if is_success then
break
end
end
```
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha commented on a change in pull
request #1275: Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on a change in pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#discussion_r393509403
##########
File path: bin/apisix
##########
@@ -661,28 +661,32 @@ local function init_etcd(show_output)
end
local etcd_conf = yaml_conf.etcd
- local uri = etcd_conf.host .. "/v2/keys" .. (etcd_conf.prefix or "")
-
local timeout = etcd_conf.timeout or 3
+ local uri
+
+ for _, host in ipairs(yaml_conf.etcd.host) do
Review comment:
sure fixed
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha edited a comment on issue #1275:
Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha edited a comment on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599270894
Hi @membphis
Most of the test cases fails with the below log
` should not match any line in error.log but matches line "2020/03/15 22:47:57 [error] 17269#17269: *169 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/ssl?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/ssl, context: ngx.timer" (req 0)
# 2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:205: waitdir key: /apisix/global_rules prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/global_rules, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:205: waitdir key: /apisix/services prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/services, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *175 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/proto?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# '
# at /home/ayesh/Documents/API_ASPIX/incubator-apisix/../test-nginx/lib/Test/Nginx/Socket.pm line 1280.
# Failed test 'TEST 9: invalid route: wrong count - pattern "[error]" should not match any line in error.log but matches line "2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer" (req 0)
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:205: waitdir key: /apisix/global_rules prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/global_rules, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:205: waitdir key: /apisix/services prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/services, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *175 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/proto?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *175 [lua] config_etcd.lua:205: waitdir key: /apisix/proto prev_index: 10100, context: ngx.timer
# '
# at /home/ayesh/Documents/API_ASPIX/incubator-apisix/../test-nginx/lib/Test/Nginx/Socket.pm line 1280.
`
Hm I have no clue is it because now we are defining set of etcd hosts it can't find a leader ?
Some help here would be great
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1275: Add multiple
etcd address support.
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599294660
I updated the resty-etcd right now. Please rebase your branch with APISIX master branch.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha commented on a change in pull
request #1275: Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on a change in pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#discussion_r393509300
##########
File path: conf/config.yaml
##########
@@ -98,7 +98,10 @@ nginx_config: # config for render the template to genarate n
- 'unix:'
etcd:
- host: "http://127.0.0.1:2379" # etcd address
+ host:
+ - "http://127.0.0.1:2379" # multiple etcd address
Review comment:
Sure fixed
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha opened a new pull request #1275:
Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha opened a new pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275
Add multiple etcd address support
### Issues resolved
Fix #1231
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha commented on a change in pull
request #1275: Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on a change in pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#discussion_r392856281
##########
File path: conf/config.yaml
##########
@@ -98,7 +98,10 @@ nginx_config: # config for render the template to genarate n
- 'unix:'
etcd:
- host: "http://127.0.0.1:2379" # etcd address
+ host:
+ - "http://127.0.0.1:2379" # multiple etcd address
Review comment:
oh sure and multiple http_hosts. I got it wrong
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1275: Add multiple
etcd address support.
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599811028
you can use `git rebase ...`, it is simpler than creating a new issue.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha commented on a change in pull
request #1275: Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on a change in pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#discussion_r392856281
##########
File path: conf/config.yaml
##########
@@ -98,7 +98,10 @@ nginx_config: # config for render the template to genarate n
- 'unix:'
etcd:
- host: "http://127.0.0.1:2379" # etcd address
+ host:
+ - "http://127.0.0.1:2379" # multiple etcd address
Review comment:
oh sure and multiple http_hosts. I got it wrong
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1275: Add multiple
etcd address support.
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599986034

----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha commented on issue #1275: Add
multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599210432
@membphis
test cases fails in https://github.com/apache/incubator-apisix/blob/master/lua/apisix/core/config_etcd.lua#L350
How the etcd db loaded for the travis encironemnt is it a mock one or a real etcd db running ?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha closed pull request #1275: Add
multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha closed pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1275: Add multiple
etcd address support.
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599210892
> is it a mock one or a real etcd db running ?
It is a real etcd, the same as your local ENV.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha commented on issue #1275: Add
multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599939582
@membphis done opened the previous PR.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha edited a comment on issue #1275:
Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha edited a comment on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599270894
Hi @membphis
Most of the test cases fails with the below log
should not match any line in error.log but matches line "2020/03/15 22:47:57 [error] 17269#17269: *169 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/ssl?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/ssl, context: ngx.timer" (req 0)
# 2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:205: waitdir key: /apisix/global_rules prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/global_rules, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:205: waitdir key: /apisix/services prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/services, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *175 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/proto?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# '
# at /home/ayesh/Documents/API_ASPIX/incubator-apisix/../test-nginx/lib/Test/Nginx/Socket.pm line 1280.
# Failed test 'TEST 9: invalid route: wrong count - pattern "[error]" should not match any line in error.log but matches line "2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer" (req 0)
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:205: waitdir key: /apisix/global_rules prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *171 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *171 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/global_rules?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/global_rules, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:205: waitdir key: /apisix/services prev_index: 10100, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *173 [lua] config_etcd.lua:206: res: null, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *173 [lua] config_etcd.lua:350: failed to fetch data from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/services?waitIndex=10100&wait=true&recursive=true err:timeout, etcd key: /apisix/services, context: ngx.timer
# 2020/03/15 22:47:57 [error] 17269#17269: *175 [lua] config_etcd.lua:77: waitdir(): failed to get key from etcd: fail request to: http://127.0.0.1:2379/v2/keys/apisix/proto?waitIndex=10100&wait=true&recursive=true err:timeout, context: ngx.timer
# 2020/03/15 22:47:57 [info] 17269#17269: *175 [lua] config_etcd.lua:205: waitdir key: /apisix/proto prev_index: 10100, context: ngx.timer
# '
# at /home/ayesh/Documents/API_ASPIX/incubator-apisix/../test-nginx/lib/Test/Nginx/Socket.pm line 1280.
Hm I have no clue is it because now we are defining set of etcd hosts it can't find a leader ?
Some help here would be great
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha edited a comment on issue #1275:
Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha edited a comment on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599270894
Hi @membphis
Most of the test cases fails with the below log
https://pastebin.com/KbBD6h5s
Hm I have no clue is it because now we are defining set of etcd hosts it can't elect a leader ?
Some help here would be great
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request
#1275: Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#discussion_r392738555
##########
File path: bin/apisix
##########
@@ -661,28 +661,32 @@ local function init_etcd(show_output)
end
local etcd_conf = yaml_conf.etcd
- local uri = etcd_conf.host .. "/v2/keys" .. (etcd_conf.prefix or "")
-
local timeout = etcd_conf.timeout or 3
+ local uri
+
+ for _, host in ipairs(yaml_conf.etcd.host) do
Review comment:
this is wrong.
If the user specifies multiple etcd addresses, these etcd instances should belong to one cluster.
When we need to initialize etcd, as long as one of them is successfully initialized, it is considered successful.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha commented on issue #1275: Add
multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599989794
@membphis but it won't affect the code base know ?. Shall I go on with the other PR. Since it will take more time to redo this I think it's easy to move forward with the other one
wdyt?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha commented on issue #1275: Add
multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599919293
@membphis sure I will do so
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha commented on issue #1275: Add
multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-600014325
Hi @membphis am not quite sure how to fix this I tried in few ways but it has so many conflicts will close this PR and work on the other one
Thanks
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha closed pull request #1275: Add
multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha closed pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1275: Add multiple
etcd address support.
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599994175
> Shall I go on with the other PR.
You can continue working at this PR.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request
#1275: Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#discussion_r392736830
##########
File path: conf/config.yaml
##########
@@ -98,7 +98,10 @@ nginx_config: # config for render the template to genarate n
- 'unix:'
etcd:
- host: "http://127.0.0.1:2379" # etcd address
+ host:
+ - "http://127.0.0.1:2379" # multiple etcd address
Review comment:
That is wrong. By default, there should be only one etcd address.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha edited a comment on issue #1275:
Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha edited a comment on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599919293
@membphis sure I will do so
there were few conflicts on rebase that's why I closed this but yeah will reopen 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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] Akayeshmantha edited a comment on issue #1275:
Add multiple etcd address support.
Posted by GitBox <gi...@apache.org>.
Akayeshmantha edited a comment on issue #1275: Add multiple etcd address support.
URL: https://github.com/apache/incubator-apisix/pull/1275#issuecomment-599270894
Hi @membphis
Most of the test cases fails with the below log
https://pastebin.com/KbBD6h5s
Hm I have no clue is it because now we are defining set of etcd hosts it can't find a leader ?
Some help here would be great
----------------------------------------------------------------
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
With regards,
Apache Git Services