Upstart does not reload properly .conf files that use "instance" feature

Bug #611082 reported by Christian Hudon on 2010-07-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
Undecided
Unassigned

Bug Description

I renamed /etc/init/network-interface.conf to *.disabled in order to not have upstart execute it when network interfaces go down. However afterwards I was still seeing "network-interface (ppp0)" events in the upstart debug output. Doing "initctl reload-configuration" made no difference. However after a reboot now I don't see any "network-interface (ppp0)" events being triggered.

Maybe upstart does not handle properly reload for .conf files which use the "instance" feature? I am running upstart 0.6.5-6 on Ubuntu 10.04 LTS.

Actually Upstart reloads such .conf file just fine, what you've probably missed is that Upstart will not use the new .conf until all existing instances have stopped.

This is because the new .conf may change such things as locking between the instances, or criterion for instance creation, that would affect any running instances.

It's exactly the same process that ensures that a running job uses the *previous* "post-stop" script, rather than a new one, if the .conf is changed while it's running

Changed in upstart:
status: New → Won't Fix
Stephen Wood (smwood4) wrote :

Scott, I believe Christian has a valid use-case for a service behavior. I too am requesting this option.

There's no way to accomplish the following: prevent a respawn without restarting the service or the host.

Consider the following:

1. Host is running a service that was started with upstart. The conf contains a "restart" stanza.
2. "restart" stanza is removed from host's configuration file
3. initctl reload-configuration is issued.
4. The service dies (or is killed). It's respawned -- it will always be respawned until it's explicitly restarted (restart <service>) or the host restarts.

As far as I can tell, there's no way to prevent the service from respawning without explicitly restarting the service. Is there a different way to accomplish this?

Even going as far as removing the conf file from the host will not prevent it from respawning.

This is true for upstart version 0.6.5, which is the default Upstart version in use in AWS's EMR4 ami image.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers