Skip to content

Commit

Permalink
bugfix: make sure SnapshotID not empty when start container
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Wan <zirenwan@gmail.com>
  • Loading branch information
HusterWan committed Jan 22, 2019
1 parent 554b734 commit c6d767f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion daemon/mgr/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c6d767f

Please sign in to comment.