Skip to content

Commit f042cd0

Browse files
committed
perform cleanup of pause image layers for hypervisor isolation
Presently, during the cleanup workflow, we were skipping the cleanup of image layers for pause container. This was because the cleanup happened automatically since the UVM was terminated. With multi-pod feature, that is not true and hence we are performing pause image cleanup in all cases. Signed-off-by: Harsh Rawat <[email protected]>
1 parent 88f8c92 commit f042cd0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

internal/hcsoci/resources_lcow.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@ func allocateLinuxResources(ctx context.Context, coi *createOptionsInternal, r *
3535
return errors.Wrap(err, "failed to mount container storage")
3636
}
3737
coi.Spec.Root.Path = rootPath
38-
// If this is the pause container in a hypervisor-isolated pod, we can skip cleanup of
39-
// layers, as that happens automatically when the UVM is terminated.
40-
if !isSandbox || coi.HostingSystem == nil {
41-
r.SetLayers(closer)
42-
}
38+
r.SetLayers(closer)
4339
r.SetLcowScratchPath(scratchPath)
4440
} else if coi.Spec.Root.Path != "" {
4541
// This is the "Plan 9" root filesystem.

0 commit comments

Comments
 (0)