Merge lp:~jamesodhunt/ubuntu/saucy/sysvinit/force-reload-configuration-for-broken-inotify into lp:ubuntu/saucy/sysvinit

Proposed by James Hunt on 2013-08-17
Status: Needs review
Proposed branch: lp:~jamesodhunt/ubuntu/saucy/sysvinit/force-reload-configuration-for-broken-inotify
Merge into: lp:ubuntu/saucy/sysvinit
Diff against target: 29 lines (+11/-0)
2 files modified
debian/changelog (+7/-0)
debian/src/sysv-rc/sbin/invoke-rc.d (+4/-0)
To merge this branch: bzr merge lp:~jamesodhunt/ubuntu/saucy/sysvinit/force-reload-configuration-for-broken-inotify
Reviewer Review Type Date Requested Status
Steve Langasek 2013-08-17 Approve on 2013-11-29
Review via email:

Description of the change

* debian/src/sysv-rc/sbin/invoke-rc.d: Call 'initctl reload-configuration'
  to work reliably on systems with broken inotify.

= Note =

The 'reload-configuration' will also be called when invoked from within a chroot.

To post a comment you must log in.
James Hunt (jamesodhunt) wrote :

Although the proposed change is safe for all systems, it is only currently necessary on systems where /etc/init/ is on overlayfs. As such, I wonder if we should be checking to see if /etc/init/ is actually on overlayfs prior to calling 'reload-configuration' (since on my system it took ~1 second to run 'reload-configuration' for the first time).

slangasek/smoser may have an opinion on this.

Martin Pitt (pitti) wrote :

Is that for the live session only? I. e. could we just guard that with

  grep -q '^/cow / overlayfs' /proc/mounts

or something similar?

Martin Pitt (pitti) wrote :

How about making this more generic:

rootfs=$(awk '{if ($5 == "/") print $8; }' /proc/self/mountinfo)

if [ "$rootfs" = "overlayfs" ]; then
   ... do the reload hack


James Hunt (jamesodhunt) wrote :

Not just live session - it's also used by the cloud images I understand.

Steve Langasek (vorlon) wrote :

I'm happy with this change as-is. The worst case is the overhead of unnecessarily rereading all of /etc/init. But that's not hugely expensive, and avoiding that overhead while working around the overlayfs problems would still cost us digging around in /proc. So I think we should stick with the smaller change instead of adding extra guards.

review: Approve

Unmerged revisions

193. By James Hunt on 2013-08-17

debian/src/sysv-rc/sbin/invoke-rc.d: Call 'initctl reload-configuration'
to work reliably on systems with broken inotify.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2013-06-04 08:53:47 +0000
+++ debian/changelog 2013-08-17 12:33:46 +0000
@@ -1,3 +1,10 @@
1sysvinit (2.88dsf-41ubuntu4) UNRELEASED; urgency=low
3 * debian/src/sysv-rc/sbin/invoke-rc.d: Call 'initctl reload-configuration'
4 to work reliably on systems with broken inotify.
6 -- James Hunt <> Sat, 17 Aug 2013 13:27:22 +0100
1sysvinit (2.88dsf-41ubuntu3) saucy; urgency=low8sysvinit (2.88dsf-41ubuntu3) saucy; urgency=low
3 * Exit the ondemand script silently if we are on a system that has10 * Exit the ondemand script silently if we are on a system that has
=== modified file 'debian/src/sysv-rc/sbin/invoke-rc.d'
--- debian/src/sysv-rc/sbin/invoke-rc.d 2013-05-28 19:23:43 +0000
+++ debian/src/sysv-rc/sbin/invoke-rc.d 2013-08-17 12:33:46 +0000
@@ -476,6 +476,10 @@
476 fi476 fi
478 if [ -n "$is_upstart" ]; then478 if [ -n "$is_upstart" ]; then
479 # Force Upstart to re-scan /etc/init for filesystems with
480 # broken inotify (such as overlayfs (LP: #882147)).
481 initctl reload-configuration >/dev/null 2>&1
479 case $saction in483 case $saction in
480 status)484 status)
481 "$saction" "$INITSCRIPTID" && exit 0485 "$saction" "$INITSCRIPTID" && exit 0


People subscribed via source and target branches

to all changes: