Skip to content
This repository has been archived by the owner on Oct 12, 2019. It is now read-only.

Restart handlers are unreliable #6

Open
goetzk opened this issue Mar 8, 2017 · 2 comments
Open

Restart handlers are unreliable #6

goetzk opened this issue Mar 8, 2017 · 2 comments

Comments

@goetzk
Copy link
Owner

goetzk commented Mar 8, 2017

The service restarts are unreliable on amazon (and possibly others)

[...]

RUNNING HANDLER [goetzk.shinken : restart shinken arbiter] *********************
fatal: [13.55.21.151]: FAILED! => {"changed": false, "failed": true, "msg": "/etc/rc.d/init.d/shinken: line 67: cd: /etc/rc.d/init.d/../../var: No such file or directory\n/etc/rc.d/init.d/shinken: line 68: cd: /etc/rc.d/init.d/../../etc: No such file or directory\n/etc/rc.d/init.d/shinken: line 67: cd: /etc/rc.d/init.d/../../var: No such file or directory\n/etc/rc.d/init.d/shinken: line 68: cd: /etc/rc.d/init.d/../../etc: No such file or directory\n"}
[...]
PLAY RECAP *********************************************************************
123.123.321.321               : ok=3    changed=1    unreachable=0    failed=1   

This is using ansible so may be an upstream bug.

cat roles/goetzk.shinken/handlers/main.yml 
---
- name: restart shinken arbiter
  service: name=shinken-arbiter state=restarted

- name: restart shinken broker
  service: name=shinken-broker state=restarted
@goetzk
Copy link
Owner Author

goetzk commented Mar 8, 2017

Looks like this is specific to calling -arbiter, rather than restarting shinken itself. The bug is therefor going to be in the init script/s

 sudo /etc/init.d/shinken restart
Restarting scheduler
Restarting poller                                          [  OK  ]
Restarting reactionner                                     [  OK  ]
Restarting broker                                          [  OK  ]
Restarting receiver                                        [  OK  ]
Restarting arbiter                                         [  OK  ]
Doing config check
sudo /etc/init.d/shinken-arbiter restart
/etc/rc.d/init.d/shinken: line 67: cd: /etc/rc.d/init.d/../../var: No such file or directory
/etc/rc.d/init.d/shinken: line 68: cd: /etc/rc.d/init.d/../../etc: No such file or directory
Restarting arbiter
Doing config check
                     [  OK  ]

also happens for broker.

sudo /etc/init.d/shinken-broker restart
/etc/rc.d/init.d/shinken: line 67: cd: /etc/rc.d/init.d/../../var: No such file or directory
/etc/rc.d/init.d/shinken: line 68: cd: /etc/rc.d/init.d/../../etc: No such file or directory
Restarting broker
                         [  OK  ]

@goetzk
Copy link
Owner Author

goetzk commented Apr 16, 2017

I've just opened shinken-solutions/shinken#1901 upstream about this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant