Skip to content

Commit 699f2d2

Browse files
committed
WIP: fixing view layers to create a new sandbox
Signed-off-by: Darren Stahl <[email protected]>
1 parent edec71c commit 699f2d2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

snapshots/windows/windows.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -297,21 +297,21 @@ func (s *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, k
297297
return nil, errors.Wrap(err, "failed to create snapshot")
298298
}
299299

300-
if kind == snapshots.KindActive {
301-
parentLayerPaths := s.parentIDsToParentPaths(newSnapshot.ParentIDs)
300+
//if kind == snapshots.KindActive {
301+
parentLayerPaths := s.parentIDsToParentPaths(newSnapshot.ParentIDs)
302302

303-
var parentPath string
304-
if len(parentLayerPaths) != 0 {
305-
parentPath = parentLayerPaths[0]
306-
}
307-
308-
if err := hcsshim.CreateSandboxLayer(s.info, newSnapshot.ID, parentPath, parentLayerPaths); err != nil {
309-
return nil, errors.Wrap(err, "failed to create sandbox layer")
310-
}
303+
var parentPath string
304+
if len(parentLayerPaths) != 0 {
305+
parentPath = parentLayerPaths[0]
306+
}
311307

312-
// TODO(darrenstahlmsft): Allow changing sandbox size
308+
if err := hcsshim.CreateSandboxLayer(s.info, newSnapshot.ID, parentPath, parentLayerPaths); err != nil {
309+
return nil, errors.Wrap(err, "failed to create sandbox layer")
313310
}
314311

312+
// TODO(darrenstahlmsft): Allow changing sandbox size
313+
//}
314+
315315
if err := t.Commit(); err != nil {
316316
return nil, errors.Wrap(err, "commit failed")
317317
}

0 commit comments

Comments
 (0)