-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
does not start at boot on CentOS 6 #235
Comments
What's the minor version of CentOS 6 that you're using? |
6.6, as in the Vagrantfile shown above. |
I was able to confirm that Consul isn't starting on reboot. |
@petere FYI: it could be worked around by switching service provider to node.set['poise-service']['consul']['provider'] = 'sysvinit' Or the same with poise_service_options node['consul']['service_name'] do
_options['provider'] = 'sysvinit'
end |
That was what I was going to suggest as well. I'm not comfortable using the version of upstart on CentOS 6 because it is ancient. I'll try and take some time to mess around with this, but this is probably the best route. |
I had tried that as well, but it doesn't work. The first problem is that the generated init script does not pass the path ( |
Alright, we can fix this by putting a custom sysvinit template into the project. |
I saw this too, and managed to figure out what's going on. It's failing because with the upstart config on EL6, Consul is being started before the network is up, and then Consul itself bails out because, again, the network is not up. I would be nice if Consul was a little more patient in this scenario, but there's probably a way to build some patience in to the upstart config, or give it an explicit dependency on networking. Note that networking on EL6 is managed by a sysvinit script. My workaround for now is have my wrapper cookbook add a :reboot cron job that watches for /var/lock/subsys/network, and then run "initctl start consul" if Consul is not already running. |
@griffint61 That's interesting. I have a new sysvinit template that I wrote for the project, but if I configure the service to start on run levels 3 and 5 it should be fine? |
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. |
On CentOS 6, this cookbook registers consul as an upstart job. The consul process is started when Chef runs. I can also manually start and stop consul using something like
sudo start consul
. But after rebooting, consul is not automatically started. I can start it manually again, and everything is fine, but that's probably not the idea.The configuration in
/etc/init/consul.conf
seems to indicate that it should automatically start at system start. But the upstart version CentOS 6 is so old, it's hard to debug anything.Here is a small Vagrantfile to test this:
After
vagrant up
, check that consul is running, then runvagrant reload
, and it won't come back up.The text was updated successfully, but these errors were encountered: