Reverting changes from commit 69a6fde

This patch reverts the non-charmhelpers changes from
the patch landed for bug 1835045 that is causing a
regression whereby new deployments that relate to
ceph-mon are prevented from sending broker requests
to do e.g. create the pool needed by
libvirt-image-backend=rbd.

Change-Id: I29421ce240a3810d945b76e662a743b4b8497ac8
Related-Bug: 1835045
Closes-Bug: 1839297
This commit is contained in:
Edward Hope-Morley 2019-08-07 10:33:27 +01:00
parent b416426fa1
commit c0607560ba
2 changed files with 0 additions and 15 deletions

View File

@ -77,7 +77,6 @@ from charmhelpers.contrib.storage.linux.ceph import (
is_request_complete,
is_broker_action_done,
mark_broker_action_done,
has_broker_rsp,
)
from charmhelpers.payload.execd import execd_preinstall
from nova_compute_utils import (
@ -409,11 +408,6 @@ def ceph_changed(rid=None, unit=None):
create_libvirt_secret(secret_file=CEPH_SECRET,
secret_uuid=CEPH_SECRET_UUID, key=key)
if not has_broker_rsp(rid, unit):
log("Unit {} does not have a broker_rsp. "
"Aborting ceph_changed".format(unit))
return
if is_request_complete(get_ceph_request()):
log('Request complete')
# Ensure that nova-compute is restarted since only now can we

View File

@ -459,17 +459,14 @@ class NovaComputeRelationsTests(CharmTestCase):
@patch.object(hooks, 'mark_broker_action_done')
@patch.object(hooks, 'is_broker_action_done')
@patch.object(hooks, 'has_broker_rsp')
@patch('nova_compute_context.service_name')
@patch.object(hooks, 'CONFIGS')
def test_ceph_changed_with_key_and_relation_data(self, configs,
service_name,
has_broker_rsp,
is_broker_action_done,
mark_broker_action_done):
self.test_config.set('libvirt-image-backend', 'rbd')
self.is_request_complete.return_value = True
has_broker_rsp.return_value = True
self.assert_libvirt_rbd_imagebackend_allowed.return_value = True
configs.complete_contexts = MagicMock()
configs.complete_contexts.return_value = ['ceph']
@ -492,12 +489,6 @@ class NovaComputeRelationsTests(CharmTestCase):
hooks.ceph_changed()
self.assertFalse(mark_broker_action_done.called)
is_broker_action_done.return_value = False
has_broker_rsp.return_value = False
mark_broker_action_done.reset_mock()
hooks.ceph_changed()
self.assertFalse(mark_broker_action_done.called)
@patch('charmhelpers.contrib.storage.linux.ceph.CephBrokerRq'
'.add_op_request_access_to_group')
@patch('charmhelpers.contrib.storage.linux.ceph.CephBrokerRq'