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
This commit is contained in:
Chris MacNaughton 2023-03-10 12:55:27 -05:00 committed by Chris MacNaughton
parent 011dddf14d
commit 3a774be961
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -27,7 +27,7 @@ install_command =
commands = stestr run --slowest {posargs}
allowlist_externals =
charmcraft
rename.sh
{toxinidir}/rename.sh
passenv =
HOME
TERM