Azure / Azure/kubernetes-volume-drivers

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

Open
#35 0 comments 1 reaction 0 assignees View on GitHub
help wanted
Dominant language
Shell
Stars
127
Forks
62
Avg merge
1d 23h
Merged PRs (30d)
2

Description

**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)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with the invalid CIFS source and the manual mount command shown in the issue. Trace how the volume driver captures and reports the mount command's error output; done means the Kubernetes FailedMount message preserves the complete multi-line error instead of only its last line.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, shell
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.