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

overlay/growfs: handle broken lsblk in el8 #900

Merged
merged 2 commits into from
Mar 19, 2021

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Mar 18, 2021

Sometimes lsblk returns devices in the wrong order, so we can't rely
on it to iterate over the devices in hierarchical order. Instead, use
the holders/ directory ourselves directly and use --nodeps when
calling lsblk.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1934174#c4
See: https://bugzilla.redhat.com/show_bug.cgi?id=1940607
See: coreos/coreos-installer#453

Since we've created a new filesystem anyway.

This implicitly also works around the service racing against the
`by-label/root` symlink not being up to date after reprovisioning (which
`ignition-ostree-transposefs-restore.service` now intercepts and fixes).
Sometimes `lsblk` returns devices in the wrong order, so we can't rely
on it to iterate over the devices in hierarchical order. Instead, use
the `holders/` directory ourselves directly and use `--nodeps` when
calling `lsblk`.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1934174#c4
See: https://bugzilla.redhat.com/show_bug.cgi?id=1940607
See: coreos/coreos-installer#453
@jlebon
Copy link
Member Author

jlebon commented Mar 18, 2021

(And yes, we want to rewrite this into a compiled language eventually. At the very least so we can use lsblk --json instead. See discussions in coreos/fedora-coreos-tracker#570.)

@jlebon jlebon marked this pull request as ready for review March 18, 2021 18:48
Copy link
Member

@travier travier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weak LGTM from me (no testing). The eval calls make me sad 😢

@mike-nguyen
Copy link
Member

Tested the nvme and non nvme case. Both successfully grew to fill the disk.

@jlebon jlebon merged commit 5228316 into coreos:testing-devel Mar 19, 2021
@jlebon jlebon deleted the pr/fix-lsblk branch March 19, 2021 16:47
jlebon added a commit to jlebon/os that referenced this pull request Mar 19, 2021
I.e. coreos/fedora-coreos-config#900 (for
https://bugzilla.redhat.com/show_bug.cgi?id=1934863) and
coreos/fedora-coreos-config#903 (for
https://bugzilla.redhat.com/show_bug.cgi?id=1940966).

```
Jonathan Lebon (8):
      overrides: pin to kernel-5.10.19-200.fc33 for rootless podman
      image.yaml: bump virtual disk images to 10G
      manifest: use `mkdir -p` for resolved.conf.d/ dir
      overlay: don't restamp rootfs UUID if reprovisioning
      overlay/growfs: handle broken lsblk in el8
      tests/misc-ro: check for prjquota
      tests/root-reprovision: use `ok` and `fatal` helpers
      overlay: always use prjquota for XFS rootfs

Luca BRUNO (2):
      fedora-coreos-base: add nm-cloud-setup, forward platform variables
      lockfile: refresh after manifest changes

Sohan Kunkerkar (1):
      overrides: fast-track coreos-installer 0.8.0
```
jlebon added a commit to jlebon/os that referenced this pull request Mar 19, 2021
I.e. coreos/fedora-coreos-config#900 (for
https://bugzilla.redhat.com/show_bug.cgi?id=1934863) and
coreos/fedora-coreos-config#903 (for
https://bugzilla.redhat.com/show_bug.cgi?id=1940966).

```
Jonathan Lebon (5):
      overlay: don't restamp rootfs UUID if reprovisioning
      overlay/growfs: handle broken lsblk in el8
      tests/misc-ro: check for prjquota
      tests/root-reprovision: use `ok` and `fatal` helpers
      overlay: always use prjquota for XFS rootfs
```
miabbott pushed a commit to jlebon/os that referenced this pull request Mar 22, 2021
I.e. coreos/fedora-coreos-config#900 (for
https://bugzilla.redhat.com/show_bug.cgi?id=1934863) and
coreos/fedora-coreos-config#903 (for
https://bugzilla.redhat.com/show_bug.cgi?id=1940966).

```
Jonathan Lebon (5):
      overlay: don't restamp rootfs UUID if reprovisioning
      overlay/growfs: handle broken lsblk in el8
      tests/misc-ro: check for prjquota
      tests/root-reprovision: use `ok` and `fatal` helpers
      overlay: always use prjquota for XFS rootfs
```
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.

None yet

3 participants