If we relate opensearch with Identity platform while Opensearch is still installing, then Opensearch crashes.
error connecting to /tmp/tmux-0/default (No such file or directory)
/usr/share/byobu/profiles/tmux:29: /share/byobu/keybindings/tmux-screen-keys.conf: No such file or directory [0/This is a Juju debug-hooks tmux session. Remember:
1. You need to execute hooks/actions manually if you want them to run for trapped events.
2. When you are finished with an event, you can run 'exit' to close the current window and allow Juju to continue processing
new events for this unit without exiting a current debug-session.
3. To run an action or hook and end the debugging session avoiding processing any more events manually, use:
./dispatch
tmux kill-session -t opensearch/0 # or, equivalently, CTRL+a d
4. CTRL+a is tmux prefix.
More help and info is available in the online documentation:
https://juju.is/docs/olm/debug-charm-hooks
root@juju-c3e759-0:/var/lib/juju/agents/unit-opensearch-0/charm# ./dispatch
2026-02-04 12:44:55,713 DEBUG ops 2.23.1 up and running.
2026-02-04 12:44:55,752 WARNING Testing profile is used. This profile is not suitable for production use and should only be used for testing purposes.
2026-02-04 12:44:55,761 DEBUG Re-emitting deferred event <RelationCreatedEvent app='self-signed-certificates' unit=None on <ops.model.Relation certificates:4> via OpenSearchOperatorCharm/on/certificates_relation_created[13]>.
2026-02-04 12:44:55,772 DEBUG self._app_workload_container_version='98' self._unit_workload_container_versions={'opensearch/0': '98'}
2026-02-04 12:44:55,777 DEBUG Deferring <RelationCreatedEvent app='self-signed-certificates' unit=None on <ops.model.Relation certificates:4> via OpenSearchOperatorCharm/on/certificates_relation_created[13]>.
2026-02-04 12:44:55,783 DEBUG Emitting Juju event oauth_relation_created.
2026-02-04 12:44:55,811 ERROR Uncaught exception while in charm code:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-opensearch-0/charm/src/charm.py", line 215, in <module>
main(OpenSearchOperatorCharm)
File "/var/lib/juju/agents/unit-opensearch-0/charm/venv/lib/python3.12/site-packages/ops/main.py", line 39, in main
return _main.main(charm_class=charm_class, use_juju_for_storage=use_juju_for_storage)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/lib/juju/agents/unit-opensearch-0/charm/venv/lib/python3.12/site-packages/ops/_main.py", line 502, in main
manager.run()
File "/var/lib/juju/agents/unit-opensearch-0/charm/venv/lib/python3.12/site-packages/ops/_main.py", line 486, in run
self._emit()
File "/var/lib/juju/agents/unit-opensearch-0/charm/venv/lib/python3.12/site-packages/ops/_main.py", line 421, in _emit
self._emit_charm_event(self.dispatcher.event_name)
File "/var/lib/juju/agents/unit-opensearch-0/charm/venv/lib/python3.12/site-packages/ops/_main.py", line 465, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-opensearch-0/charm/venv/lib/python3.12/site-packages/ops/framework.py", line 351, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-opensearch-0/charm/venv/lib/python3.12/site-packages/ops/framework.py", line 924, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-opensearch-0/charm/venv/lib/python3.12/site-packages/ops/framework.py", line 1030, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-opensearch-0/charm/lib/charms/opensearch/v0/opensearch_oauth.py", line 74, in _on_oauth_relation_created
if self.charm.opensearch_peer_cm.deployment_desc().typ != DeploymentType.MAIN_ORCHESTRATOR:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'typ'
Description
If we relate opensearch with Identity platform while Opensearch is still installing, then Opensearch crashes.
juju consume admin/oauth.hydra
juju relate opensearch admin/oauth.hydra