diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-09-28 09:03:54 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-09-28 09:03:54 -0400 |
commit | dfa62e70bd9942fd3c82d77217d48615a78bbcfc (patch) | |
tree | 280bf379318dfe191ddd704b5b3337d7a469006b /cloudinit | |
parent | ec910564e00498f5c545a227bee56eb25233e270 (diff) | |
download | vyos-cloud-init-dfa62e70bd9942fd3c82d77217d48615a78bbcfc.tar.gz vyos-cloud-init-dfa62e70bd9942fd3c82d77217d48615a78bbcfc.zip |
restart salt-minion instead of start.
Packages on debian/ubuntu should start on installation. As a result, if we
want to get config changes we've inserted to be read, we need to restart.
Note one interesting thing here.
upstart considers 'restart' as "restart only if currently running", while
'service' considers restart to be "stop if running, then start". So the use of
'service' here is important, rather than just 'restart'
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/config/cc_salt_minion.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/config/cc_salt_minion.py b/cloudinit/config/cc_salt_minion.py index 79ed8807..8a1440d9 100644 --- a/cloudinit/config/cc_salt_minion.py +++ b/cloudinit/config/cc_salt_minion.py @@ -56,5 +56,6 @@ def handle(name, cfg, cloud, log, _args): util.write_file(pub_name, salt_cfg['public_key']) util.write_file(pem_name, salt_cfg['private_key']) - # Start salt-minion - util.subp(['service', 'salt-minion', 'start'], capture=False) + # restart salt-minion. 'service' will start even if not started. if it + # was started, it needs to be restarted for config change. + util.subp(['service', 'salt-minion', 'restart'], capture=False) |