]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: add stop and poststop commands to init container service
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 11 Dec 2023 20:44:41 +0000 (15:44 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 2 Jan 2024 14:30:21 +0000 (09:30 -0500)
Now that there is a more robust init_containers.run script, we can use
the new stop and poststop subcommands from the systemd unit.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadmlib/templates/init_ctr.service.j2

index 1562a5b18183ec7283ca61d87bdd6d90da95bc94..730d5043dece62ff322107d25e1ac1af02e70a62 100644 (file)
@@ -17,6 +17,8 @@ LimitNOFILE=1048576
 LimitNPROC=1048576
 EnvironmentFile=-/etc/environment
 ExecStart=/bin/bash {{ ctx.data_dir }}/{{ identity.fsid }}/%i/init_containers.run
+ExecStop=/bin/bash {{ ctx.data_dir }}/{{ identity.fsid }}/%i/init_containers.run stop
+ExecStopPost=-/bin/bash {{ ctx.data_dir }}/{{ identity.fsid }}/%i/init_containers.run  poststop
 Restart=on-failure
 RestartSec=10s
 TimeoutStopSec=120