From 3a774be96132e7802d1278cd6812d2fb982c740e Mon Sep 17 00:00:00 2001 From: Chris MacNaughton Date: Fri, 10 Mar 2023 12:55:27 -0500 Subject: [PATCH] Fix issue with ceph-client relation handling A bug was introduced when changing ceph-client to an operator framework library that caused the fallback application_name handling to present a class name rather than a remote applicaiton name. This change updates the handling to get at an `app.name` rather than an `app`. As a drive-by, this also allow-lists the fully- qualified rename.sh. Closes-Bug: #1995086 Change-Id: I57b685cb78ba5c4930eb0fa73d7ef09d39d73743 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1022 --- src/ceph_client.py | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ceph_client.py b/src/ceph_client.py index b9881380..2a122d8d 100644 --- a/src/ceph_client.py +++ b/src/ceph_client.py @@ -93,7 +93,7 @@ class CephClientProvides(Object): """Retrieve client application name from relation data.""" return relation.data[unit].get( 'application-name', - relation.app) + relation.app.name) def _handle_client_relation(self, relation, unit): """Handle broker request and set the relation data diff --git a/tox.ini b/tox.ini index 75e28749..cdfdb44c 100644 --- a/tox.ini +++ b/tox.ini @@ -27,7 +27,7 @@ install_command = commands = stestr run --slowest {posargs} allowlist_externals = charmcraft - rename.sh + {toxinidir}/rename.sh passenv = HOME TERM