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

fix: wait 12 hours before halt on media check fail #2545

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdamWill
Copy link
Contributor

If a modesetting driver has been loaded by the time the media check happens, halting the system (as we currently do immediately if the check fails) blanks the screen, which is confusing for the user. This adds a warning message and a 12-hour wait before the system is eventually halted, so the user can see the media check failure and (presumably) reboot and fix the medium.

It also tweaks the text of the failure message not to call it a "CD check", since it's not 1998 any more.

https://bugzilla.redhat.com/show_bug.cgi?id=2246410

Checklist

  • I have tested it locally
  • [-] I have reviewed and updated any documentation if relevant
  • [-] I am providing new code and test(s) for it

If a modesetting driver has been loaded by the time the media
check happens, halting the system (as we currently do immediately
if the check fails) blanks the screen, which is confusing for
the user. This adds a warning message and a 12-hour wait before
the system is eventually halted, so the user can see the media
check failure and (presumably) reboot and fix the medium.

It also tweaks the text of the failure message not to call it a
"CD check", since it's not 1998 any more.

https://bugzilla.redhat.com/show_bug.cgi?id=2246410

Signed-off-by: Adam Williamson <[email protected]>
@github-actions github-actions bot added modules Issue tracker for all modules dmsquash-live Issues related to the dmsquash-live module labels Oct 30, 2023
@AdamWill
Copy link
Contributor Author

Note, this fixes the problem for live images. Traditional installer images use a different codepath that lives in anaconda, I will send a PR for anaconda to fix the same problem on that path.

@LaszloGombos
Copy link
Collaborator

LaszloGombos commented Oct 30, 2023

This magic number (12 hours) does not make sense to me. How is waiting this long improves the situation for the user ?

Also, #2332 somewhat related, especially the following point..

For some remote/unattended setup this could even damage the HW.. perhaps poweroff at least safer for the HW.

initramfs images usually not configured for proper power management - e.g. on a laptop this might be fan blasting full speed for a half day.

@LaszloGombos LaszloGombos added the enhancement Issue adding new functionality label Oct 30, 2023
@AdamWill
Copy link
Contributor Author

AdamWill commented Oct 30, 2023

the situation we're concerned about is that the user starts the media check and wanders off to do something else. we want them to come back to a useful error message, not a mysterious blank screen (or, with 2332, powered-off system).

I considered various values from a minute upwards. 12 hours was nirik's suggestion.

@AdamWill
Copy link
Contributor Author

AdamWill commented Oct 30, 2023

As for the "unattended" case - presumably, if you choose to run the media check, you're in a position to power off the system after noticing it failed.

@AdamWill
Copy link
Contributor Author

btw, I wasn't necessarily expecting this to be merged as-is, I was hoping someone had a better idea somehow. But I thought it was good enough for F39 at least, and wanted to submit it upstream before doing the downstream build.

@LaszloGombos
Copy link
Collaborator

LaszloGombos commented Mar 12, 2024

We also have "rd.debug" in our toolbox. I think dracut already recommends setting "rd.debug" to debug dracut issues for the NOT unattended case.

Users should not just reboot and try again. They should reboot set "rd.debug" in the bootloader and try again instead.

Perhaps if "rd.debug" is NOT set, poweroff is still the best possible action (with not much of a wait).
If and only if "rd.debug" is set, having a long timeout (or even waiting for input before taking an action) is very reasonable.

Crossposted also at #2332 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dmsquash-live Issues related to the dmsquash-live module enhancement Issue adding new functionality modules Issue tracker for all modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants