From fba9eac56ac465acfacbc07f9004dfc9dd94173c Mon Sep 17 00:00:00 2001 From: Guillaume Boutry Date: Wed, 12 Feb 2025 12:18:42 +0100 Subject: [PATCH] [gnocchi-k8s] Configure containers instead of init Because init_container_services was not replaced with configure_containers, gnocchi tried to bootstrap its database before ceph was configured. Change-Id: I55dc6b92dbc61ff8744d18f5f27b3dc4b836f7c2 Signed-off-by: Guillaume Boutry --- charms/gnocchi-k8s/src/charm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charms/gnocchi-k8s/src/charm.py b/charms/gnocchi-k8s/src/charm.py index ed666c97..f775303a 100755 --- a/charms/gnocchi-k8s/src/charm.py +++ b/charms/gnocchi-k8s/src/charm.py @@ -335,7 +335,7 @@ class GnocchiCephOperatorCharm(GnocchiOperatorCharm): handlers.append(self.ceph) return handlers - def init_container_services(self): + def configure_containers(self): """Setp ceph keyring and init pebble handlers that are ready.""" for ph in self.pebble_handlers: if ph.pebble_ready: @@ -367,16 +367,16 @@ class GnocchiCephOperatorCharm(GnocchiOperatorCharm): ], exception_on_error=True, ) - ph.init_service(self.contexts()) + ph.configure_container(self.contexts()) else: logging.debug( - f"Not running init for {ph.service_name}," + f"Not running configure containers for {ph.service_name}," " container not ready" ) raise sunbeam_guard.WaitingExceptionError( "Payload container not ready" ) - super().init_container_services() + super().configure_containers() def default_container_configs( self,