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

blockdev+install updates #680

Merged
merged 4 commits into from
Jul 15, 2024
Merged

Conversation

cgwalters
Copy link
Collaborator

This series is prep for


blockdev: Get more properties

  • Add partlabel in prep for ppc64le bootloader bits
  • Add maj_min and start which we want for s390x
  • Clearly move the filesystesm-related bits to a separate
    section

Signed-off-by: Colin Walters walters@verbum.org


blockdev: Backfill start if missing

This way we continue to support the version of util-linux in C9S
today.

Signed-off-by: Colin Walters walters@verbum.org


blockdev: Use -b for lsblk, hard require size property

I noticed that the JSON format inconsistently uses human-readable
sizes for some properties, but not others. size happens to
be one of the ones were it outputs human readable. But I think
we will often want to operate on the raw byte value on our
own, so let's tell lsblk to just give us raw numbers and
do formatting where needed.

While we're here, just hard require the size property.
I don't think any block devices can be missing this.

Signed-off-by: Colin Walters walters@verbum.org


install: Gather blockdev info early in filesystem phase

The bootloader logic in general is going to need to
query the block layout. But especially for ppc64le and s390x
we'll need this data.

Gather it early on as global state so it's accessible
to the entire install to-filesystem phase. Note that
we shouldn't be mutating the blockdev setup in
to-filesystem.

Signed-off-by: Colin Walters walters@verbum.org


- Add `partlabel` in prep for ppc64le bootloader bits
- Add `maj_min` and `start` which we want for s390x
- Clearly move the filesystesm-related bits to a separate
  section

Signed-off-by: Colin Walters <walters@verbum.org>
This way we continue to support the version of util-linux in C9S
today.

Signed-off-by: Colin Walters <walters@verbum.org>
I noticed that the JSON format inconsistently uses human-readable
sizes for some properties, but not others. `size` happens to
be one of the ones were it outputs human readable. But I think
we will often want to operate on the raw byte value on our
own, so let's tell lsblk to just give us raw numbers and
do formatting where needed.

While we're here, just hard require the `size` property.
I don't think any block devices can be missing this.

Signed-off-by: Colin Walters <walters@verbum.org>
The bootloader logic in general is going to need to
query the block layout. But especially for ppc64le and s390x
we'll need this data.

Gather it early on as global state so it's accessible
to the entire `install to-filesystem` phase. Note that
we shouldn't be mutating the blockdev setup in
`to-filesystem`.

Signed-off-by: Colin Walters <walters@verbum.org>
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

lgtm

@jmarrero jmarrero merged commit f74eab9 into containers:main Jul 15, 2024
20 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install Issues related to `bootc install`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants