Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure docker in workspace works with fuse #8181

Merged
merged 1 commit into from
Feb 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions components/workspacekit/cmd/rings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down