Skip to content

Commit c522976

Browse files
authored
Merge pull request ceph#62525 from phlogistonjohn/jjm-sidecar-redeploy
cephadm: stop sidecar systemd units when restarting main units Reviewed-by: Adam King <[email protected]>
2 parents 0a79c71 + cc2872c commit c522976

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/cephadm/cephadm.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,17 @@ def deploy_daemon_units(
11291129
verbosity=CallVerbosity.DEBUG)
11301130
call(ctx, ['systemctl', 'reset-failed', unit_name],
11311131
verbosity=CallVerbosity.DEBUG)
1132+
1133+
# TODO: this should happen automatically some day
1134+
sd_path_info = systemd_unit.sidecars_from_dropin(
1135+
systemd_unit.PathInfo(ctx.unit_dir, ident), missing_ok=True
1136+
)
1137+
for sc_unit in sd_path_info.sidecar_unit_files.values():
1138+
call(ctx, ['systemctl', 'stop', sc_unit.name],
1139+
verbosity=CallVerbosity.DEBUG)
1140+
call(ctx, ['systemctl', 'reset-failed', sc_unit.name],
1141+
verbosity=CallVerbosity.DEBUG)
1142+
11321143
if enable:
11331144
call_throws(ctx, ['systemctl', 'enable', unit_name])
11341145
if start:

0 commit comments

Comments
 (0)