Merge lp:~raharper/curtin/trunk.fix-lp1718699 into lp:~curtin-dev/curtin/trunk
Status: | Merged |
---|---|
Approved by: | Scott Moser |
Approved revision: | 541 |
Merged at revision: | 537 |
Proposed branch: | lp:~raharper/curtin/trunk.fix-lp1718699 |
Merge into: | lp:~curtin-dev/curtin/trunk |
Diff against target: |
272 lines (+143/-35) 7 files modified
curtin/block/clear_holders.py (+13/-0) curtin/commands/block_meta.py (+15/-19) curtin/commands/block_wipe.py (+4/-0) curtin/commands/clear_holders.py (+1/-1) examples/tests/bcache-wipe-xfs.yaml (+74/-0) tests/unittests/test_commands_block_meta.py (+11/-15) tests/vmtests/test_bcache_bug1718699.py (+25/-0) |
To merge this branch: | bzr merge lp:~raharper/curtin/trunk.fix-lp1718699 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Scott Moser (community) | Approve | ||
Review via email: mp+332660@code.launchpad.net |
Description of the change
block: handle wiping bcache parts
In some cases block devices may have bcache parts which are owned by the
block layer but are not assembled into a bcache device. The result is that
curtin fails to get exclusive opens when attempting to wipe the device.
Resolve this by testing if a volume has a 'bcache' directory under sysfs
and issuing the appropriate stop commands before wiping.
It's also possible for old "buried" metadata for bcache or lvm or raid
at particular partition offsets. Once curtin starts partitioning the
device the bcache kernel layer "finds" the parts and claims device
ownership and prevents wiping of the partition. We resolve this issue
by having curtin wipe 1M at the location of the partition before we
actually create it.
Fix 'curtin clear-holders' subcommand.
LP: #1718699
FAILED: Continuous integration, rev:538 /jenkins. ubuntu. com/server/ job/curtin- ci/664/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-amd64/ 664/console /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-arm64/ 664/console /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-ppc64el/ 664/console /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-s390x/ 664/console
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/curtin- ci/664/ rebuild
https:/