mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-01 02:22:11 +02:00
coreos-base/oem-gce: bring back shutdown scripts
In the `init.sh` of the OEM GCE container, we have the following section: ```bash wait -n "${daemon_pids[@]}" || : kill "${daemon_pids[@]}" || : test -n "$stopping" || exit 1 exec /usr/bin/google_metadata_script_runner --script-type shutdown ``` `shutdown` script was not executed because container was receiving a `SIGKILL`, the started processes was not properly terminated. According to the `systemd-nspawn` manual: ```bash If --boot is not used and this option is not specified the container's processes are terminated abruptly via SIGKILL ``` Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
parent
b6526733fb
commit
ebb6f281e7
@ -25,7 +25,7 @@ ExecStartPre=/usr/bin/umount /var/lib/flatcar-oem-gce.img
|
|||||||
Environment=SYSTEMD_NSPAWN_API_VFS_WRITABLE=1
|
Environment=SYSTEMD_NSPAWN_API_VFS_WRITABLE=1
|
||||||
ExecStart=/usr/bin/systemd-nspawn --keep-unit --register=no --link-journal=no \
|
ExecStart=/usr/bin/systemd-nspawn --keep-unit --register=no --link-journal=no \
|
||||||
--machine=oem-gce --capability=CAP_NET_ADMIN --bind=/dev/log --bind=/run/systemd --tmpfs=/run/lock --bind=/etc --bind=/home --bind-ro=/usr/share/google-oslogin/nsswitch.conf \
|
--machine=oem-gce --capability=CAP_NET_ADMIN --bind=/dev/log --bind=/run/systemd --tmpfs=/run/lock --bind=/etc --bind=/home --bind-ro=/usr/share/google-oslogin/nsswitch.conf \
|
||||||
--read-only --volatile=overlay --image=/var/lib/flatcar-oem-gce.img /init.sh
|
--read-only --volatile=overlay --image=/var/lib/flatcar-oem-gce.img --kill-signal=SIGTERM /init.sh
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user