Skip to content

Commit addcbc3

Browse files
authored
skip config change if workload container is not ready (#445)
1 parent 60969ba commit addcbc3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/charm.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,11 @@ def _on_peer_relation_joined(self, _) -> None:
460460

461461
def _on_config_changed(self, _: EventBase) -> None:
462462
"""Handle the config changed event."""
463+
container = self.unit.get_container(CONTAINER_NAME)
464+
if not container.can_connect():
465+
# configuration also take places on pebble ready handler
466+
return
467+
463468
if not self._is_peer_data_set:
464469
# skip when not initialized
465470
return

0 commit comments

Comments
 (0)