Disable guest reboot by lxc-monitor
[AGL/meta-agl-devel.git] / meta-agl-ic-container / recipes-container / lxc / files / 0001-Remove-container-automatic-rebooting.patch
1 From f7ca4f954b8c69ca23d089cb5fdbe8970816b2c6 Mon Sep 17 00:00:00 2001
2 From: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
3 Date: Sun, 4 Dec 2022 23:34:03 +0900
4 Subject: [PATCH] Remove container automatic rebooting
5
6 When guest container use reboot command, lxc-monitor will reboot guest automatically.
7 In this case, container management daemon catch exit from guest init, but it cant
8 reboot guest.  This mean container manager can't re-assign dynamic devices.
9 This patch disable automatic reboot.
10
11 Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
12 ---
13  src/lxc/lxccontainer.c | 5 -----
14  1 file changed, 5 deletions(-)
15
16 diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
17 index 4363340b3..6649f12f6 100644
18 --- a/src/lxc/lxccontainer.c
19 +++ b/src/lxc/lxccontainer.c
20 @@ -1124,11 +1124,6 @@ reboot:
21                 ret = lxc_start(argv, handler, c->config_path, c->daemonize,
22                                 &c->error_num);
23  
24 -       if (conf->reboot == REBOOT_REQ) {
25 -               INFO("Container requested reboot");
26 -               conf->reboot = REBOOT_INIT;
27 -               goto reboot;
28 -       }
29  
30  on_error:
31         if (c->pidfile) {
32 -- 
33 2.25.1
34