FW: Upstart (0.6.5) not retaining configuration. CentOS 6.2 64 Bit.

James Hunt james.hunt at ubuntu.com
Fri Mar 15 08:43:04 UTC 2013


On 15/03/13 03:46, Alpha Bit wrote:
> 
> Hello,
> 
> First and foremost let me apologize if I am spamming the wrong list. I also
> tried getting some help on the irc channel.
> 
> I have upstart 0.6.5 that CentOS ships with RHEL 6.2 64 bit. I have placed my
> custom .conf (say myJob.conf) file in /etc/init/ folder. After that I did a
> reboot and an initctl list, but I didn't see myJob in the list. I then did a
> initctl reload-configuration and an initctl list and I then see myJob in the
> list. I can also issue initclt start myJob with no issues and it works fine. The
> problem is after I reboot and an initctl list, myJob is again missing from the
> list. Its like I have to run reload-configuration on every reboot.
> The permissions look correct (root owned, world readable).
> I know reload-configuration is valid until the next reboot only, but how do I
> fix this issue? Upstart would ideally picks all the new .conf file on every
> reboot anyways, but just not in this case.
> 
> myJob.conf looks like below:
> --------
> start on startup
> stop on runlevel[016]
> respawn
> doSomething
> ----------
> 
> Any help/pointer is very much appreciated.
> 
> Thanks.
> 
> 
> 
> 
You should not need to reboot - Upstart uses inotify to watch /etc/init/ so that
any new job configuration files are parsed "immediately". However, when Upstart
first starts, it recurses through /etc/init manually (akin to 'initctl
reload-configuration') so it can read the existing .conf files at boot time.

Some questions:

(1) Are you using some sort of exotic remote/overlay filesystem that does not
support inotify?
(2) Is /etc/init/ a symbolic link?
(3) Is myJob.conf a symbolic link?
(4) Do you see this behaviour with every job you create? Try creating a minimal
job containing something like:

exec sleep 1

... and see if initctl recognises it as valid.

>From what you've said, I'd guess the issue is probably (1).

Kind regards,

James.
--
James Hunt
____________________________________
http://upstart.ubuntu.com/cookbook
http://upstart.ubuntu.com/cookbook/upstart_cookbook.pdf



More information about the upstart-devel mailing list