Comment 2 for bug 1981736

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

So the full traceback for the error is:

unit-manila-0: 18:15:11 ERROR unit.manila/0.juju-log Error: 'ManilaRelationAdapters' object has no attribute '_OpenStackAPIRelationAdapters__resolved_cluster'
unit-manila-0: 18:15:11 ERROR unit.manila/0.juju-log Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-manila-0/charm/actions/openstack-upgrade", line 55, in main
    action(args)
  File "/var/lib/juju/agents/unit-manila-0/charm/actions/openstack-upgrade", line 36, in openstack_upgrade_action
    charm_instance.run_upgrade()
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/charms_openstack/charm/core.py", line 1145, in run_upgrade
    target_charm.do_openstack_upgrade_config_render(interfaces_list)
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/charms_openstack/charm/core.py", line 1227, in do_openstack_upgrade_config_render
    self.render_all_configs()
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/charms_openstack/charm/core.py", line 910, in render_all_configs
    adapters_instance=adapters_instance)
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/charms_openstack/charm/core.py", line 988, in render_configs
    _render(os.path.basename(conf))
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/charms_openstack/charm/core.py", line 985, in _render
    perms=self.permission_override_map.get(conf) or 0o640,
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/charmhelpers/core/templating.py", line 85, in render
    content = template.render(context)
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/jinja2/environment.py", line 1003, in render
    vars = dict(*args, **kwargs)
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/charms_openstack/adapters.py", line 1271, in __iter__
    yield relation, getattr(self, relation)
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/charms_openstack/adapters.py", line 1343, in <lambda>
    property(lambda x: x.__cluster()))
  File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.6/site-packages/charms_openstack/adapters.py", line 1347, in __cluster
    if not self.__resolved_cluster:
AttributeError: 'ManilaRelationAdapters' object has no attribute '_OpenStackAPIRelationAdapters__resolved_cluster'

This is kind of awkward to fix as it's a dunder method which ManilaRelationAdapters doesn't have. I suspect they'll have to be changed to single under methods so that they can be inherited. This has been a bug for a long time.