diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-12-17 12:26:10 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-12-17 12:26:10 -0500 |
commit | 5021c3fa71a6d239a8a67303cd564d383a9c6e1d (patch) | |
tree | a23e56518fdd008e57103e85fda731cd38db5f71 /cloudinit/handlers | |
parent | c196afccda0293613e3586922347749c33dfddbf (diff) | |
download | vyos-cloud-init-5021c3fa71a6d239a8a67303cd564d383a9c6e1d.tar.gz vyos-cloud-init-5021c3fa71a6d239a8a67303cd564d383a9c6e1d.zip |
tell upstart to reload configuration after writing an upstart job
Invoking 'initctl reload-configuration' is only required if inotify
does not work. overlayroot does not support inotify. So, we just
call initctl always, which wont hurt anything.
LP: #1080841
Diffstat (limited to 'cloudinit/handlers')
-rw-r--r-- | cloudinit/handlers/upstart_job.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/handlers/upstart_job.py b/cloudinit/handlers/upstart_job.py index 99e0afde..4e204da0 100644 --- a/cloudinit/handlers/upstart_job.py +++ b/cloudinit/handlers/upstart_job.py @@ -64,3 +64,7 @@ class UpstartJobPartHandler(handlers.Handler): payload = util.dos2unix(payload) 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) |