Start ovn-northd service

Start ovn-northd service as part of
configure_charm.
Remove get_named_pebble_handlers as
it is moved to ops_sunbeam library.

Change-Id: I01792aa0a7b7fc00e692b0074afcaab84abc6008
This commit is contained in:
Hemanth Nakkina 2022-09-26 10:37:54 +05:30
parent 103e2ba813
commit 1abb5415ae

View File

@ -318,14 +318,6 @@ class OVNCentralOperatorCharm(sunbeam_charm.OSBaseOperatorCharm):
.format(str(connection['_uuid']), k, v))
connections.set(str(connection['_uuid']), k, v)
def get_named_pebble_handlers(self, container_names):
# XXX Move to ASO
return [
h
for h in self.pebble_handlers
if h.container_name in container_names
]
def configure_charm(self, event: ops.framework.EventBase) -> None:
"""Catchall handler to configure charm services.
@ -409,7 +401,13 @@ class OVNCentralOperatorCharm(sunbeam_charm.OSBaseOperatorCharm):
# Attempt to setup listers etc
self.configure_ovn()
# Start ovn-northd service
ph = self.get_named_pebble_handler(OVN_NORTHD_CONTAINER)
ph.start_service()
# Add healthchecks to the plan
# Healthchecks are added after bootstrap process is completed
# to avoid container restarts during bootstraping
for ph in self.pebble_handlers:
ph.add_healthchecks()