do not reload upstart configuration on upstart jobs

For now, we disable reloading upstart jobs due to bug 1124384.
At some point in the future, we could enable it again when that
bug is fixed.

The change here allows for a boothook in a multipart input to write the
file '/run/cloud-init-upstart-reload' and then have configuration
reloaded.
This commit is contained in:
Scott Moser 2013-02-27 13:02:06 -05:00
parent 67be43eb0b
commit dc7a71c7cf

View File

@ -65,6 +65,14 @@ class UpstartJobPartHandler(handlers.Handler):
path = os.path.join(self.upstart_dir, filename)
util.write_file(path, payload, 0644)
# if inotify support is not present in the root filesystem
# (overlayroot) then we need to tell upstart to re-read /etc
util.subp(["initctl", "reload-configuration"], capture=False)
# FIXME LATER (LP: #1124384)
# a bug in upstart means that invoking reload-configuration
# at this stage in boot causes havoc. So, until that is fixed
# we will not do that. However, I'd like to be able to easily
# test to see if this bug is still present in an image with
# a newer upstart. So, a boot hook could easiliy write this file.
if os.path.exists("/run/cloud-init-upstart-reload"):
# if inotify support is not present in the root filesystem
# (overlayroot) then we need to tell upstart to re-read /etc
util.subp(["initctl", "reload-configuration"], capture=False)