Skip to content

Commit 8257fbc

Browse files
committed
mgr/cephadm: skip keepalive deployment until haproxy has been deployed
We need the haproxy daemons in order to be able to populate the keepalive conf with targets for keepalive to check the health of. Before deploying in parallel, this worked as we would do prepare_create and deployment for each daemon sequentially and would deploy haproxy before keepalived. Now that we're doing all the prepare_create steps first and then deploying in parallel, keepalived's prepare_create will fail unless we've already deployed haproxy daemons for that service. Signed-off-by: Adam King <[email protected]> (cherry picked from commit 96ddd28) Resolves: rhbz#2372821
1 parent a9421ee commit 8257fbc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/pybind/mgr/cephadm/serve.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,17 @@ def prep_daemon_specs_for_creation_by_service(self, spec: ServiceSpec, slots_to_
11291129
if service_type == 'rgw':
11301130
self.mgr.rgw_service.set_realm_zg_zone(cast(RGWSpec, spec))
11311131

1132+
if service_type == 'ingress':
1133+
ingress_spec = cast(IngressSpec, spec)
1134+
if slot.daemon_type == 'keepalived' and not ingress_spec.keepalive_only:
1135+
if not self.mgr.cache.get_daemons_by_service(spec.service_name()):
1136+
# prepare_create for keepalive will fail in this case as
1137+
# we need to deploy haproxy daemons first in order to have targets
1138+
# for keepalive to check the health of. For that reason,
1139+
# we'll skip the keepalive daemon(s) and deploy them once
1140+
# the serve loop comes back around after deploying haproxy
1141+
continue
1142+
11321143
# deploy new daemon
11331144
daemon_id = slot.name
11341145

0 commit comments

Comments
 (0)