Skip to content

bootc-generic-iso type does not work with sealed containers #526

@supakeen

Description

@supakeen

With the recent changes for #506 that have landed in image-builder 65 it seems that ISOs that previously worked (build from sealed containers) no longer work.

I'm a bit surprised sealed containers satisfied the contract at all. This still works for non-sealed images so likely something is wrong in the code path we take when we detect a sealed container.

I don't have access to the Containerfile that produced this error; but the traceback is likely to be enough to deduce what is wrong.

+ export FORCE_COLUMNS=134
+ FORCE_COLUMNS=134
+ [[ 0 -ne 0 ]]
+ bootc_default_fs=btrfs
+ image_type=bootc-generic-iso
+ image_builder_cli=ghcr.io/osbuild/image-builder-cli:latest
+ output_dir=./output
+ [[ ! -d ./output ]]
+ bootc_ref=localhost/fedora-silverblue-sealed-liveiso:44
+ podman container run --pull=newer --rm --privileged --security-opt label=type:unconfined_t --volume /var/lib/containers/storage:/var/lib/containers/storage --volume ./output:/output ghcr.io/osbuild/image-builder-cli:latest build --output-dir /output --bootc-ref localhost/fedora-silverblue-sealed-liveiso:44 --bootc-default-fs btrfs bootc-generic-iso
Manifest generation step
Building manifest for bootc-based-bootc-generic-iso
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2659c3d]

goroutine 1 [running]:
github.com/osbuild/images/pkg/distro/generic.(*bootcImageType).manifestForGenericISO(0xc00055e248, {0x0, 0x0, 0xc00050f0e0, 0x0, 0xc001003cc0, {0x0, 0x0}, 0x0, 0x0}, ...)
	/root/go/pkg/mod/github.com/osbuild/images@v0.267.0/pkg/distro/generic/bootc_imagetype.go:460 +0x45d
github.com/osbuild/images/pkg/distro/generic.(*bootcImageType).manifestWithoutValidation(0xc00055e248, 0xc00088e750, {0x0, 0x0, 0xc00050f0e0, 0x0, 0xc001003cc0, {0x0, 0x0}, 0x0, ...})
	/root/go/pkg/mod/github.com/osbuild/images@v0.267.0/pkg/distro/generic/bootc_imagetype.go:171 +0x4c5
github.com/osbuild/images/pkg/distro/generic.(*bootcImageType).Manifest(0xc00055e248, 0xc00088e750, {0x0, 0x0, 0xc00050f0e0, 0x0, 0xc001003cc0, {0x0, 0x0}, 0x0, ...}, ...)
	/root/go/pkg/mod/github.com/osbuild/images@v0.267.0/pkg/distro/generic/bootc_imagetype.go:152 +0x96
github.com/osbuild/images/pkg/manifestgen.(*Generator).Generate(0xc000871040, 0xc00088e750, {0x37f2cb0, 0xc00055e248}, 0x6?)
	/root/go/pkg/mod/github.com/osbuild/images@v0.267.0/pkg/manifestgen/manifestgen.go:184 +0x276
main.generateManifest({0x0?, 0x7fff1d416f83?}, {0x4901960?, 0xc00072c9a0?, 0x6?}, 0xc00080ef00, {0x37b28a0, 0xc000203bf0}, 0xc000557400)
	/build/cmd/image-builder/manifest.go:116 +0x3e6
main.cmdManifestWrapper({0x37e96b0, 0xc00072a770}, 0xc00031c008, {0xc0003ca2a0, 0x1, 0x0?}, {0x37b28a0, 0xc000203bf0}, {0x37b2aa0, 0x4901960}, ...)
	/build/cmd/image-builder/main.go:403 +0x145c
main.cmdBuild(0xc00031c008, {0xc0003ca2a0, 0x1, 0x7})
	/build/cmd/image-builder/main.go:498 +0x632
github.com/spf13/cobra.(*Command).execute(0xc00031c008, {0xc0003ca230, 0x7, 0x7})
	/root/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1015 +0xb02
github.com/spf13/cobra.(*Command).ExecuteC(0xc00026af08)
	/root/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1148 +0x465
github.com/spf13/cobra.(*Command).Execute(...)
	/root/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1071
main.run()
	/build/cmd/image-builder/main.go:770 +0x1575
main.main()
	/build/cmd/image-builder/main.go:784 +0x53

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions