[Bug 933566] Re: Stopping resolvconf doesn't disable updates because Upstart doesn't run the pre-stop script

2012-02-22 Thread Thomas Hood
I wrote above in #7: > If we can't get Upstart fixed in an acceptable time frame then > I'd propose a different workaround. Create a resolvconf-stop > Upstart job that *starts* on runlevel [06] and that disables > updates in its pre-start. I have been re-reading the Upstart documentation and altho

[Bug 933566] Re: Stopping resolvconf doesn't disable updates because Upstart doesn't run the pre-stop script

2012-02-22 Thread Thomas Hood
> If and when that bug is fixed, the pre-stop script will > have the exact same effect. If and when the bug is fixed the wiki documentation at http://upstart.ubuntu.com/wiki/Stanzas#pre-stop should also be updated so that it no longer implies (by omission, compared with post-stop) that the pre-s

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-20 Thread Launchpad Bug Tracker
This bug was fixed in the package resolvconf - 1.63ubuntu8 --- resolvconf (1.63ubuntu8) precise; urgency=low * Use a post-stop script for disabling resolvconf, not a pre-stop script, since upstart seems to be silently ignoring pre-stop when there's no main process. LP: #933

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-20 Thread Thomas Hood
The original issue here (#933566), "Stopping resolvconf doesn't disable updates", has already been addressed (by switching to post-stop from pre-stop) so I will open a new bug report (#936835) about the additional measure of ignoring errors on enabling/disabling updates. -- You received this bug

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-19 Thread Thomas Hood
Upstart sees resolvconf as a persistent job and keeps track of its state, running or stopped. One significance of this is that Upstart won't start resolvconf if it is already "running" or stop it if it is already "stopped". The part of resolvconf that conforms to this model is the enabling and di

Re: [Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-17 Thread Steve Langasek
On Fri, Feb 17, 2012 at 02:05:02PM -, Thomas Hood wrote: > Using post-stop has the consequence that any error during the resolvconf > update run in the upstart job causes resolvconf updates to be disabled. > That is undesirable IMHO. This is entirely by design. If the errors in the hook scr

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-17 Thread Thomas Hood
An alternative might be to use post-start (whose exit status is ignored) so long as we use post-stop. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/933566 Title: Stopping resolvconf doesn't disable

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-17 Thread Thomas Hood
Steve Langasek wrote: > Conceptually, I think there's no reason not to use > post-stop since the post-stop script is run before > the stopped event is emitted, so I'll go ahead with > committing this fix [...] Using post-stop has the consequence that any error during the resolvconf update run in

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-17 Thread Thomas Hood
I actually upgraded to 1.4-0ubuntu7 yesterday so when I look in /var/log/upstart/resolvconf.log now I see the results of several reboots: yes, there they are, repeated instances of: cp: cannot create regular file `/var/spool/postfix/etc/resolv.conf': Read-only file system^M run-parts: /et

Re: [Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-16 Thread Steve Langasek
On Thu, Feb 16, 2012 at 09:43:44PM -, Thomas Hood wrote: > > until we know why resolvconf is failing to start for you on boot > We know that the resolvconf job starts, otherwise /run/resolvconf > wouldn't exist. The problem is that the job also get stopped. No, the job *tries* to start. It

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-16 Thread Steve Langasek
** Changed in: resolvconf (Ubuntu) Status: Triaged => Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/933566 Title: Stopping resolvconf doesn't disable updates To manage notifica

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-16 Thread Thomas Hood
> until we know why resolvconf is failing to start for you on boot We know that the resolvconf job starts, otherwise /run/resolvconf wouldn't exist. The problem is that the job also get stopped. I added touch commands to the scripts which show this. -

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-16 Thread Thomas Hood
Here's a simpler test case which shows the pre-stop script not being run. # status foo foo stop/waiting # cat /etc/init/foo.conf description "Foo" pre-start script touch /run/foo end script pre-stop script rm -f /run/foo end script # ls -l /run/foo ls: cannot access /run/foo: No

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-16 Thread Launchpad Bug Tracker
** Branch linked: lp:ubuntu/resolvconf -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/933566 Title: Stopping resolvconf doesn't disable updates To manage notifications about this bug go to: https://

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-16 Thread Steve Langasek
> But don't make that change, because then updates are not enabled after > reboot! Well, it looks like the change may be per se correct, and you simply have something amiss on your system that's causing the resolvconf job to fail at startup. It doesn't fail for me. > it looks to me as if resolvc

[Bug 933566] Re: Stopping resolvconf doesn't disable updates

2012-02-16 Thread Thomas Hood
I wrote: > The following change seems to fix this. But don't make that change, because then updates are not enabled after reboot! (rebooted) # ls -l /run/resolvconf total 4 drwxr-xr-x 2 root root 60 2012-02-16 17:12 interface/ -rw-r--r-- 1 root root 0 2012-02-16 17:12 postponed-update -rw-r--r