conf-change reload issue, ui suggestions...
David Jeske
davidj at gmail.com
Fri Mar 30 01:20:37 UTC 2012
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.
However, I'm running into some hiccups...
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..
For example, I commended out a line recommended for script debugging (exec
2>> /var/log/willowinit). Then I did:
root at w5:/var/log# rm willowinit
root at w5:/var/log# initctl reload-configuration
root at w5:/var/log# initctl restart willow-smtpd
willow-smtpd start/running, process 24793
root at w5:/var/log# ls -l willowinit
-rw-r--r-- 1 root root 81 2012-03-29 17:52 willowinit
...and you can see, the willowinit log file is created again, even though
writing to it is commented out in the config file.
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.
Any idea what is going on here?
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?
Here is a sample session today which makes very little sense to me..
root at w5:~# vi willow-smtpd.config <hack hack>
root at w5:~# initctl reload-configuration
root at w5:~# initctl restart willow-smtpd
initctl: Unknown instance:
root at w5:~# initctl start willow-smtpd
willow-smtpd start/running, process 24871
root at w5:~# initctl restart willow-smtpd
willow-smtpd start/running, process 24873
Here is what I'd prefer it to look like:
root at w5:~# vi willow-smtpd.config <hack hack>
root at w5:~# initctl reload-configuration
+ new willow-smtpd.conf - ok
- new willow2-foo.conf - syntax error line 25, not active
reload: 24 configurations, 1 new. No events triggered.
root at w5:~# initctl restart willow-smtpd
initctl: no existing process to stop: willow-smtpd
willow-smtpd start/running, process 24871
root at w5:~# initctl restart willow-smtpd
initctl: stopping willow-smtpd, process 24871..
willow-smtpd start/running, process 24873
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.
Here are some examples:
[root at w1 service]# svstat shttpd
shttpd: up (pid 18292) 36899416 seconds
root at w5:~# service --status-all
[ + ] apache2
[ + ] apparmor
...
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..
PID EVENT/STATE TIME SERVICE CAUSE
24883 stop/waiting 0d 32:22 httpd runlevel=5
690 start/running 0d 00:00 willow-smtpd usercmd: reload
...comments?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20120329/6463cc3f/attachment.html>
More information about the upstart-devel
mailing list