From c55fa432bf4b449b5760e9d95a1e46887a4be250 Mon Sep 17 00:00:00 2001 From: jamesbeedy Date: Mon, 1 Jul 2024 16:03:03 +0000 Subject: [PATCH 1/2] stop and start munge when writing the munge key Fixes: #24 --- src/charm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/charm.py b/src/charm.py index 6c7aba2..1de68a2 100755 --- a/src/charm.py +++ b/src/charm.py @@ -96,8 +96,11 @@ def _on_slurmctld_available(self, event: SlurmctldAvailableEvent) -> None: if (jwt := event.jwt_rsa) is not None: self._slurmdbd_ops_manager.write_jwt_rsa(jwt) + if (munge_key := event.munge_key) is not None: + self._slurmdbd_ops_manager.stop_munge() self._slurmdbd_ops_manager.write_munge_key(munge_key) + self._slurmdbd_ops_manager.start_munge() self._write_config_and_restart_slurmdbd(event) From aa2a3354ea6c6ebe3185ad9e36e166c21e8fb762 Mon Sep 17 00:00:00 2001 From: jamesbeedy Date: Wed, 3 Jul 2024 16:30:43 +0000 Subject: [PATCH 2/2] fix linting --- src/charm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/charm.py b/src/charm.py index 1de68a2..517b182 100755 --- a/src/charm.py +++ b/src/charm.py @@ -96,7 +96,7 @@ def _on_slurmctld_available(self, event: SlurmctldAvailableEvent) -> None: if (jwt := event.jwt_rsa) is not None: self._slurmdbd_ops_manager.write_jwt_rsa(jwt) - + if (munge_key := event.munge_key) is not None: self._slurmdbd_ops_manager.stop_munge() self._slurmdbd_ops_manager.write_munge_key(munge_key)