Bug 1916382
| Summary: | Can't create ext4 filesystems with Ignition | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Benjamin Gilbert <bgilbert> |
| Component: | RHCOS | Assignee: | Benjamin Gilbert <bgilbert> |
| Status: | CLOSED ERRATA | QA Contact: | Michael Nguyen <mnguyen> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.6.z | CC: | bbreard, imcleod, jligon, nstielau |
| Target Milestone: | --- | ||
| Target Release: | 4.7.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: mkfs.ext4 fails when /etc/mke2fs.conf does not exist.
Consequence: Ignition cannot create ext4 filesystems.
Fix: Add /etc/mke2fs.conf to the initramfs.
Result: Ignition successfully creates ext4 filesystems.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-02-24 15:53:18 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1915617 | ||
Verified on RHCOS 47.83.202101161239-0 which is part of registry.ci.openshift.org/ocp/release:4.7.0-0.nightly-2021-01-16-201946
cat << EOF > ignition.yaml
{
"ignition": {
"version": "3.1.0"
},
"storage": {
"filesystems": [
{
"device": "/dev/disk/by-partlabel/root",
"format": "ext4",
"label": "root",
"wipeFilesystem": true
}
]
}
}
EOF
Start RHCOS with the ignition file.
[core@localhost ~]$ rpm-ostree status
State: idle
Deployments:
● ostree://8e87a86b9444784ab29e7917fa82e00d5e356f18b19449946b687ee8dc27c51a
Version: 47.83.202101161239-0 (2021-01-16T12:43:01Z)
[core@localhost ~]$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 945M 0 945M 0% /dev
tmpfs tmpfs 989M 84K 989M 1% /dev/shm
tmpfs tmpfs 989M 540K 988M 1% /run
tmpfs tmpfs 989M 0 989M 0% /sys/fs/cgroup
/dev/vda4 ext4 16G 2.3G 13G 16% /sysroot
tmpfs tmpfs 989M 0 989M 0% /tmp
/dev/vda3 ext4 364M 97M 244M 29% /boot
tmpfs tmpfs 198M 8.0K 198M 1% /run/user/1000
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:5633 |
Description of problem: Ignition fails when creating an ext4 filesystem. Version-Release number of selected component (if applicable): ignition-2.9.0-1.rhaos4.7.git1d56dc8.el8.x86_64 (Also happens on 4.6.) How reproducible: Always Steps to Reproduce: 1. Boot with this Ignition config: { "ignition": { "version": "3.1.0" }, "storage": { "filesystems": [ { "device": "/dev/disk/by-partlabel/root", "format": "ext4", "label": "root", "wipeFilesystem": true } ] } } Actual results: Jan 14 16:18:37 localhost systemd[1]: Starting Ignition (disks)... Jan 14 16:18:37 localhost ignition[768]: Ignition 2.9.0 Jan 14 16:18:37 localhost ignition[768]: Stage: disks [...] Jan 14 16:18:37 localhost ignition[768]: disks: createFilesystems: op(4): [started] creating "ext4" filesystem on "/run/ignition/dev_aliases/dev/disk/by-partlabel/root" Jan 14 16:18:37 localhost ignition[768]: disks: createFilesystems: op(4): executing: "mkfs.ext4" "-F" "-L" "root" "/run/ignition/dev_aliases/dev/disk/by-partlabel/root" Jan 14 16:18:37 localhost ignition[768]: disks: createFilesystems: op(4): [failed] creating "ext4" filesystem on "/run/ignition/dev_aliases/dev/disk/by-partlabel/root": exit status 1: Cmd: "mkfs.ext4" "-F" "-L" "root" "/run/ignition/dev_aliases/dev/disk/by-partlabel/root" Stdout: "" Stderr: "Syntax error in mke2fs config file (<default>, line #22)\n\tUnknown code prof 17\n" Jan 14 16:18:37 localhost ignition[768]: disks failedFull config: [...] Jan 14 16:18:37 localhost ignition[768]: Ignition failed: failed to create filesystems: mkfs failed: exit status 1: Cmd: "mkfs.ext4" "-F" "-L" "root" "/run/ignition/dev_aliases/dev/disk/by-partlabel/root" Stdout: "" Stderr: "Syntax error in mke2fs config file (<default>, line #22)\n\tUnknown code prof 17\n" Jan 14 16:18:37 localhost systemd[1]: ignition-disks.service: Main process exited, code=exited, status=1/FAILURE Jan 14 16:18:37 localhost systemd[1]: ignition-disks.service: Failed with result 'exit-code'. Jan 14 16:18:37 localhost systemd[1]: Failed to start Ignition (disks). Expected results: Boot succeeds. Additional info: Ignition configs enabling root RAID are affected. Bug 1889464 is the underlying issue, and the workaround is to ship /etc/mke2fs.conf in the initrd.