Skip to content

Commit

Permalink
[DPE-1956] Add a backup user
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ratushnyy committed Jun 28, 2023
1 parent d4e2891 commit f97cdf9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def _on_start(self, event) -> None:
event.defer()
return

if not container.exists(Config.SOCKET_PATH):
if not self._socket_exists(container):
logger.debug("The mongod socket is not ready yet.")
event.defer()
return
Expand Down Expand Up @@ -779,6 +779,9 @@ def _connect_mongodb_exporter(self) -> None:
# Restart changed services and start startup-enabled services.
container.replan()

def _socket_exists(self, container) -> bool:
return container.exists(Config.SOCKET_PATH)

# END: helper functions

# BEGIN: static methods
Expand Down

0 comments on commit f97cdf9

Please sign in to comment.