From 408a8bec60b4f5078a9c6f35ccd49ff723a96106 Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Tue, 21 Apr 2026 13:11:17 +0200 Subject: [PATCH] cc-containerd: stop managed containers earlier on shutdown Keep the shutdown helper active during normal system operation and run the managed container stop path from ExecStop when shutdown begins. This makes the container stop happen before the general system teardown, so network and CCCS are still available and reboot is less likely to block waiting for late shutdown ordering. Signed-off-by: Isaac Hermida --- .../files/cc-containerd-shutdown.service | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/meta-digi-containers/recipes-containers/cc-container-mng/files/cc-containerd-shutdown.service b/meta-digi-containers/recipes-containers/cc-container-mng/files/cc-containerd-shutdown.service index f9348fc07..88964ecab 100644 --- a/meta-digi-containers/recipes-containers/cc-container-mng/files/cc-containerd-shutdown.service +++ b/meta-digi-containers/recipes-containers/cc-container-mng/files/cc-containerd-shutdown.service @@ -1,15 +1,16 @@ [Unit] Description=Stop managed containers during system shutdown DefaultDependencies=no -Before=cccsd.service shutdown.target reboot.target halt.target poweroff.target kexec.target +After=cc-containerd.service network.target cccsd.service +Before=shutdown.target +Conflicts=shutdown.target [Service] Type=oneshot -ExecStart=/usr/bin/cc-containerd --config-file /etc/cc-container-mng.conf --stop-managed-containers +ExecStart=/bin/true +ExecStop=/usr/bin/cc-containerd --config-file /etc/cc-container-mng.conf --stop-managed-containers RemainAfterExit=yes +TimeoutStopSec=30 [Install] -WantedBy=reboot.target -WantedBy=halt.target -WantedBy=poweroff.target -WantedBy=kexec.target +WantedBy=multi-user.target