Skip to content

Commit

Permalink
skip config change if workload container is not ready (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulomach authored Jun 26, 2024
1 parent 60969ba commit addcbc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ def _on_peer_relation_joined(self, _) -> None:

def _on_config_changed(self, _: EventBase) -> None:
"""Handle the config changed event."""
container = self.unit.get_container(CONTAINER_NAME)
if not container.can_connect():
# configuration also take places on pebble ready handler
return

if not self._is_peer_data_set:
# skip when not initialized
return
Expand Down

0 comments on commit addcbc3

Please sign in to comment.