When mount fails, only last line of mount error log is displayed
bbgobie opened this issue · 0 comments
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)