On Mon, Apr 26, 2021 at 8:18 AM Federico Ressi <fressi(a)redhat.com> wrote:
Hello all,
I am writing to this list because I found out F33 cloud image cloud init support for
creating swap files looks to be broken probably because of a known Linux 5.7+ kernel issue
[1].
The problem is cloud-init is trying to create a new swap file by using fallocate command
that is not working well (kernel is complaining the file has holes when executing swapon
command just later). The easy workaround for this issue is to use dd command instead of
fallocate command in cloud-init.
fallocate default mode is zero, and doesn't create holes. If there are
holes, it's a kernel bug, and it needs to be fixed and kernel updated.
It's also worth making sure cloud-init is using fallocate's default
mode of zero.
The simplest work around is to just create a swap partition instead of
a swapfile, when using cloud images that have the buggy kernel. Or
alternatively don't create either one, and instead write a config to
/etc/systemd/zram-generator.conf so the installation uses swap on a
compressed zram device.
Because I don't know the whole procedure required for submitting
a patch I am writing to you in the hope you can help me in having the F33 cloud image
fixed.
I don't think cloud images get reissued after release. But you can
reproduce that process and make your own cloud image that's identical
to the Fedora one, except for the kernel. That way you can use a newer
kernel that doesn't have the bug.
Or like Dusty suggests, give the Fedora 34 Cloud images a whirl. Out tomorrow!
--
Chris Murphy