From 02f020e76854879d06c76e2db7dfd017c823bed5 Mon Sep 17 00:00:00 2001 From: Thomas Schubart Date: Sun, 13 Feb 2022 19:38:35 +0000 Subject: [PATCH] Ensure docker in workspace works with fuse --- components/workspacekit/cmd/rings.go | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/components/workspacekit/cmd/rings.go b/components/workspacekit/cmd/rings.go index fdef6b25d99332..7d4a8c4d9e26f4 100644 --- a/components/workspacekit/cmd/rings.go +++ b/components/workspacekit/cmd/rings.go @@ -398,7 +398,7 @@ var ring1Cmd = &cobra.Command{ procLoc := filepath.Join(ring2Root, "proc") err = os.MkdirAll(procLoc, 0755) if err != nil { - log.WithError(err).Error("cannot mount proc") + log.WithError(err).Error("cannot create directory for mounting proc") return } @@ -829,20 +829,6 @@ func pivotRoot(rootfs string, fsshift api.FSShiftMethod) error { // with pivot_root this allows us to pivot without creating directories in // the rootfs. Shout-outs to the LXC developers for giving us this idea. - if fsshift == api.FSShiftMethod_FUSE { - err := unix.Chroot(rootfs) - if err != nil { - return xerrors.Errorf("cannot chroot: %v", err) - } - - err = unix.Chdir("/") - if err != nil { - return xerrors.Errorf("cannot chdir to new root :%v", err) - } - - return nil - } - oldroot, err := unix.Open("/", unix.O_DIRECTORY|unix.O_RDONLY, 0) if err != nil { return err