You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove main-failover relation: juju remove-relation failover main
Expected behavior
The relation should be removed
Actual behavior
Failover moves to error state with hook failed: "peer-cluster-relation-departed"
Log output
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-failover-0/charm/src/charm.py", line 221, in <module>
main(OpenSearchOperatorCharm)
File "/var/lib/juju/agents/unit-failover-0/charm/venv/lib/python3.10/site-packages/ops/main.py", line 553, in main
manager.run()
File "/var/lib/juju/agents/unit-failover-0/charm/venv/lib/python3.10/site-packages/ops/main.py", line 529, in run
self._emit()
File "/var/lib/juju/agents/unit-failover-0/charm/venv/lib/python3.10/site-packages/ops/main.py", line 518, in _emit
_emit_charm_event(self.charm, self.dispatcher.event_name, self._juju_context)
File "/var/lib/juju/agents/unit-failover-0/charm/venv/lib/python3.10/site-packages/ops/main.py", line 139, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-failover-0/charm/venv/lib/python3.10/site-packages/ops/framework.py", line 347, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-failover-0/charm/venv/lib/python3.10/site-packages/ops/framework.py", line 853, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-failover-0/charm/venv/lib/python3.10/site-packages/ops/framework.py", line 943, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-failover-0/charm/lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py", line 750, in _on_peer_cluster_relation_departed
self._promote_failover(orchestrators, cms)
File "/var/lib/juju/agents/unit-failover-0/charm/lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py", line 787, in _promote_failover
main_cms = [cm for cm in cms if cm.app.id == orchestrators.main_app.id]
File "/var/lib/juju/agents/unit-failover-0/charm/lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py", line 787, in <listcomp>
main_cms = [cm for cm in cms if cm.app.id == orchestrators.main_app.id]
AttributeError: 'NoneType' object has no attribute 'id'
Additional context
Related to #555. The error is in _promote_failover but the failover shouldn't be promoted in this case as main is still the elected leader
The text was updated successfully, but these errors were encountered:
smethnani
changed the title
Large deployments remove-relation error in _promote_failover
Large deployments - remove-relation error in _promote_failoverFeb 27, 2025
Steps to reproduce
juju remove-relation failover main
Expected behavior
The relation should be removed
Actual behavior
Failover moves to error state with
hook failed: "peer-cluster-relation-departed"
Log output
Additional context
Related to #555. The error is in
_promote_failover
but the failover shouldn't be promoted in this case as main is still the elected leaderThe text was updated successfully, but these errors were encountered: