Skip to content

Commit

Permalink
Fixes after refactoring: removed accidentally deletted code (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ratushnyy authored Jun 27, 2023
1 parent dea17bc commit 49ae5e8
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,9 @@ def _on_mongod_pebble_ready(self, event) -> None:
event.defer()
return

if not self.get_secret("app", "keyfile"):
if self.unit.is_leader():
self._generate_secrets()
else:
logger.debug(
f"Defer on_mongod_pebble_ready for non-leader unit {self.unit.name}: keyfile not available yet."
)
event.defer()
return
try:
# mongod needs keyFile and TLS certificates on filesystem
self.push_tls_certificate_to_workload()
self._push_keyfile_to_workload(container)
self._pull_licenses(container)
self._set_data_dir_permissions(container)
Expand Down

0 comments on commit 49ae5e8

Please sign in to comment.