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

When mount fails, only last line of mount error log is displayed #35

Open
bbgobie opened this issue Aug 29, 2019 · 0 comments
Open

When mount fails, only last line of mount error log is displayed #35

bbgobie opened this issue Aug 29, 2019 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@bbgobie
Copy link

bbgobie commented Aug 29, 2019

What happened:
Invalid options provided to mount
What you expected to happen:
Error message with complete error message from mount -t cifs
How to reproduce it:
As an example, try and mount an invalid source "//wrong_ip/wrong_folder/wrong_path"
You will get an error like this

Warning FailedMount 1s (x5 over 10s) kubelet, vm MountVolume.SetUp failed for volume "storage" : mount command failed, status: Failure, reason: Failed to mount device at /var/lib/kubelet/pods/1be02505-ca96-11e9-8d81-1a622cf0b151/volumes/microsoft.com~smb/storage, user:x, //wrong_ip/wrong_folder/wrong_path, options: vers=3.0,dir_mode=0777,file_mode=0777, error log:Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

The error message should be something like
Warning FailedMount 1s (x5 over 10s) kubelet, vm MountVolume.SetUp failed for volume "storage" : mount command failed, status: Failure, reason: Failed to mount device at /var/lib/kubelet/pods/1be02505-ca96-11e9-8d81-1a622cf0b151/volumes/microsoft.com~smb/storage, user:x, //wrong_ip/wrong_folder/wrong_path, options: vers=3.0,dir_mode=0777,file_mode=0777, error log:mount error(22): Invalid argument\nRefer to the mount.cifs(8) manual page (e.g. man mount.cifs)

If you try and do the mount manually you will see the proper message
root@vm:/home/ubuntu# /bin/mount -t cifs "//wrong_ip/wrong_folder/wrong_path" "/tmp/dir" -o "vers=3.0,dir_mode=0777,file_mode=0777"
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

@andyzhangx andyzhangx added the help wanted Extra attention is needed label Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants