Skip to content

Commit 55540b3

Browse files
authored
[ws-daemon] mount nfs in workspace network (#20404)
1 parent 0aabebc commit 55540b3

File tree

1 file changed

+1
-1
lines changed
  • components/ws-daemon/pkg/iws

1 file changed

+1
-1
lines changed

components/ws-daemon/pkg/iws/iws.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ func (wbs *InWorkspaceServiceServer) MountNfs(ctx context.Context, req *api.Moun
766766
}
767767

768768
log.WithField("source", req.Source).WithField("target", req.Target).WithField("staging", nodeStaging).WithField("args", req.Args).Info("Mounting nfs")
769-
cmd := exec.CommandContext(ctx, "mount", "-t", "nfs4", "-o", req.Args, req.Source, nodeStaging)
769+
cmd := exec.CommandContext(ctx, "nsenter", "-n", "-t", strconv.Itoa(int(supervisorPID)), "mount", "-t", "nfs4", "-o", req.Args, req.Source, nodeStaging)
770770
cmd.Stderr = os.Stderr
771771
cmd.Stdin = os.Stdin
772772

0 commit comments

Comments
 (0)