From 2aa46934b235fda13864795d4c3ebfbcb4defd78 Mon Sep 17 00:00:00 2001 From: Chris MacNaughton Date: Tue, 14 Feb 2017 13:06:17 -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 Partial-Bug: 1424771 Change-Id: Id94c983b9631ac5a5c0a43813b2157724b148a87 --- 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 e2f79f15..35ef57a4 100755 --- a/hooks/ceph_hooks.py +++ b/hooks/ceph_hooks.py @@ -332,19 +332,6 @@ def notify_client(): mds_relation_joined(relid=relid, unit=unit) -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-joined') @hooks.hook('osd-relation-changed') def osd_relation(relid=None): @@ -536,7 +523,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 92786043..095ed1dd 100644 --- a/unit_tests/test_ceph_hooks.py +++ b/unit_tests/test_ceph_hooks.py @@ -136,7 +136,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"):