schema doesn't match gpt partition types for cc_disk_setup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I tried using cc_disk_setup to build a host with a discoverable partition. `cloud-init schema --system` says:
> Cloud config schema errors: disk_setup.
The schema requires partition types to be integers here: https:/
Sample input:
```
disk_setup:
/dev/
table_type: gpt
layout:
- - 100
- 933AC7E1-
```
Changed in cloud-init (Ubuntu): | |
status: | New → In Progress |
Changed in cloud-init (Ubuntu): | |
status: | In Progress → Fix Committed |
I see a couple issues with the sample input:
1. Note that a list nested in another list is also not valid (note the two "-"s before the "100").
2. 933AC7E1- 2EB4-4F13- B844-0E14E2AEF9 15 is not a valid partition type, see here[1] for a list of valid options.
From the docs[2]:
> Partitions can be specified by providing a list to layout, where each entry in the list is either
> a size or a list containing a size and the numerical value for a partition type. The size for
> partitions is specified in percentage of disk space, not in bytes (e.g. a size of 33 would take
> up 1/3 of the disk space). The partition type defaults to ‘83’ (Linux partition), for other types
> of partition, such as Linux swap, the type must be passed as part of a list along with the size.
See the examples[3] page for more info:
[1] https:/ /tldp.org/ HOWTO/Partition -Mass-Storage- Definitions- Naming- HOWTO/x190. html /cloudinit. readthedocs. io/en/latest/ reference/ modules. html#disk- setup /cloudinit. readthedocs. io/en/latest/ reference/ examples. html#disk- setup
[2] https:/
[3] https:/