Fix ceph-relation-changed error

TypeError: 'str' object is not callable
After recent interface change

Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/400
Change-Id: I7a45b1ffe7d71bd44201a72510d6b56a1e1a4824
Closes-Bug: #1893445
This commit is contained in:
Aurelien Lourot 2020-08-29 14:12:50 +02:00 committed by James Page
parent e0bcefcd9d
commit 50c11d0e99
2 changed files with 4 additions and 1 deletions

View File

@ -133,6 +133,9 @@ class TrilioDataMoverBaseCharm(
# charm specific location for qemu commands to work
if not os.path.exists(ceph_keyring):
os.symlink(keyring_absolute_path, ceph_keyring)
# NOTE: ensure /var/lib/charm is world readable - this will be the
# case with Python >= 3.7 but <= 3.6 has different behaviour
os.chmod('/var/lib/charm', 0o755)
return keyring_absolute_path
def get_amqp_credentials(self):

View File

@ -68,5 +68,5 @@ def ceph_connected(ceph):
@reactive.when("ceph.available")
def configure_ceph(ceph):
with charm.provide_charm_instance() as charm_instance:
charm_instance.configure_ceph_keyring(ceph.key())
charm_instance.configure_ceph_keyring(ceph.key)
charm_instance.assess_status()