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

Update actor.py to support NVMe device enumeration #98

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

N3WWN
Copy link

@N3WWN N3WWN commented Feb 26, 2024

When attempting to upgrade CentOS 7 systems with UEFI and software RAID1 on top of NVMe disks, the upgrade fails during Finalization with the following:

leapp.libraries.stdlib.CalledProcessError: Command ['/sbin/efibootmgr', '-c', '-d', '/dev/nvme0n1p', '-p', '3', '-l', '\\EFI\rocky\\shimx64.efi', '-L', 'Rocky Linux'] failed with exit code 5

The failure is due to efidev being parsed into /dev/nvme0n1p instead of /dev/nvme0n1. (NVMe device enumeration follows a different format than most typical non-NVMe block devices.)

This was confirmed with leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.19.noarch / leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.19.noarch.

This PR modifies devparts to check if the argument contains '/dev/nvme' and, if so, generated dev and part slightly differently.

Before this PR, /usr/share/leapp-repository/repositories/system_upgrade/common/actors/efibootorderfix/finalization/actor.py attempts to execute:
/sbin/efibootmgr -c -d /dev/nvme0n1p -p 3 -l \\EFI\rocky\\shimx64.efi -L 'Rocky Linux'
and
/sbin/efibootmgr -c -d /dev/nvme0n2p -p 3 -l \\EFI\rocky\\shimx64.efi -L 'Rocky Linux'
which have misnamed devices. The failure is triggered when the first command is reached.

After this PR, the device names are correct and the actor attempts to execute:
/sbin/efibootmgr -c -d /dev/nvme0n1 -p 3 -l \\EFI\rocky\\shimx64.efi -L 'Rocky Linux'
and
/sbin/efibootmgr -c -d /dev/nvme0n2 -p 3 -l \\EFI\rocky\\shimx64.efi -L 'Rocky Linux'.

Copy link

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable.
If you want to re-run tests or request review, you can use following commands as a comment:

  • leapp-ci build to run copr build and e2e tests in OAMG CI
  • review please to notify leapp developers of review request

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra.

@andrewlukoshko andrewlukoshko merged commit fd92fe5 into AlmaLinux:almalinux Apr 23, 2024
1 check passed
@andrewlukoshko
Copy link
Member

Thanks for the contribution @N3WWN ! We'll release updated packages soon.

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.

2 participants