Merge ~smoser/cloud-init:bug/1692087-disk_setup-gpt-improvements into cloud-init:master
| Status: | Merged |
|---|---|
| Merged at revision: | 3507b59eaa4914ba041f9c7ae987a2cfb036d8b5 |
| Proposed branch: | ~smoser/cloud-init:bug/1692087-disk_setup-gpt-improvements |
| Merge into: | cloud-init:master |
| Diff against target: |
151 lines (+46/-36) 2 files modified
cloudinit/config/cc_disk_setup.py (+45/-35) tests/unittests/test_handler/test_handler_disk_setup.py (+1/-1) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Server Team CI bot | continuous-integration | Approve on 2017-05-22 | |
| Ryan Harper | 2017-05-19 | Approve on 2017-05-22 | |
|
Review via email:
|
|||
Commit Message
disk_setup: fix several issues with gpt disk partitions.
This fixes several shortcomings of disk_setup with gpt disks.
* 'sgdisk -p' was being used to determine the size of a disk.
this can fail if it believes there is a bad gpt partition table.
Instead we just use blockdev now for both mbr or gpt disks.
* parsing of sgdisk -p output assumed that the 'name' of the partition
type would not have any spaces (Microsoft basic data)
* interaction with sgdisk did not realize that sgdisk wants input
of '8300' rather than '83' and will output the same.
LP: #1692087
| Scott Moser (smoser) wrote : | # |
I generally agree with your comments.
The code needs overhaul and better tests.
I'm trying to avoid doing too much to it now.
PASSED: Continuous integration, rev:3507b59eaa4
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/


PASSED: Continuous integration, rev:d9936df57ae 60c8c6dda3073ac 4ebe83cb5ef529 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 362/ /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- amd64/362 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- arm64/362 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- ppc64el/ 362 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- s390x/362 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=vm- i386/362
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 362/rebuild
https:/