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

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) ===
Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 362906682d3551a0d1a727081cab708627bea904 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Wed, 6 Apr 2016 13:02:57 -0400
Subject: [PATCH] Have ActiveIfNeeded trigger if we have running containers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

diff --git a/lxd/main.go b/lxd/main.go
index ca1245c..2983efb 100644
--- a/lxd/main.go
+++ b/lxd/main.go
@@ -505,6 +505,10 @@ func cmdActivateIfNeeded() error {
                lastState := config["volatile.last_state.power"]
                autoStart := config["boot.autostart"]
 
+               if c.IsRunning() {
+                       shared.Debugf("Daemon has running containers, 
activating...")
+               }
+
                if lastState == "RUNNING" || lastState == "Running" || 
autoStart == "true" {
                        shared.Debugf("Daemon has auto-started containers, 
activating...")
                        _, err := lxd.NewClient(&lxd.DefaultConfig, "local")
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to