From 49ae5e835827536ebb08a6af441457d58942b979 Mon Sep 17 00:00:00 2001 From: Dmitry Ratushnyy <132273757+dmitry-ratushnyy@users.noreply.github.com> Date: Tue, 27 Jun 2023 15:09:51 +0200 Subject: [PATCH] Fixes after refactoring: removed accidentally deletted code (#170) --- src/charm.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/charm.py b/src/charm.py index 9cea5ec53..e9d545f9d 100755 --- a/src/charm.py +++ b/src/charm.py @@ -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)