Deal with upgrades - unikely

This commit is contained in:
James Page 2015-03-23 17:59:39 +00:00
parent d159b4c716
commit b4dfe03959
1 changed files with 6 additions and 3 deletions

View File

@ -328,11 +328,14 @@ def bootstrap_monitor_cluster(secret):
def update_monfs():
hostname = get_unit_hostname()
monfs = '/var/lib/ceph/mon/ceph-{}'.format(hostname)
upstart = '{}/upstart'.format(monfs)
if os.path.exists(monfs) and not os.path.exists(upstart):
if systemd():
init_marker = '{}/systemd'.format(monfs)
else:
init_marker = '{}/upstart'.format(monfs)
if os.path.exists(monfs) and not os.path.exists(init_marker):
# Mark mon as managed by upstart so that
# it gets start correctly on reboots
with open(upstart, 'w'):
with open(init_marker, 'w'):
pass