upstart should notice "/etc" inode change

Bug #1213925 reported by Dimitri John Ledkov
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

When one boots ubuntu with "/" using overlayfs, the overlay would typically be empty and not have RW "/etc/" overlay directory yet.

Upon writing to RO-base "/etc/", a RW "/etc" overlay directory will be created.

Since a RW "/etc" didn't exist before, the inotify watches are still watching the RO-base "/etc/" directory and thus not notifying upstart to reload configurations of job files as appropriate.

If the filesystem used as an overlay support inotify, than inotify events would be emitted on the RW "/etc" and thus upstart would monitor it after initctl reload-configuration.

If RW "/" overlay is created before upstart is run, than when RW "/etc/" overlay is created, the RW "/" does receive inotify event that "/etc" is created.

I am thus proposing to add a by-default a job that monitors all "/" events via file-bridge, and if it notices that "/etc" has been created, executes initctl reload-configuration. Thus for a lot of common cases of "/" overlayfs (live session off ubuntu desktop, lxc-cloned images with overlayfs, cloud-image overlayfs) upstart in ubuntu will be reloaded when needed.

Related bugs:
 * bug 882147: overlayfs does not implement inotify interfaces correctly

Changed in upstart (Ubuntu):
assignee: nobody → Dmitrijs Ledkovs (xnox)
status: New → Confirmed
importance: Undecided → Medium
Scott Moser (smoser)
description: updated
Revision history for this message
Adam Conrad (adconrad) wrote :

17:34 < infinity> bdmurray: I'm not sure how xnox's fix to 1213925 is a fix at all. It would catch the first time /etc is modified, and no time after that.
17:35 < infinity> bdmurray: I still think the only sane fix for the upstart-on-overlayfs case is a dpkg trigger that registers interest in /etc/init and forces a config reload.

Revision history for this message
Scott Moser (smoser) wrote :

just a comment here for myself later.
based on conversation with xnox, and "should work" i did the changes to overlayroot, which actually landed.
They dont work though.

Changed in upstart (Ubuntu):
assignee: Dimitri John Ledkov (xnox) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.