Skip to content

Commit

Permalink
cpud: print fstab mount errors
Browse files Browse the repository at this point in the history
In most cases when we get an error "CPUD: your $PWD is not in the
remote namespace", it is due to some missing mounts, for example,
a mount target dir does not exist on the remote machine. Printing
out the mount errors helps debugging.

Signed-off-by: Changyuan Lyu <[email protected]>
  • Loading branch information
Lencerf committed Oct 8, 2024
1 parent 1e03968 commit bb3ac0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (s *Session) Run() error {
if tab, ok := os.LookupEnv(fstab); ok {
verbose("Mounting %q", tab)
if err := mount.Mount(tab); err != nil {
verbose("fstab mount failure: %v", err)
log.Printf("fstab mount failure: %v", err)
// Should we die if the mounts fail? For now, we think not;
// the user may be able to debug. Just record that it failed.
s.fail = true
Expand Down

0 comments on commit bb3ac0f

Please sign in to comment.