Unverified Commit f8f3f667 by Christian Brauner Committed by GitHub

Merge pull request #2559 from ssup2/master

start: Fix net iface remaining issue
parents 501751d0 78852a0c
...@@ -1662,6 +1662,20 @@ static int lxc_spawn(struct lxc_handler *handler) ...@@ -1662,6 +1662,20 @@ static int lxc_spawn(struct lxc_handler *handler)
return -1; return -1;
} }
if (conf->shmount.path_host) {
if (!conf->shmount.path_cont) {
lxc_sync_fini(handler);
return -1;
}
ret = lxc_setup_shmount(conf);
if (ret < 0) {
ERROR("Failed to setup shared mount point");
lxc_sync_fini(handler);
return -1;
}
}
if (handler->ns_clone_flags & CLONE_NEWNET) { if (handler->ns_clone_flags & CLONE_NEWNET) {
if (!lxc_list_empty(&conf->network)) { if (!lxc_list_empty(&conf->network)) {
...@@ -1683,26 +1697,11 @@ static int lxc_spawn(struct lxc_handler *handler) ...@@ -1683,26 +1697,11 @@ static int lxc_spawn(struct lxc_handler *handler)
ret = lxc_create_network_priv(handler); ret = lxc_create_network_priv(handler);
if (ret < 0) { if (ret < 0) {
ERROR("Failed to create the network"); ERROR("Failed to create the network");
lxc_sync_fini(handler); goto out_delete_net;
return -1;
} }
} }
} }
if (conf->shmount.path_host) {
if (!conf->shmount.path_cont) {
lxc_sync_fini(handler);
return -1;
}
ret = lxc_setup_shmount(conf);
if (ret < 0) {
ERROR("Failed to setup shared mount point");
lxc_sync_fini(handler);
return -1;
}
}
if (!cgroup_init(handler)) { if (!cgroup_init(handler)) {
ERROR("Failed initializing cgroup support"); ERROR("Failed initializing cgroup support");
goto out_delete_net; goto out_delete_net;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment