Merge ~mwhudson/curtin:fix-multipath-partition-verification-2 into curtin:master
Status: | Merged |
---|---|
Approved by: | Michael Hudson-Doyle |
Approved revision: | 283184ef83e46c5643da4b58c349343aabef1737 |
Merge reported by: | Server Team CI bot |
Merged at revision: | not available |
Proposed branch: | ~mwhudson/curtin:fix-multipath-partition-verification-2 |
Merge into: | curtin:master |
Diff against target: |
183 lines (+33/-41) 4 files modified
curtin/block/__init__.py (+8/-4) curtin/block/multipath.py (+4/-4) tests/unittests/test_block.py (+9/-27) tests/unittests/test_block_multipath.py (+12/-6) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Ryan Harper (community) | Approve | ||
Review via email: mp+396462@code.launchpad.net |
Commit message
block: fixes for verifying existing multipath partitions
Verifying a partition on a multipath disk currently fails for two
reasons:
1. get_blockdev_
partition to a multipath disk, so sfdisk_info ends up calling sfdisk
on the partition, which fails.
2. sfdisk --json /dev/dm-X prints /dev/mapper paths for the partition
paths but compares them against the fully deferenced /dev/dm-Y path
for the partition.
2 is easily fixed by resolving symlinks before comparing nodes. 1
can be fixed with a little udev poking but then sys_block_path
returns paths like /sys/class/
a multipath disk, which doesn't exist. Luckily, nodes for
partitions exist directly in /sys/class/block and have done since
/sys/class/block was added in 2008 (see kernel commit
edfaa7c36574f1b
the call to get_blockdev_
Description of the change
This is like https:/
PASSED: Continuous integration, rev:8c6388a8970 c5154cd244ffb5d 8afaad2bdfa9ca /jenkins. ubuntu. com/server/ job/curtin- ci/65/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-amd64/ 65/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-arm64/ 65/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-ppc64el/ 65/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-s390x/ 65/
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/65// rebuild
https:/