Merge "Reorder ceph shutdown to after containers"

This commit is contained in:
Zuul 2023-03-14 21:04:43 +00:00 committed by Gerrit Code Review
commit 406b7b49d8

View File

@ -990,19 +990,31 @@ for name in $what; do
shopt -s nullglob shopt -s nullglob
OSD_SERVICES=$(for svc in /run/systemd/system/ceph-osd*.service; do basename $svc; done | xargs echo) OSD_SERVICES=$(for svc in /run/systemd/system/ceph-osd*.service; do basename $svc; done | xargs echo)
for d in /run/systemd/system/ceph-osd*.d; do for d in /run/systemd/transient/ceph-osd*.scope; do
cat <<EOF > $d/starlingx-overrides.conf do_cmd "mkdir -p $d.d"
cat <<EOF > $d.d/starlingx-overrides.conf
[Unit] [Unit]
Before=docker.service Before=containerd.service
After=sm-shutdown.service After=sm-shutdown.service
EOF EOF
done done
for d in /run/systemd/system/ceph-mon*.d; do for d in /run/systemd/transient/ceph-mds*.scope; do
cat <<EOF > $d/starlingx-overrides.conf do_cmd "mkdir -p $d.d"
cat <<EOF > $d.d/starlingx-overrides.conf
[Unit] [Unit]
Before=docker.service Before=containerd.service
After=sm-shutdown.service
EOF
done
for d in /run/systemd/transient/ceph-mon*.scope; do
do_cmd "mkdir -p $d.d"
cat <<EOF > $d.d/starlingx-overrides.conf
[Unit]
Before=containerd.service
After=sm-shutdown.service ${OSD_SERVICES} After=sm-shutdown.service ${OSD_SERVICES}
EOF EOF