Add Ignition options to create partition or RAID volume only if missing
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 974
- Forks
- 296
- Avg merge
- 6d 14h
- Merged PRs (30d)
- 9
Description
Issue by @travisgroth
Issue Report
Bug
Container Linux Version
# cat /etc/os-release
NAME="Container Linux by CoreOS"
ID=coreos
VERSION=1409.7.0
VERSION_ID=1409.7.0
BUILD_ID=2017-07-19-0005
PRETTY_NAME="Container Linux by CoreOS 1409.7.0 (Ladybug)"
ANSI_COLOR="38;5;75"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://issues.coreos.com"
COREOS_BOARD="amd64-usr"
Environment
VMware ESXi / PXE Boot
Expected Behavior
When using a storage layout which does not wipe partition tables or filesystems at boot time, the system functions normally. Example CT snippet:
storage:
disks:
- device: /dev/sda
wipe_table: false
partitions:
- label: ETCD
number: 1
size: 10GiB
- label: DOCKER
number: 2
size: 0
filesystems:
- name: etcd
mount:
device: /dev/disk/by-partlabel/ETCD
format: ext4
create:
force: false
- name: docker
mount:
device: /dev/disk/by-partlabel/DOCKER
format: ext4
create:
force: true
Actual Behavior
If booted with the provided snippet, the system will hang for a long period of time and eventually reboot. I have yet to catch the screen at reboot time. As soon as I change the 'force' and 'wipe_table' to 'true', the system boots as expected, but it obviously wipes things I don't want to be wiped. A single one of those two settings will trigger this behavior. I've tested with only wipe_table as false and only a single filesystem as create=false and I get the same issue. Leaving out the options has a similar effect.
As one might imagine, I'm trying to carve off persistent space for etcd to live on a master while doing a fresh format on the docker volume to keep things clean.
Reproduction Steps
- Create CLC config specifying a device without wipe_table set to true || Create a CLC config specifying a filesystem without a 'force' set to true
- Transpile into ignition (tested with 0.4.2, which transpiles into 2.0.0 ignition)
- Boot system. It will hang approximately after the RNG initializes
Other Information
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided CLC storage configuration, first leaving wipe_table or filesystem create.force unset or false, then transpiling it with Ignition 0.4.2 and booting the system. Compare the behavior with both options set to true. Done means existing partition tables and filesystems are preserved while missing partitions or volumes are created and the system boots normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100