]> git.proxmox.com Git - mirror_lxc.git/commitdiff
start: make netnsid allocation failures non-fatal
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 11 Aug 2018 00:23:16 +0000 (02:23 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 11 Aug 2018 00:26:03 +0000 (02:26 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index 2485472e257de670e64a0ac08c59d70766adbc4a..35a2bed04864b5aef547caf09d8c0f99de548be8 100644 (file)
@@ -1821,10 +1821,11 @@ static int lxc_spawn(struct lxc_handler *handler)
 
                ret = lxc_netns_set_nsid(handler->nsfd[LXC_NS_NET]);
                if (ret < 0) {
-                       ERROR("Failed to allocate new network namespace id: %d", ret);
-                       goto out_delete_net;
+                       errno = -ret;
+                       SYSERROR("Failed to allocate new network namespace id");
+               } else {
+                       TRACE("Allocated new network namespace id");
                }
-               TRACE("Allocated new network namespace id");
        }
 
        /* Create the network configuration. */