-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Improved the _start() method in the sysv initscript. Until now a sta… #433
Conversation
…t of the consul agent followed by a reload will interrupt the start process and the consul agent will be stopped You can simply reproduce this by calling: /etc/init.d/consul restart; /etc/init.d/consul reload; /etc/init.d/consul status This is likely to happen if you make a change in a wrapper cookbook that triggeres a consul restart and another change which triggeres a consul reload. Your consul agent will be stopped afterwards. To fix this this change will make sure the consul service is started before leaving the _start() method.
@MichaelKueller Thank you! |
|
||
echo -n "Waiting for consul daemon to be listening..." | ||
for i in `seq 1 30`; do | ||
if ! start-stop-daemon --quiet --stop --test --pidfile $pidfile --user $user; then |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #433 +/- ##
=========================================
Coverage ? 55.02%
=========================================
Files ? 7
Lines ? 358
Branches ? 0
=========================================
Hits ? 197
Misses ? 161
Partials ? 0 Continue to review full report at Codecov.
|
@legal90 good point! I changed the code accordingly. |
@legal90 I moved the hook to a _wait_for_listening function. I did not call it from the non-debian _start function though. After testing this with centos it turns out that the underlying issue does not exist there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MichaelKueller Thanks! Sorry for a slow response, but I've got the error of the firs iteration while testing Consul restart on Debian 7. We might need to rework the approach a little bit.
echo -n "Waiting for consul daemon to be listening..." | ||
for i in `seq 1 30`; do | ||
# if ! start-stop-daemon --quiet --stop --test --pidfile $pidfile --user $user; then | ||
if ! _status_q; then |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
@MichaelKueller @ZbigniewZabost-zanox Thank you! @johnbellone Could you please disable Codecov integration for pull-requests? |
@MichaelKueller @ZbigniewZabost-zanox Do you have any ideas how we can avoid using |
@legal90 -- I think we have to move the ACL into the environment of the process manager scripts. The v8 ACL touches all commands AFAIK. The variable would be |
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. |
…rt of the consul agent followed by a reload will interrupt the start process and the consul agent will be stopped
You can simply reproduce this by calling:
/etc/init.d/consul restart; /etc/init.d/consul reload; /etc/init.d/consul status
This is likely to happen if you make a change in a wrapper cookbook that triggeres a consul restart and another change which triggeres a consul reload. Your consul agent will be stopped afterwards.
To fix this this change will make sure the consul service is started before leaving the _start() method.