[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 <guillaume.boutry@canonical.com>
This commit is contained in:
Guillaume Boutry 2025-02-12 12:18:42 +01:00
parent c303cd6fb1
commit fba9eac56a
No known key found for this signature in database
GPG Key ID: 0DD77DC1796E98CD

View File

@ -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,