From 72c78e0e1c5d4ce9b721b7c698e5b48a9b1e3c88 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 11 Jan 2017 16:20:20 +0100 Subject: [PATCH] tools/lxc-start: remove c->is_defined(c) check We do not check here whether the container is defined, because we support volatile containers. Which means the container does not need to be created for it to be started. You can just pass a configuration file as argument and start the container right away. Signed-off-by: Christian Brauner --- src/lxc/tools/lxc_start.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c index f5aa24bce..3c17ea0f9 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -286,10 +286,11 @@ int main(int argc, char *argv[]) } } - if (!c->is_defined(c)) { - fprintf(stderr, "Error: container %s is not defined\n", c->name); - goto out; - } + /* We do not check here whether the container is defined, because we + * support volatile containers. Which means the container does not need + * to be created for it to be started. You can just pass a configuration + * file as argument and start the container right away. + */ if (!c->may_control(c)) { fprintf(stderr, "Insufficent privileges to control %s\n", c->name); -- 2.47.2