From 024fe9215fe1ada7a5c4f2e44fb315a3486120be Mon Sep 17 00:00:00 2001 From: Chris MacNaughton Date: Tue, 14 Feb 2017 13:09:05 -0600 Subject: [PATCH] remove upgrade_keys This function is no longer necessary as we do not need to ensure that the remote units can create their own pools Change-Id: I7e46b97ad2bb18a6e11a393a34f40e9bf51445c7 Partial-Bug: 1424771 --- hooks/ceph_hooks.py | 14 -------------- unit_tests/test_ceph_hooks.py | 1 - 2 files changed, 15 deletions(-) diff --git a/hooks/ceph_hooks.py b/hooks/ceph_hooks.py index 5d443b0..28ccac1 100755 --- a/hooks/ceph_hooks.py +++ b/hooks/ceph_hooks.py @@ -422,19 +422,6 @@ def notify_client(): client_relation_joined(relid) -def upgrade_keys(): - """ Ceph now required mon allow rw for pool creation """ - if len(relation_ids('radosgw')) > 0: - ceph.upgrade_key_caps('client.radosgw.gateway', - ceph._radosgw_caps) - for relid in relation_ids('client'): - units = related_units(relid) - if len(units) > 0: - service_name = units[0].split('/')[0] - ceph.upgrade_key_caps('client.{}'.format(service_name), - ceph._default_caps) - - @hooks.hook('osd-relation-changed') @hooks.hook('osd-relation-joined') def osd_relation(relid=None): @@ -555,7 +542,6 @@ def upgrade_charm(): emit_cephconf() apt_install(packages=filter_installed_packages(ceph.PACKAGES), fatal=True) ceph.update_monfs() - upgrade_keys() mon_relation_joined() if is_relation_made("nrpe-external-master"): update_nrpe_config() diff --git a/unit_tests/test_ceph_hooks.py b/unit_tests/test_ceph_hooks.py index 25ae4db..b4a08ce 100644 --- a/unit_tests/test_ceph_hooks.py +++ b/unit_tests/test_ceph_hooks.py @@ -145,7 +145,6 @@ class CephHooksTestCase(unittest.TestCase): write_file=DEFAULT, nrpe=DEFAULT, emit_cephconf=DEFAULT, - upgrade_keys=DEFAULT, mon_relation_joined=DEFAULT, is_relation_made=DEFAULT) as mocks, patch( "charmhelpers.contrib.hardening.harden.config"):