~openstack-charmers-archive/charms/precise/cinder/trunk

« back to all changes in this revision

Viewing changes to hooks/cinder_hooks.py

  • Committer: Edward Hope-Morley
  • Date: 2015-05-01 11:38:15 UTC
  • Revision ID: edward.hope-morley@canonical.com-20150501113815-2qmym1u79ci6ajoe
[hopem,r=wolsen]

Ensure cinder-volume service is restarted when we recieve
ack from ceph broker request so that we are sure it is
able to connect to newly created ceph resources.

Backported from /next
Closes-Bug: 1450543

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    restart_map,
19
19
    services,
20
20
    service_enabled,
 
21
    service_restart,
21
22
    set_ceph_env_variables,
22
23
    CLUSTER_RES,
23
24
    CINDER_CONF,
334
335
        set_ceph_env_variables(service=service)
335
336
        CONFIGS.write(CINDER_CONF)
336
337
        CONFIGS.write(ceph_config_file())
 
338
        # Ensure that cinder-volume is restarted since only now can we
 
339
        # guarantee that ceph resources are ready.
 
340
        service_restart('cinder-volume')
337
341
    else:
338
342
        rq = CephBrokerRq()
339
343
        replicas = config('ceph-osd-replication-count')