k3s/pkg/util/mount
Kubernetes Submit Queue 6369a10004
Merge pull request #58284 from mfojtik/findmnt-out
Automatic merge from submit-queue (batch tested with PRs 57868, 58284, 56370, 58400, 58439). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Show findmnt command output in case of error

**What this PR does / why we need it**:

We don't print the error output from the `findmnt` command, which makes it pretty hard to debug. 

The current implementation just print:

`
I0115 11:59:36.078285   18230 nsenter_mount.go:168] Failed findmnt command for path /var/lib/origin/openshift.local.volumes/pods/8d723ec8-f9e9-11e7-bc52-025000000001/volumes/kubernetes.io~secret/pvinstaller-token-bxh42: exit status 1
`

With this patch, we can actually see the error:

`
I0115 12:04:30.908164   23301 nsenter_mount.go:168] Failed findmnt command for path /var/lib/origin/openshift.local.volumes/pods/8ff8bb98-f9e9-11e7-bc52-025000000001/volumes/kubernetes.io~secret/deployer-token-g4sg9: nsenter: failed to execute /findmnt: No such file or directory
 exit status 1
`

**Release note**:
```release-note
NONE
```
2018-01-18 13:11:30 -08:00
..
BUILD Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
OWNERS Add jsafrane as util/mount approver. 2018-01-08 14:19:22 +01:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
exec.go Add Exec interface to VolumeHost 2017-08-14 12:16:25 +02:00
exec_mount.go Add ExecMounter 2017-11-10 13:14:40 +01:00
exec_mount_test.go Add ExecMounter 2017-11-10 13:14:40 +01:00
exec_mount_unsupported.go Fix cross-compliation of mount_exec.go 2017-11-14 16:30:00 +01:00
fake.go RBD Plugin: Prepare to implement Attacher/Detacher interfaces. 2017-10-25 17:07:27 +08:00
mount.go Fixed TearDown of NFS with root squash. 2018-01-08 14:01:33 +01:00
mount_linux.go Implement file system resizing support on kubelet start 2017-11-22 16:06:10 -05:00
mount_linux_test.go Share /var/lib/kubernetes on startup 2017-08-30 16:45:04 +02:00
mount_unsupported.go Tmpdir can be a symlink, also fake mount needs to call nested mounter 2017-11-03 22:21:29 -04:00
mount_windows.go Merge pull request #53629 from andyzhangx/azurefile-improve 2017-11-01 04:38:12 -07:00
mount_windows_test.go Merge pull request #53629 from andyzhangx/azurefile-improve 2017-11-01 04:38:12 -07:00
nsenter_mount.go Show findmt command output in case of error 2018-01-15 13:02:31 +01:00
nsenter_mount_test.go Fix findmnt parsing in containerized kubelet 2017-07-18 13:35:44 +02:00
nsenter_mount_unsupported.go use GetFileType per mount.Interface to check hostpath type 2017-09-26 09:57:06 +08:00
safe_format_and_mount_test.go RBD Plugin: Prepare to implement Attacher/Detacher interfaces. 2017-10-25 17:07:27 +08:00