From d9a1c34e43e837b1d1cc607883499baafca5802c Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Thu, 10 Jun 2021 09:51:57 +0000 Subject: Fix restoring of privileged containers Checkpointed containers started with --privileged fail during restore with: Error: error creating container storage: ProcessLabel and Mountlabel must either not be specified or both specified This commit fixes it by not setting the labels when restoring a privileged container. [NO TESTS NEEDED] Signed-off-by: Adrian Reber --- libpod/container_internal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/container_internal.go b/libpod/container_internal.go index f77825efd..6fbd706a0 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -427,7 +427,7 @@ func (c *Container) setupStorage(ctx context.Context) error { }, LabelOpts: c.config.LabelOpts, } - if c.restoreFromCheckpoint { + if c.restoreFromCheckpoint && !c.config.Privileged { // If restoring from a checkpoint, the root file-system // needs to be mounted with the same SELinux labels as // it was mounted previously. -- cgit v1.2.3-54-g00ecf