The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/5465
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) ===
From 51974ad68d22f6788c84dbc55841794687723376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <[email protected]> Date: Mon, 4 Feb 2019 17:41:22 +0100 Subject: [PATCH 1/2] lxd/containers: Always delete container on create error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <[email protected]> --- lxd/container_lxc.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go index 67b9510317..fb9809eff8 100644 --- a/lxd/container_lxc.go +++ b/lxd/container_lxc.go @@ -378,6 +378,7 @@ func containerLXCCreate(s *state.State, args db.ContainerArgs) (container, error volumeConfig := map[string]string{} err = storageVolumeFillDefault(storagePool, volumeConfig, pool) if err != nil { + c.Delete() return nil, err } From fef911ce4f2c405a04345c32040a1341b5e091a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <[email protected]> Date: Mon, 4 Feb 2019 17:41:29 +0100 Subject: [PATCH 2/2] lxd/containers: Fix disk limits at creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #5429 Signed-off-by: Stéphane Graber <[email protected]> --- lxd/container_lxc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go index fb9809eff8..d9e6174146 100644 --- a/lxd/container_lxc.go +++ b/lxd/container_lxc.go @@ -1449,6 +1449,11 @@ func (c *containerLXC) initLXC(config bool) error { } } + // Detect initial creation where the rootfs doesn't exist yet (can't mount it) + if !shared.PathExists(c.RootfsPath()) { + hasRootLimit = false + } + if hasDiskLimits { ourStart := false
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
