k3s/pkg/util/mount
Kubernetes Submit Queue a426904009 Merge pull request #31515 from jsafrane/format-error
Automatic merge from submit-queue (batch tested with PRs 41714, 41510, 42052, 41918, 31515)

Show specific error when a volume is formatted by unexpected filesystem.

kubelet now detects that e.g. xfs volume is being mounted as ext3 because of
wrong volume.Spec.

Mount error is left in the error message to diagnose issues with mounting e.g.
'ext3' volume as 'ext4' - they are different filesystems, however kernel should
mount ext3 as ext4 without errors.

Example kubectl describe pod output:

```
  FirstSeen     LastSeen        Count   From                                    SubobjectPath   Type            Reason          Message
  41s           3s              7       {kubelet ip-172-18-3-82.ec2.internal}                   Warning         FailedMount     MountVolume.MountDevice failed for volume "kubernetes.io/aws-ebs/aws://us-east-1d/vol-ba79c81d" (spec.Name: "pvc-ce175cbb-6b82-11e6-9fe4-0e885cca73d3") pod "3d19cb64-6b83-11e6-9fe4-0e885cca73d3" (UID: "3d19cb64-6b83-11e6-9fe4-0e885cca73d3") with: failed to mount the volume as "ext4", it's already formatted with "xfs". Mount error: mount failed: exit status 32
Mounting arguments: /dev/xvdba /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-east-1d/vol-ba79c81d ext4 [defaults]
Output: mount: wrong fs type, bad option, bad superblock on /dev/xvdba,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
```
2017-02-25 02:17:57 -08:00
..
BUILD start the apimachinery repo 2017-01-11 09:09:48 -05:00
OWNERS Add owner file in /pkg/util/mount package 2017-02-06 10:51:26 -08:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
fake.go fix FakeMounter to work with OSX 2017-02-15 16:14:33 -08:00
mount.go Fix unmountDevice issue caused by shared mount in GCI 2016-12-08 13:34:45 -08:00
mount_linux.go Merge pull request #31515 from jsafrane/format-error 2017-02-25 02:17:57 -08:00
mount_linux_test.go Use fnv.New32a() in hash instead adler32 2017-02-15 14:03:54 +08:00
mount_unsupported.go Revert "Revert "Merge pull request #35821 from vishh/gci-mounter-scope"" 2016-11-08 11:09:10 -08:00
nsenter_mount.go fixed absense to absence 2016-10-14 16:28:46 +02:00
nsenter_mount_unsupported.go This change supports robust kubelet volume cleanup 2016-08-15 11:29:15 -07:00
safe_format_and_mount_test.go Enable lazy initialization of ext3/ext4 filesystems 2016-12-18 11:08:51 +01:00