The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8149

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Closes #8148

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 64b228ac675f3a6d13e17484ffb8dba7a6fb0327 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Thu, 12 Nov 2020 09:49:52 -0500
Subject: [PATCH] lxd-agent: Don't allow connections when rebooting
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #8148

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd-agent/main_agent.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lxd-agent/main_agent.go b/lxd-agent/main_agent.go
index f9939b5720..4d826813aa 100644
--- a/lxd-agent/main_agent.go
+++ b/lxd-agent/main_agent.go
@@ -99,6 +99,9 @@ func (c *cmdAgent) Run(cmd *cobra.Command, args []string) 
error {
                }
 
                shared.RunCommand("systemctl", "reboot")
+
+               // Wait up to 5min for the reboot to actually happen, if it 
doesn't, then move on to allowing connections.
+               time.Sleep(300 * time.Second)
        }
 
        // Mount shares from host.
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to