1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-05-07 04:58:57 +00:00

arm-autonomy/xenguest-init: fix guest shutdown issues after host reboot

This patch contain following changes:
 * xenguest-init stop action uses now blocking call,
   and additional 'xl destroy guest' call if normal shutdown has failed.
 * xenguest-init stop action stops only running guest.
 * xenguest-init script is now caled before xen-tools scripts
   on host shutdown or reboot.
 * xenguest-network-bridge script is now called before ifupdown script
   on host shutdown or reboot.

Change-Id: I46e307fd0ad36b2e35559b4e8a071be9bbc50e34
Issue-Id: SCM-1632
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Kamil Dziezyk
2020-11-13 11:19:31 +01:00
committed by Jon Mason
parent 55daf196a6
commit 9a2847c0d6
3 changed files with 7 additions and 3 deletions
@@ -65,8 +65,10 @@ case "$1" in
;;
stop)
echo "Stopping xenguest"
# update guest list
guestlist=$(xenguest-manager status | grep Running | cut -d ":" -f1)
for f in ${guestlist}; do
/usr/bin/xenguest-manager stop ${f}
xl shutdown -w ${f} || xl destroy ${f}
done
;;
reload)
@@ -21,8 +21,9 @@ XENGUEST_MANAGER_VOLUME_NAME ?= "vg-xen"
XENGUEST_MANAGER_GUEST_DIR ?= "${datadir}/guests/"
# We add an init script to create and start guests automatically
# run start script after xen-tools and run stop script before xen-tools
INITSCRIPT_NAME = "xenguest"
INITSCRIPT_PARAMS = "defaults 90"
INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 79 0 1 6 ."
inherit update-rc.d
@@ -29,9 +29,10 @@ PACKAGES =+ "${PN}-kea-dhcp4"
# Bridge configurator needs to run before S01networking init script
# Prefix with a_ to make sure it is executed in runlevel 01 before others
# run start script before ifupdown and run stop script after ifupdown
INITSCRIPT_PACKAGES = "${PN} ${PN}-kea-dhcp4"
INITSCRIPT_NAME_${PN} = "a_xenguest-network-bridge"
INITSCRIPT_PARAMS_${PN} = "defaults 01"
INITSCRIPT_PARAMS_${PN} = "start 01 2 3 4 5 . stop 81 0 1 6 ."
# Kea configuration needs to be restored before kea init scripts:
# Kea dhcp4 server is 30, so lets use 20, to have higher priority