disk_setup destroys data despite being told not to.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This is the config used.
###
disk_setup:
/dev/xvdf:
layout: false
overwrite: false
table_type: gpt
fs_setup:
- device: /dev/xvdf
filesystem: ext4
label: c6dev-fraud-solr
partition: none
overwrite: false
###
1. If partition is set to "none", as above.
the code will skip to here - https:/
... bypassing all of the checks on whether the filesystem exists or not.
This will result in mkfs being executed every time, destroying data, despite "overwrite: false"
2. If partition is set to "any/auto" ....
... to trigger the smart partition matching in https:/
update_
... will detect the lack of partition and silently change the specified partition "any" or "auto" to None - triggering the problem again.
Summary:
No matter what you set for "partition" or "overwrite" in fs_setup - if you are using the raw device, then disk_setup/fs_setup will destroy your data every time.
Bug identified with cloud-init-
Status changed to 'Confirmed' because the bug affects multiple users.