Assess ceph request status until it is complete.
Due to a change in the ceph-client interface *1 the storage-ceph.pools.available flag can be lost when the charm is upgraded from an old version to the current version. To account for this check the request status whenever there is an outstanding ceph request. *1 https://github.com/openstack/charm-interface-ceph-client/blame/master/requires.py#L107 Change-Id: I179df45af2fb2d4723cd579a1070ece0d18b5002 Closes-Bug: #1850618
This commit is contained in:
parent
fce9e270f7
commit
b6c42e3260
@ -88,6 +88,12 @@ def configure_ceph(ceph):
|
||||
charm_instance.configure_ceph_keyring(ceph.key())
|
||||
|
||||
|
||||
@reactive.when_not('storage-ceph.pools.available')
|
||||
@reactive.when('storage-ceph.connected')
|
||||
def check_ceph_request_status(ceph):
|
||||
ceph.changed()
|
||||
|
||||
|
||||
@reactive.when_not('storage-ceph.connected')
|
||||
def storage_ceph_disconnected():
|
||||
with charm.provide_charm_instance() as charm_instance:
|
||||
|
@ -59,6 +59,9 @@ class TestRegisteredHooks(test_utils.TestRegisteredHooks):
|
||||
'storage_ceph_connected': (
|
||||
'storage-ceph.connected',
|
||||
),
|
||||
'check_ceph_request_status': (
|
||||
'storage-ceph.connected',
|
||||
),
|
||||
},
|
||||
'when_not': {
|
||||
'storage_ceph_disconnected': (
|
||||
@ -76,6 +79,9 @@ class TestRegisteredHooks(test_utils.TestRegisteredHooks):
|
||||
'storage_ceph_connected': (
|
||||
'ceph.create_pool.req.sent',
|
||||
),
|
||||
'check_ceph_request_status': (
|
||||
'storage-ceph.pools.available',
|
||||
),
|
||||
},
|
||||
}
|
||||
# test that the hooks were registered via the
|
||||
|
Loading…
x
Reference in New Issue
Block a user