(fyi - I've pushed this to staging to lxc-clone to work again.)

Switch lxcapi_clone to use the non-locking is_stopped_locked() instead
of c->is_running.

Technically as (IIRC) Dwight has mentioned we should probably drop the
locking from api_state() altogether, since those are protected through the
lxc command system.

Signed-off-by: Serge Hallyn <serge.hal...@ubuntu.com>
---
 src/lxc/lxccontainer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index 2ea9556..b34b8e8 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -1827,7 +1827,7 @@ struct lxc_container *lxcapi_clone(struct lxc_container 
*c, const char *newname,
        if (container_mem_lock(c))
                return NULL;
 
-       if (c->is_running(c)) {
+       if (!is_stopped_locked(c)) {
                ERROR("error: Original container (%s) is running", c->name);
                goto out;
        }
-- 
1.8.1.2


------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to