From d3b3d7ff3c249de062df93a533a568f0681cce3c Mon Sep 17 00:00:00 2001
From: Kevin Carter <kevin.carter@rackspace.com>
Date: Sat, 13 Jun 2015 13:56:26 -0500
Subject: [PATCH] Fix the lxc container restart state

The lxc container restart state does not ensure that the container
is in fact started unless another config or command is passed into
the task. to fix this the module simply needs to have the function
call added ``self._container_startup()`` after the container is
put into a stopped state.

Signed-off By: Kevin Carter <kevin.carter@rackspace.com>
---
 cloud/lxc/lxc_container.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cloud/lxc/lxc_container.py b/cloud/lxc/lxc_container.py
index 18555e2e351..7fc86825c52 100644
--- a/cloud/lxc/lxc_container.py
+++ b/cloud/lxc/lxc_container.py
@@ -1065,6 +1065,9 @@ class LxcContainerManagement(object):
                 self.container.stop()
                 self.state_change = True
 
+            # Run container startup
+            self._container_startup()
+
             # Check if the container needs to have an archive created.
             self._check_archive()