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

[RHELC-1780] Fix bad grub2-mkconfig call on UEFI EL9+ #1444

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

danmyway
Copy link
Member

@danmyway danmyway commented Dec 2, 2024

The output of the grub2-mkconfig call suggests to not use /boot/efi/EFI/redhat/grub.cfg as an output file, but use the /boot/grub2/grub.cfg instead.
Check what major version of OS is running and assign the grub config variable based on that.
Additionally, make the grub config into a variable inside the remediation - do not always advise to use the /boot/efi/EFI/redhat/grub.cfg
Reformat the action message.

Jira Issues:

Checklist

  • PR has been tested manually in a VM (either author or reviewer)
  • Jira issue has been made public if possible
  • [RHELC-] or [HMS-] is part of the PR title
  • Label depicting the kind of PR it is
  • PR title explains the change from the user's point of view
  • Code and tests are documented properly
  • The commits are squashed to as few commits as possible (without losing data)
  • When merged: Jira issue has been updated to Release Pending if relevant

The output of the `grub2-mkconfig` call suggests to not use
/boot/efi/EFI/redhat/grub.cfg as an output file, but use the
/boot/grub2/grub.cfg instead.
Check what major version of OS is running and assign the grub config
variable based on that.
Additionally make the grub config into a variable inside the remediation
- do not always advise to use /boot/efi/EFI/redhat/grub.cfg
Reformat the action message.

Signed-off-by: Daniel Diblik <[email protected]>
@danmyway danmyway added kind/bug-fix A bug has been fixed tests/skip This PR does not require integration tests to be run. labels Dec 2, 2024
@danmyway danmyway requested a review from a team as a code owner December 2, 2024 13:27
@has-bot
Copy link
Member

has-bot commented Dec 2, 2024

This PR does not require integration tests to be run.


Comment generated by an automation.

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.12%. Comparing base (02fa48a) to head (6a69cd2).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1444   +/-   ##
=======================================
  Coverage   96.12%   96.12%           
=======================================
  Files          72       72           
  Lines        5186     5186           
  Branches      896      896           
=======================================
  Hits         4985     4985           
  Misses        119      119           
  Partials       82       82           
Flag Coverage Δ
centos-linux-7 91.65% <100.00%> (ø)
centos-linux-8 92.50% <100.00%> (ø)
centos-linux-9 92.62% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danmyway
Copy link
Member Author

danmyway commented Dec 2, 2024

For reviewers:
The grub2 regeneration action message formatting was kind of awkward.
See:

(WARNING) UPDATE_GRUB::GRUB2_CONFIG_CREATION_FAILED - The grub2-mkconfig call
    failed to complete
     Description: The grub2-mkconfig call failed with output: 'Running
`grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg' will overwrite the GRUB
wrapper.
    Please run `grub2-mkconfig -o /boot/grub2/grub.cfg' instead to update
grub.cfg.
    GRUB configuration file was not updated.
    '. The conversion will continue but there may be issues with the current
grub2 config and image formats.
     Diagnosis: N/A
     Remediations: If there are issues with the current grub2 config and image
we recommend manually re-generating them with 'grub2-mkconfig -o
/boot/efi/EFI/redhat/grub.cfg' and'grub2-install [block device, e.g. /dev/sda]'.

@danmyway
Copy link
Member Author

danmyway commented Dec 2, 2024

The plan which triggered the issue is scheduled here: https://artifacts.osci.redhat.com/testing-farm/e931c267-6758-43a4-bb4b-a888885b51e0

@danmyway danmyway changed the title [RHELC-1780] Fix bad grub2-mkconfig call on EL9+ [RHELC-1780] Fix bad grub2-mkconfig call on UEFI EL9+ Dec 2, 2024
@danmyway
Copy link
Member Author

danmyway commented Dec 2, 2024

EL9 plan is PASSing
Triggered the same test plan on EL8 just for a good measure
https://artifacts.osci.redhat.com/testing-farm/eadc1b04-f550-4f2e-9885-f1913653ea68/

@bocekm bocekm merged commit 860ad70 into oamg:main Dec 2, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix A bug has been fixed tests/skip This PR does not require integration tests to be run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants