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

Don't log a bogus warning when kickstart specifies a disk label #6085

Merged

Conversation

AdamWill
Copy link
Contributor

@AdamWill AdamWill commented Jan 7, 2025

When this code was introduced back in c0c04cc , it used blivet 1.0 platform.setDefaultDiskLabelType, which checked whether the requested label was in the platform's supported labels, and returned False immediately if it wasn't.

However, in mid-2017, blivet 2.0 made a big API change, and the equivalent method - DiskLabel.set_default_label_type - does not check the requested label in any way, and never returns anything. It just assumes whatever you passed is OK, sets it, and (implicitly) returns None.

anaconda was updated to use the new method, but the "log a warning if it doesn't return" logic was left in place. So now we always log this warning. We do actually always set the label type, but the message is confusing.

When this code was introduced back in c0c04cc , it used blivet
1.0 platform.setDefaultDiskLabelType, which checked whether the
requested label was in the platform's supported labels, and
returned False immediately if it wasn't.

However, in mid-2017, blivet 2.0 made a big API change, and the
equivalent method - `DiskLabel.set_default_label_type` - does
not check the requested label in any way, and never returns
anything. It just assumes whatever you passed is OK, sets it,
and (implicitly) returns None.

anaconda was updated to use the new method, but the "log a
warning if it doesn't return" logic was left in place. So now we
always log this warning. We do actually always set the label
type, but the message is confusing.

Signed-off-by: Adam Williamson <[email protected]>
@github-actions github-actions bot added the f42 Fedora 42 label Jan 7, 2025
Copy link
Member

@jkonecny12 jkonecny12 left a comment

Choose a reason for hiding this comment

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

Looks good to me. But I would like to know @vojtechtrefny opinion before merging.

@jkonecny12
Copy link
Member

/kickstart-test --testtype smoke

@jkonecny12 jkonecny12 merged commit 91fe91a into rhinstaller:main Jan 8, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f42 Fedora 42
Development

Successfully merging this pull request may close these issues.

3 participants