I'm trying to switch from daemon tools to upstart. Overall it seems pretty nice, and I look forward to a day where we truly end sys-v style init.d. <div><br></div><div>However, I'm running into some hiccups...<div>
<div><br></div><div>1) I'm having trouble where I edit my /etc/init/myprog.conf file, initctl reload-config, then initctl restart myprog, and my config changes are obviously not being used..</div><div><br></div><div>
For example, I commended out a line recommended for script debugging (exec 2>> /var/log/willowinit). Then I did:</div>
<div><br></div><div><div><font face="'courier new', monospace">root@w5:/var/log# rm willowinit</font></div><div><font face="'courier new', monospace">root@w5:/var/log# initctl reload-configuration</font></div>
<div><font face="'courier new', monospace">root@w5:/var/log# initctl restart willow-smtpd</font></div><div><font face="'courier new', monospace">willow-smtpd start/running, process 24793</font></div><div>
<font face="'courier new', monospace">root@w5:/var/log# ls -l willowinit</font></div>
<div><font face="'courier new', monospace">-rw-r--r-- 1 root root 81 2012-03-29 17:52 willowinit</font></div></div><div><br></div><div>...and you can see, the willowinit log file is created again, even though writing to it is commented out in the config file. </div>
<div><br></div><div>I noticed this because I'm trying to change the config file to send my output somewhere. The logs are not showing up, and I realize now it's because upstart is not incorporating my config changes.</div>
<div><br></div><div>Any idea what is going on here?</div><div><div><br></div><div>2) ... which is a more general form of the fact that it's really hard to figure out what upstart is doing from the terse or non-existant output and different places it logs. Are we open to some patches to change the UI?</div>
<div><br></div><div>Here is a sample session today which makes very little sense to me..</div><div><br></div><div><font face="'courier new', monospace"><font color="#3366ff">root@w5:~#</font> vi willow-smtpd.config <hack hack></font></div>
<div><div><font face="'courier new', monospace"><font color="#3366ff">root@w5:~#</font> initctl reload-configuration</font></div><div><font face="'courier new', monospace"><span style="background-color:rgb(255,255,255)"><font color="#3366ff">root@w5:~#</font></span> initctl restart willow-smtpd</font></div>
<div><font face="'courier new', monospace">initctl: Unknown instance:</font></div><div><font face="'courier new', monospace"><font color="#3366ff">root@w5:~#</font> initctl start willow-smtpd</font></div>
<div>
<font face="'courier new', monospace">willow-smtpd start/running, process 24871</font></div><div><font face="'courier new', monospace"><font color="#3366ff">root@w5:~#</font> initctl restart willow-smtpd</font></div>
<div><font face="'courier new', monospace">willow-smtpd start/running, process 24873</font></div><div><br></div></div><div>Here is what I'd prefer it to look like:</div><div><br></div><div><span style="font-family:'courier new',monospace"><font color="#3366ff">root@w5:~#</font> vi willow-smtpd.config <hack hack></span></div>
<div><div><span style="color:rgb(51,102,255);font-family:'courier new',monospace">root@w5:~#</span><font face="'courier new', monospace"> initctl reload-configuration</font></div><div><span style="font-family:'courier new',monospace"> + new willow-smtpd.conf - ok</span></div>
<div><font face="'courier new', monospace"> - new willow2-foo.conf - syntax error line 25, not active</font></div><div><div><font face="'courier new', monospace">reload: 24 configurations, 1 new. No events triggered.</font></div>
</div><div><span style="color:rgb(51,102,255);font-family:'courier new',monospace">root@w5:~#</span><font face="'courier new', monospace"> initctl restart willow-smtpd</font></div><div><font face="'courier new', monospace">initctl: no existing process to stop: willow-smtpd</font></div>
<div><span style="font-family:'courier new',monospace">willow-smtpd start/running, process 24871</span>
</div><div><span style="color:rgb(51,102,255);font-family:'courier new',monospace">root@w5:~#</span><span style="font-family:'courier new',monospace"> initctl restart willow-smtpd</span></div><div><font face="'courier new', monospace">initctl: stopping willow-smtpd, process 24871..</font></div>
<div><font face="'courier new', monospace">willow-smtpd start/running, process 24873</font></div></div><div><br></div><div><br></div><div>2) I find the output of "initctl list" is pretty hard to human-parse and we use these command lines alot. "service --service-list" or "svstat *" is much easier to look at. Is there some reason for the format? Is it machine read? Are you folks open to patches to change/improve it? Of course we can just change our version, but I hate to maintain local changes like that. We'd probably just make wrappers instead.</div>
<div><br></div><div>Here are some examples:</div><div><br></div><div><div>[root@w1 service]# svstat shttpd</div><div>shttpd: up (pid 18292) 36899416 seconds</div></div><div><br></div><div><div>root@w5:~# service --status-all</div>
<div> [ + ] apache2</div><div> [ + ] apparmor</div></div><div>...</div><div><br></div><div>I think it would be best to separate a fully "script/machine readable" version of "initctl list" and a normal human version. Here is one proposal for a human readable version with a little more information..</div>
<div><br></div><div><span style="font-family:'courier new',monospace"> PID EVENT/STATE TIME SERVICE CAUSE</span></div><div><font face="'courier new', monospace"> 24883 stop/waiting 0d 32:22 httpd runlevel=5</font></div>
<div><font face="'courier new', monospace"> 690 start/running 0d 00:00 willow-smtpd usercmd: reload</font></div><div><span style="font-family:'courier new',monospace"><br></span></div><div><span style="font-family:'courier new',monospace">...comments?</span></div>
<div><font face="'courier new', monospace"><br></font></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>