IndexError: list index out of range

Bug #2009625 reported by Felipe Reyes
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

when tearing down a model the relation-departed hook fails with the stacktrace below. I think the interface should be checking if there are relations available before querying data from them at

unit-ironic-api-0: 14:32:12 ERROR unit.ironic-api/0.juju-log identity-service:10: Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-ironic-api-0/.venv/lib/python3.10/site-packages/charms/reactive/", line 74, in main
  File "/var/lib/juju/agents/unit-ironic-api-0/.venv/lib/python3.10/site-packages/charms/reactive/", line 390, in dispatch
  File "/var/lib/juju/agents/unit-ironic-api-0/.venv/lib/python3.10/site-packages/charms/reactive/", line 359, in _invoke
  File "/var/lib/juju/agents/unit-ironic-api-0/.venv/lib/python3.10/site-packages/charms/reactive/", line 181, in invoke
  File "/var/lib/juju/agents/unit-ironic-api-0/charm/hooks/relations/keystone/", line 140, in departed
  File "/var/lib/juju/agents/unit-ironic-api-0/charm/hooks/relations/keystone/", line 112, in update_flags
    if self.base_data_complete():
  File "/var/lib/juju/agents/unit-ironic-api-0/charm/hooks/relations/keystone/", line 147, in base_data_complete
    'service_host': self.service_host(),
  File "/var/lib/juju/agents/unit-ironic-api-0/charm/hooks/relations/keystone/", line 48, in _accessor_internal
    return self.relations[0].received_app_raw.get(
  File "/var/lib/juju/agents/unit-ironic-api-0/.venv/lib/python3.10/site-packages/charms/reactive/", line 654, in __getitem__
    return super().__getitem__(self._translate_key(key))
IndexError: list index out of range

Revision history for this message
Felipe Reyes (freyes) wrote :

probably the custom metaclass could be dropped in favor of the one provided by charms.reactive.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.