Curtin fails to deploy image when using an ext2 base filesystem due to swap.img
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Unassigned | ||
Ubuntu on IBM z Systems |
Fix Released
|
Undecided
|
Unassigned | ||
curtin |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I configured an IBM Z DPM Partition to use ext2 for / with no other filesystem. The deployment fails when Curtin is unable to create swap.img. While ext2 isn't widely used anymore we have had MAAS users that prefer to use a non-journaling filesystem.
Running command ['sh', '-c', 'rm -f "$1" && umask 0066 && truncate -s 0 "$1" && { chattr +C "$1" || true; } && fallocate -l "${2}M" "$1" && mkswap "$1" || { r=$?; rm -f "$1"; exit $r; }', 'setup_swap', '/tmp/tmpry474p
chattr: Operation not supported while setting flags on /tmp/tmpry474p9
fallocate: fallocate failed: Operation not supported
creating swap file '/swap.img' of 4096MB took 0.006 seconds
failed creating swap file '/swap.img' of 4096MB
tags: | added: maas s390x |
Changed in ubuntu-z-systems: | |
status: | New → In Progress |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | none → 3.0.x |
status: | Triaged → Fix Released |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
Changed in maas: | |
milestone: | 3.0.x → none |
I think this is a bug in Curtin. I just tried to deploy a CentOS 8 AMD64 image with an ext2 filesystem and I get the same error. One thing I just realized, MAAS doesn't request that a swap file is created in curtin.cfg. When deploying Ubuntu or CentOS with an ext4 base filesystem swap is not created. It seems Curtin automatically tries to enable Swap in some cases when ext2 is used as the base filesystem.