Merge ~raharper/curtin:fix/ptable-label-pmbr into curtin:master
Status: | Merged |
---|---|
Approved by: | Ryan Harper on 2019-10-24 |
Approved revision: | ca77533c21d717e0167043a6ca552e1fa5a28892 |
Merge reported by: | Server Team CI bot |
Merged at revision: | not available |
Proposed branch: | ~raharper/curtin:fix/ptable-label-pmbr |
Merge into: | curtin:master |
Diff against target: |
109 lines (+27/-6) 4 files modified
curtin/block/schemas.py (+3/-2) curtin/commands/block_meta.py (+3/-1) curtin/storage_config.py (+5/-1) tests/unittests/test_storage_config.py (+16/-2) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chad Smith | Approve on 2019-10-24 | ||
Server Team CI bot | continuous-integration | Approve on 2019-10-24 | |
Dan Watkins | 2019-10-17 | Approve on 2019-10-23 | |
Dimitri John Ledkov (community) | Needs Fixing on 2019-10-22 | ||
Michael Hudson-Doyle | 2019-10-17 | Pending | |
Review via email:
|
Commit message
schema: Add ptable value 'unsupported'
Probert output may include values of partition table 'label'
that curtin does not support. This triggers schema validation
errors for common values, like 'mac' or 'PMBR' and likely
other valid table names but are not something that curtin
can create. Instead of adding more values to the schema, mark
such table types as 'unsupported' allowing the existing table
and partitions to be re-used.
This branch also modifies block_meta disk_handler to not
attempt to validate a preserved partition table if it marked
as 'unsupported'.
LP: #1848535
PASSED: Continuous integration, rev:e7a9d6aac9d
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Dimitri John Ledkov (xnox) wrote : | # |
No, that is not the right thing to do from the point of preservation of partition table.
partition tables that curtin doesn't know how to manipulate (ie. create table, create/change partitions) it should be emitted as unknown or frozen.
Kernel can parse the partitions, thus one can reuse those partitions.
A device without a partition table, is different to a device with an unknown partition table we don't know how to modify correctly.
Thus completely omitting partition table, seems, conceptually, to me like a lie.
Ryan Harper (raharper) wrote : | # |
We have two paths: one curtin is converting probed data into a storage config; this is where we find "unsupported" partition table types/labels. I generally don't want to encode all of these ever-expanding values into the storage schema. On the other hand, I want subiquity and other users of the schema to be able to verify the config they generated is correct, in which case I do want to encode specific values in the schema that curtin is expected to support.
After discussing this, I'll switch to setting ptable: unsupported for these values that curtin won't create/modify.
- 8981dde... by Ryan Harper on 2019-10-22
FAILED: Continuous integration, rev:8981ddea60f
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:8981ddea60f
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:8981ddea60f
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:8981ddea60f
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:8981ddea60f
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Dan Watkins (daniel-thewatkins) wrote : | # |
One inline question but this otherwise looks good. Thanks!
Ryan Harper (raharper) wrote : | # |
For the record, simply emitting ptable: unsupported out of the discover command is sufficient to resolve the bug (curtin didn't like the PMBR value). Subiquity will still need a change to replace the ptable value with 'gpt'. And the preserve: true use-case is waiting on further work on the other branch.
- be9e2d3... by Ryan Harper on 2019-10-23
- 48fd93a... by Ryan Harper on 2019-10-23
PASSED: Continuous integration, rev:48fd93a6589
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Chad Smith (chad.smith) wrote : | # |
Thanks for this minor reference request for schemas.
PASSED: Continuous integration, rev:48fd93a6589
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- ca77533... by Ryan Harper on 2019-10-24
PASSED: Continuous integration, rev:ca77533c21d
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:ed103a7ff93 438d1db61182528 f299dfe807e490 /jenkins. ubuntu. com/server/ job/curtin- ci/3740/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-arm64/ 3740/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-ppc64el/ 3740/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-s390x/ 3740/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= torkoal/ 3740/
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/3740/ /rebuild
https:/