coreos / coreos/coreos-assembler

cosa buildextend-live step: gf-mksquashfs fails to create rootfs squashfs: No space left on device

Open
#3,203 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
393
Forks
193
Avg merge
17h 6m
Merged PRs (30d)
5

Description

Bug Report

Environment

What operating system is being used to run coreos-assembler?
Fedora 36/37

What operating system is being assembled?
Custom Fedora CoreOS derivative

Is coreos-assembler running in Podman or Docker?
Podman

If Podman, is coreos-assembler running privileged or unprivileged?
privileged

Expected Behavior

Running cosa buildextend-live generates a live iso installer image

Actual Behavior

In the cosa buildextend-live phase, during squashfs generation for the rootfs, the gf-mkquashfs command fails due to No space left on Device even though there is space available on the mounted volumes in the cosa container.

Our custom FCOS derivative pulls in a large amount of rpm packages (~5.3GB worth). It seems that we are hitting a hard size limit for how big the live-iso can grow to be. If we reduce the number of rpm packages included in the manifest then the live iso generation step runs fine.

Reproduction Steps

  1. cosa init
  2. cosa fetch
  3. cosa build
  4. cosa buildextend-metal
  5. cosa buildextend-metal4k
  6. cosa buildextend-live < fails here

Other Information

Build output:

++ guestfish --remote -- list-partitions
+ partitions='/dev/sda1
/dev/sda2
/dev/sda3
/dev/sda4'
+ for pt in $partitions
++ coreos_gf vfs-label /dev/sda1
++ guestfish --remote -- vfs-label /dev/sda1
+ label=
+ '[' '' == EFI-SYSTEM ']'
+ for pt in $partitions
++ coreos_gf vfs-label /dev/sda2
++ guestfish --remote -- vfs-label /dev/sda2
+ label=EFI-SYSTEM
+ '[' EFI-SYSTEM == EFI-SYSTEM ']'
+ coreos_gf mount /dev/sda2 /boot/efi
+ guestfish --remote -- mount /dev/sda2 /boot/efi
+ for pt in $partitions
++ coreos_gf vfs-label /dev/sda3
++ guestfish --remote -- vfs-label /dev/sda3
+ label=boot
+ '[' boot == EFI-SYSTEM ']'
+ for pt in $partitions
++ coreos_gf vfs-label /dev/sda4
++ guestfish --remote -- vfs-label /dev/sda4
+ label=root
+ '[' root == EFI-SYSTEM ']'
++ coreos_gf ls /ostree/deploy
++ guestfish --remote -- ls /ostree/deploy
+ stateroot=/ostree/deploy/fedora-coreos
++ coreos_gf ls /ostree/deploy/fedora-coreos/deploy
++ guestfish --remote -- ls /ostree/deploy/fedora-coreos/deploy
++ grep -v .origin
+ deploydir=/ostree/deploy/fedora-coreos/deploy/585760e354d85005f83fb2413f96f6fe0a0d758241ef0a44073e8c8d4446602d.0
+ export stateroot deploydir
+ coreos_gf download /ostree/repo/config /srv/tmp/buildpost-live/initrd-rootfs/gf-mksquashfs.UHLaDw/config
+ guestfish --remote -- download /ostree/repo/config /srv/tmp/buildpost-live/initrd-rootfs/gf-mksquashfs.UHLaDw/config
+ grep -v readonly=true /srv/tmp/buildpost-live/initrd-rootfs/gf-mksquashfs.UHLaDw/config
+ coreos_gf upload /srv/tmp/buildpost-live/initrd-rootfs/gf-mksquashfs.UHLaDw/config.new /ostree/repo/config
+ guestfish --remote -- upload /srv/tmp/buildpost-live/initrd-rootfs/gf-mksquashfs.UHLaDw/config.new /ostree/repo/config
+ coreos_gf mksquashfs / /srv/tmp/buildpost-live/initrd-rootfs/gf-mksquashfs.UHLaDw/image.squashfs compress:zstd
+ guestfish --remote -- mksquashfs / /srv/tmp/buildpost-live/initrd-rootfs/gf-mksquashfs.UHLaDw/image.squashfs compress:zstd
libguestfs: error: mksquashfs: /: Write failed because No space left on device
FATAL ERROR: Failed to write to output filesystem
+ _coreos_gf_cleanup
+ guestfish --remote -- exit
+ :
Error running command /usr/lib/coreos-assembler/gf-mksquashfs

with a more recent traceback:

2022-11-16 20:50:47,681 ERROR - COMMAND: ['/usr/lib/coreos-assembler/gf-mksquashfs', 'builds/36.20221116.dev.0/x86_64/fedora-coreos-36.20221116.dev.0-metal.x86_64.raw', '/srv/tmp/buildpost-live/initrd-rootfs/root.squashfs', 'zstd']
Traceback (most recent call last):
  File "/usr/lib/coreos-assembler/cmd-buildextend-live", line 738, in <module>
    generate_iso()
  File "/usr/lib/coreos-assembler/cmd-buildextend-live", line 331, in generate_iso
    runcmd(['/usr/lib/coreos-assembler/gf-mksquashfs',
  File "/usr/lib/coreos-assembler/cosalib/cmdlib.py", line 78, in runcmd
    raise e
  File "/usr/lib/coreos-assembler/cosalib/cmdlib.py", line 70, in runcmd
    cp = subprocess.run(cmd, **pargs)
  File "/usr/lib64/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/lib/coreos-assembler/gf-mksquashfs', 'builds/36.20221116.dev.0/x86_64/fedora-coreos-36.20221116.dev.0-metal.x86_64.raw', '/srv/tmp/buildpost-live/initrd-rootfs/root.squashfs', 'zstd']' returned non-zero exit status 1.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cmd-buildextend-live around generate_iso() and line 331, then inspect /usr/lib/coreos-assembler/gf-mksquashfs and the guestfish mksquashfs invocation. Reproduce the failure with the listed cosa steps and determine which filesystem limit is exhausted; done means large custom images complete successfully or the failing capacity is identified and reported clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.