Merge ~raharper/curtin:fix/uefi-remove-duplicate-entries into curtin:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Ryan Harper | ||||
Approved revision: | 77bcff3fc6d5e1959000d3fa552acf5007d8b2f3 | ||||
Merge reported by: | Server Team CI bot | ||||
Merged at revision: | not available | ||||
Proposed branch: | ~raharper/curtin:fix/uefi-remove-duplicate-entries | ||||
Merge into: | curtin:master | ||||
Diff against target: |
286 lines (+140/-25) 6 files modified
curtin/commands/curthooks.py (+37/-18) curtin/util.py (+4/-2) examples/tests/uefi_reuse_esp.yaml (+2/-0) helpers/common (+0/-2) tests/unittests/test_curthooks.py (+85/-2) tests/unittests/test_util.py (+12/-1) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Chad Smith | Approve | ||
Review via email: mp+379675@code.launchpad.net |
Commit message
uefi: refactor efibootmg handling to support removing duplicate entries
When curtin is reusing an existing ESP, it may already contain a previous
ubuntu entry. efibootmgr complains about duplicate labels, but does not
provide a mechanism to remove the duplicate automatically. In curtin
we use our efibootmgr output parser to find duplicates and remove them.
To enable this we need to ensure that 'efivarfs' is mounted inside the
target. In ChrootableTarget we will add the additional mount automatically
if we're running on a uefi system.
This branch also refactors use of ChrootableTarget context manager to
minimize the number of chroot calls (which include 4 mounts and unmounts).
LP: #1864257
PASSED: Continuous integration, rev:14b7e262c94 eeecd1391355bd1 f7ecafe688fc6c /jenkins. ubuntu. com/server/ job/curtin- ci/3846/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-arm64/ 3846/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-ppc64el/ 3846/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-s390x/ 3846/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= torkoal/ 3846/
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/curtin- ci/3846/ /rebuild
https:/