Merge lp:~raharper/curtin/trunk.fix-lp1722322 into lp:~curtin-dev/curtin/trunk
Status: | Merged |
---|---|
Merged at revision: | 533 |
Proposed branch: | lp:~raharper/curtin/trunk.fix-lp1722322 |
Merge into: | lp:~curtin-dev/curtin/trunk |
Diff against target: |
66 lines (+29/-2) 3 files modified
curtin/commands/block_meta.py (+5/-1) examples/tests/uefi_basic.yaml (+23/-0) tests/vmtests/test_uefi_basic.py (+1/-1) |
To merge this branch: | bzr merge lp:~raharper/curtin/trunk.fix-lp1722322 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Scott Moser | 2017-10-09 | Approve on 2017-10-11 | |
Server Team CI bot | continuous-integration | Approve on 2017-10-11 | |
Review via email:
|
Description of the change
block_meta: use block.wipe_
In the case curtin is not directed to wipe the partition table via the
wipe: configuration, a disk may contain an MBR and sgdisk --clear does
not successfully wipe MBR tables. Replace the call to sgdisk with curtin
block.wipe_
LP: 1722322
Ryan Harper (raharper) wrote : | # |
PASSED: Continuous integration, rev:533
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Scott Moser (smoser) wrote : | # |
The dirty disks mode we have just lets the existing config mode pass through.
We can just as easily call curtin-blockmeta with an arbitrary config.
It was just easiest (and immediately effective) to inherit the config from the install environment.
it'd be easy enough to make the 'Injecting early_command to dirty storage devices' code that is in vmtests/__init__.py accept 'cls.dirty_disks' be a config itself or a path to one (rather than just boolean). Then generate a portion of the config that would write the different config.
Ryan Harper (raharper) wrote : | # |
> The dirty disks mode we have just lets the existing config mode pass through.
> We can just as easily call curtin-blockmeta with an arbitrary config.
>
> It was just easiest (and immediately effective) to inherit the config from the
> install environment.
yeah, I ended up just using a different early command to lay down an MBR
>
> it'd be easy enough to make the 'Injecting early_command to dirty storage
> devices' code that is in vmtests/__init__.py accept 'cls.dirty_disks' be a
> config itself or a path to one (rather than just boolean). Then generate a
> portion of the config that would write the different config.
Yes, that's also reasonable.
- 534. By Ryan Harper on 2017-10-09
-
modify the basic vmtest to trigger the MBR / sgdisk --clear bug
- 535. By Ryan Harper on 2017-10-10
-
Modify UEFI Basic test to trigger LP:1722322
PASSED: Continuous integration, rev:535
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Scott Moser (smoser) wrote : | # |
I think we should use the existing curtin 'wipe_volume' in superblock mode.
- 536. By Ryan Harper on 2017-10-10
-
disk_handler: use block.wipe_volume superblock to clear out mbr/gpt tables
PASSED: Continuous integration, rev:536
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 537. By Ryan Harper on 2017-10-11
-
Drop changes to basic.py, test case is in uefi_basic.py
Scott Moser (smoser) wrote : | # |
Can you just add a comment that 'wipe_volume' is potentially destructive to partitions that start at very beginnning of disk or end at very end.
something like:
# wipe_volume wipes 1M at front and end of the disk. That could
# destroy partition's filesystem data that lived there.
other than that, i approve.
Unless you wanted to make a generic helper for prepping disks with an arbitrary storage config.
PASSED: Continuous integration, rev:537
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 538. By Ryan Harper on 2017-10-11
-
Add comment around use of wipe to clear partition tables
- 539. By Ryan Harper on 2017-10-11
-
Drop apostrophe
PASSED: Continuous integration, rev:539
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Scott Moser (smoser) wrote : | # |
merged. thanks ryan.
I would generally like to recreate this issue by pre-populating an image with an MBR such that the current sgdisk --clear blows up like it does in the bug.
While we do have the dirty-disks mode, that currently runs the same curtin storage config twice; but we really need to apply a separate storage config during the early stage, and then a different one at the normal install stage.