Merge ~ogayot/curtin:flag-logical+swap into curtin:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Dan Bungert | ||||
Approved revision: | 3402978ee4b4e8aef5c1ce21dba04c8a9d03f931 | ||||
Merge reported by: | Server Team CI bot | ||||
Merged at revision: | not available | ||||
Proposed branch: | ~ogayot/curtin:flag-logical+swap | ||||
Merge into: | curtin:master | ||||
Diff against target: |
54 lines (+27/-1) 2 files modified
curtin/commands/block_meta_v2.py (+13/-1) tests/unittests/test_commands_block_meta.py (+14/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dan Bungert | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Review via email: mp+441769@code.launchpad.net |
Commit message
block_meta_v2: don't solely expect flag='logical' for logical partitions
Most of the time, a logical partition has its flag set to 'local'.
However, it some cases, it can also have flag set to 'swap', 'boot' and
possibly other values.
To determine if a partition is actually logical on a DOS partition
table, we need to check the partition number.
Description of the change
In block_meta_v2, we expect logical partitions to have their flag set to 'logical'. However, there are valid scenarios where this is a wrong assumption.
One use-case is the creation of a logical swap partition. This partition would end up with flag='swap' and not flag='logical' ; despite being a logical partition.
Despite being an unsupported use-case in Ubuntu, sometimes a bootable ESP partition is a logical partition.
In curtin's storage_config code, we have the following statement:
# if the boot flag is set, use this as the flag, logical
# flag is not required as we can determine logical via
# partition number
FAILED: Continuous integration, rev:80f3d638a3d 11a53400d8caa38 2fe75cc501de33 /jenkins. canonical. com/server- team/job/ curtin- ci/96/ /jenkins. canonical. com/server- team/job/ curtin- ci/nodes= metal-amd64/ 96/ /jenkins. canonical. com/server- team/job/ curtin- ci/nodes= metal-arm64/ 96/ /jenkins. canonical. com/server- team/job/ curtin- ci/nodes= metal-ppc64el/ 96/ /jenkins. canonical. com/server- team/job/ curtin- ci/nodes= metal-s390x/ 96/
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/server- team/job/ curtin- ci/96// rebuild
https:/