From c6d767fc75f13d6cbf0e2d635a045eeeebd454b4 Mon Sep 17 00:00:00 2001 From: Michael Wan Date: Mon, 21 Jan 2019 04:19:05 -0500 Subject: [PATCH] bugfix: make sure SnapshotID not empty when start container Signed-off-by: Michael Wan --- daemon/mgr/container.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/mgr/container.go b/daemon/mgr/container.go index e42dd41d82..97b712b074 100644 --- a/daemon/mgr/container.go +++ b/daemon/mgr/container.go @@ -760,9 +760,10 @@ func (mgr *ContainerManager) createContainerdContainer(ctx context.Context, c *C IO: mgr.IOs.Get(c.ID), RootFSProvided: c.RootFSProvided, BaseFS: c.BaseFS, - SnapshotID: c.SnapshotID, } c.Unlock() + // make sure the SnapshotID got a proper value + ctrdContainer.SnapshotID = c.SnapshotKey() if checkpointID != "" { checkpointDir, err = mgr.getCheckpointDir(c.ID, checkpointDir, checkpointID, false)