Closed Ginja closed 7 years ago
@Ginja Travis CI build failure points to something broken in the Consul runtime. That's what I've got in the Consul output while after converging default-centos-72
Test Kitchen suite.
2017/05/16 06:44:36 [WARN] agent: Check 'consul_definition_check' registration blocked by ACLs
2017/05/16 06:44:36 [WARN] agent: Node info update blocked by ACLs
2017/05/16 06:44:49 [ERR] agent: coordinate update error: Permission denied
2017/05/16 06:45:15 [ERR] agent: coordinate update error: Permission denied
2017/05/16 06:45:44 [ERR] agent: coordinate update error: Permission denied
2017/05/16 06:46:05 [ERR] agent: coordinate update error: Permission denied
2017/05/16 06:46:21 [ERR] agent: coordinate update error: Permission denied
2017/05/16 06:46:33 [WARN] agent: Service 'consul' registration blocked by ACLs
2017/05/16 06:46:33 [WARN] agent: Check 'consul_definition_check' registration blocked by ACLs
2017/05/16 06:46:33 [WARN] agent: Node info update blocked by ACLs
2017/05/16 06:46:43 [ERR] agent: coordinate update error: Permission denied
Seems like we need to tune some ACL settings for test environment. Could you please take a look?
@legal90 Done. The tests pass for me locally, and the 3 that failed on Travis didn't fail outright, they just timed out.
@Ginja Tests on Upstart-driven systems (Ubunru 14.04, Ubuntu 12.04) are not passed. There is an infinite loop here after the service start: https://github.com/johnbellone/consul-cookbook/blob/a0595fbbeea1780d117e9fe824ea64653b9b080c/templates/default/upstart.service.erb#L51 It's also reproducible in Vagrant (without Docker):
root@ubuntu-14:~# ps aux | grep conful
<...>
root 2119 0.0 0.1 18176 1172 ? Ss 05:26 0:00 /sbin/start consul
consul 2122 0.3 1.6 33476 16256 ? Ssl 05:26 0:00 /opt/consul/0.8.3/consul agent -config-file=/etc/consul/consul.json -config-dir=/etc/consul/conf.d
consul 2126 0.0 0.0 4452 656 ? Ss 05:26 0:00 /bin/sh -e -c while ! /opt/consul/0.8.3/consul info ; do sleep 1; done /bin/sh
consul 3721 0.0 0.0 4352 356 ? S 05:30 0:00 sleep 1
<...>
root@ubuntu-14:~# /opt/consul/0.8.3/consul info
Error querying agent: Unexpected response code: 403 (Permission denied)
It seems like in Consul 0.8 consul info
needs token to be passed. Otherwise, it returns non-zero exit code.
Thanks for fixing that, @legal90. First day back from vacation :)
Just ran converge
for default-ubuntu-1204
and everything looks good to me 👍 . I'll let you merge this.
It's not completely fixed yet because of the failure on sysvinit-driven Debain distributions (Debian 7, in particular). There is one more point where we use consul info
call, which causes a 403 failure on Consul 0.8 with ACL enabled:
https://travis-ci.org/johnbellone/consul-cookbook/jobs/235152247
I'll try to figure out how we can fix it.
Merging #434 into master will increase coverage by
3.99%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #434 +/- ##
==========================================
+ Coverage 67.03% 71.03% +3.99%
==========================================
Files 7 7
Lines 358 359 +1
==========================================
+ Hits 240 255 +15
+ Misses 118 104 -14
Impacted Files | Coverage Δ | |
---|---|---|
libraries/consul_config.rb | 97.56% <100%> (+0.01%) |
:arrow_up: |
libraries/consul_watch.rb | 90.9% <0%> (+42.42%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ed78312...2509027. Read the comment docs.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.