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

add e2fsprogs #1147

Merged
merged 3 commits into from
Oct 6, 2020
Merged

add e2fsprogs #1147

merged 3 commits into from
Oct 6, 2020

Conversation

bcressey
Copy link
Contributor

@bcressey bcressey commented Oct 5, 2020

Issue number:
#877

Description of changes:
Package e2fsprogs and add to the default install via release.

This enables the kubelet functionality to format volumes prior to mount, which is used by both the (deprecated) in-tree volume plugins as well as the local volume static provisioner.

This also fixes a packaging error with libdbus that I caught while building this package.

Testing done:
Confirmed that kubelet was able to format and mount a local disk.

kubelet[3181]: I1002 18:08:18.390523    3181 reconciler.go:209] operationExecutor.VerifyControllerAttachedVolume started for volume "default-token-l2fwp" (UniqueName: "kubernetes.io/secret/a5746ea4-57a4-46ba-8807-ebd46c316093-default-token-l2fwp") pod "local-test-0" (UID: "a5746ea4-57a4-46ba-8807-ebd46c316093")
kubelet[3181]: I1002 18:08:18.509952    3181 mount_linux.go:287] `fsck` error fsck from util-linux 2.36
kubelet[3181]: fsck.ext2: Bad magic number in super-block while trying to open /dev/nvme2n1
kubelet[3181]: /dev/nvme2n1:
kubelet[3181]: The superblock could not be read or does not describe a valid ext2/ext3/ext4
kubelet[3181]: filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
kubelet[3181]: filesystem (and not swap or ufs or something else), then the superblock
kubelet[3181]: is corrupt, and you might try running e2fsck with an alternate superblock:
kubelet[3181]:     e2fsck -b 8193 <device>
kubelet[3181]:  or
kubelet[3181]:     e2fsck -b 32768 <device>
kubelet[3181]: E1002 18:08:18.532275    3181 mount_linux.go:140] Mount failed: exit status 32
kubelet[3181]: Mounting command: systemd-run
kubelet[3181]: Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/plugins/kubernetes.io/local-volume/mounts/local-pv-f041dd31 --scope -- mount -t ext4 -o defaults /dev/disk/is-ephemeral/nvme2n1 /var/lib/kubelet/plugins/kubernetes.io/local-volume/mounts/local-pv-f041dd31
kubelet[3181]: Output: mount: /var/lib/kubelet/plugins/kubernetes.io/local-volume/mounts/local-pv-f041dd31: wrong fs type, bad option, bad superblock on /dev/nvme2n1, missing codepage or helper program, or other error.
kubelet[3181]: I1002 18:08:18.539414    3181 mount_linux.go:322] Disk "/dev/disk/is-ephemeral/nvme2n1" appears to be unformatted, attempting to format as type: "ext4" with options: [-F -m0 /dev/disk/is-ephemeral/nvme2n1]
kubelet[3181]: I1002 18:08:24.547764    3181 mount_linux.go:326] Disk successfully formatted (mkfs): ext4 - /dev/disk/is-ephemeral/nvme2n1 /var/lib/kubelet/plugins/kubernetes.io/local-volume/mounts/local-pv-f041dd31
kubelet[3181]: I1002 18:08:24.577716    3181 operation_generator.go:587] MountVolume.MountDevice succeeded for volume "local-pv-f041dd31" (UniqueName: "kubernetes.io/local-volume/local-pv-f041dd31") pod "local-test-0" (UID: "a5746ea4-57a4-46ba-8807-ebd46c316093") device mount path "/var/lib/kubelet/plugins/kubernetes.io/local-volume/mounts/local-pv-f041dd31"

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

packages/e2fsprogs/e2fsprogs.spec Show resolved Hide resolved
packages/e2fsprogs/e2fsprogs.spec Outdated Show resolved Hide resolved
packages/e2fsprogs/mke2fs.conf Outdated Show resolved Hide resolved
Signed-off-by: Ben Cressey <[email protected]>
The attribution file was incorrectly omitted from the package by the
bulk exclusion on the /usr/share path.

While we're in here, fix a minor warning about paths listed twice.

Signed-off-by: Ben Cressey <[email protected]>
kubelet supports formatting an unformatted volume prior to mount, but
only if the filesystem tools are available.

We could scope this as a kubelet dependency, but the tools are useful
for debugging, and their absence could come as an unpleasant surprise
in other variants.

Signed-off-by: Ben Cressey <[email protected]>
@bcressey bcressey merged commit 1f33ae2 into bottlerocket-os:develop Oct 6, 2020
@bcressey bcressey deleted the e2fsprogs branch February 15, 2021 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants