aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2022-12-17 14:15:12 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-05-09 08:13:10 +0900
commitc17270bbef3959bc7dbfdf20f68d2a7f70bb818a (patch)
tree7844497f1f4d0ac7dc48238c106602d9a9790f99
parentbf1617a36fe4e1932772a12604e13fd4f5c463f4 (diff)
Disable guest reboot by lxc-monitor
When guest container use reboot command, lxc-monitor will reboot guest automatically. In this case, the container management daemon catch exit from guest init, but it cant reboot guest. This mean container manager can't re-assign dynamic devices. This patch disable automatic reboot. Bug-AGL: SPEC-4777 Change-Id: I3fbd3fca61db29e483b782b0db9c64707b3e488c Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
-rw-r--r--meta-agl-ic-container/recipes-container/lxc/files/0001-Remove-container-automatic-rebooting.patch34
-rw-r--r--meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend4
2 files changed, 35 insertions, 3 deletions
diff --git a/meta-agl-ic-container/recipes-container/lxc/files/0001-Remove-container-automatic-rebooting.patch b/meta-agl-ic-container/recipes-container/lxc/files/0001-Remove-container-automatic-rebooting.patch
new file mode 100644
index 00000000..5cf5e370
--- /dev/null
+++ b/meta-agl-ic-container/recipes-container/lxc/files/0001-Remove-container-automatic-rebooting.patch
@@ -0,0 +1,34 @@
+From f7ca4f954b8c69ca23d089cb5fdbe8970816b2c6 Mon Sep 17 00:00:00 2001
+From: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
+Date: Sun, 4 Dec 2022 23:34:03 +0900
+Subject: [PATCH] Remove container automatic rebooting
+
+When guest container use reboot command, lxc-monitor will reboot guest automatically.
+In this case, container management daemon catch exit from guest init, but it cant
+reboot guest. This mean container manager can't re-assign dynamic devices.
+This patch disable automatic reboot.
+
+Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
+---
+ src/lxc/lxccontainer.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
+index 4363340b3..6649f12f6 100644
+--- a/src/lxc/lxccontainer.c
++++ b/src/lxc/lxccontainer.c
+@@ -1124,11 +1124,6 @@ reboot:
+ ret = lxc_start(argv, handler, c->config_path, c->daemonize,
+ &c->error_num);
+
+- if (conf->reboot == REBOOT_REQ) {
+- INFO("Container requested reboot");
+- conf->reboot = REBOOT_INIT;
+- goto reboot;
+- }
+
+ on_error:
+ if (c->pidfile) {
+--
+2.25.1
+
diff --git a/meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend b/meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend
index 1b78edfa..cbfc6135 100644
--- a/meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend
+++ b/meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend
@@ -1,6 +1,7 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += " \
+ file://0001-Remove-container-automatic-rebooting.patch \
file://lxc.service \
file://lxc-net.service \
"
@@ -37,6 +38,3 @@ FILES:${PN}-networking += " \
# This needs to be replaced with a rework of the upstream packaging
# to do a proper split of core from the template support.
RDEPENDS:${PN} = ""
-
-
-