~james-page/charms/precise/ceph/fixup-mon-perms

« back to all changes in this revision

Viewing changes to hooks/hooks.py

  • Committer: James Page
  • Date: 2012-10-13 19:52:35 UTC
  • Revision ID: james.page@canonical.com-20121013195235-sqo7oueovl924vae
Support use of single node ceph

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
    for dev in utils.config_get('osd-devices').split(' '):
63
63
        osdize(dev)
64
64
 
 
65
    # Support use of single node ceph
 
66
    if (not ceph.is_bootstrapped() and
 
67
        int(utils.config_get('monitor-count')) == 1):
 
68
        bootstrap_monitor_cluster()
 
69
        ceph.wait_for_bootstrap()
 
70
 
65
71
    if ceph.is_bootstrapped():
66
72
        ceph.rescan_osd_devices()
67
73
 
245
251
    # In case we're being redeployed to the same machines, try
246
252
    # to make sure everything is running as soon as possible.
247
253
    subprocess.call(['start', 'ceph-mon-all-starter'])
248
 
    subprocess.call(['udevadm', 'trigger',
249
 
                     '--subsystem-match=block', '--action=add'])
 
254
    ceph.rescan_osd_devices()
250
255
 
251
256
 
252
257
utils.do_hooks({