osbuild / bootc-image-builder

A container for deploying bootable container images.
https://osbuild.org
Apache License 2.0
110 stars 50 forks source link

Failed to build out btrfs roofs qcow2 image using quay.io/fedora/fedora-bootc:40/latest and quay.io/centos-bootc/centos-bootc:stream10 #556

Closed chunfuwen closed 1 month ago

chunfuwen commented 1 month ago
  1. Boot roofs:btrfs qcow2 image using below command:
    sudo podman run --rm -it --privileged --pull=newer --security-opt label=type:unconfined_t -v /var/lib/libvirt/images/output:/output -v /var/lib/libvirt/images/config.json:/config.json   quay.io/centos-bootc/bootc-image-builder:latest  --type qcow2 --tls-verify=true  --config /config.json  quay.io/fedora/fedora-bootc:latest  --rootfs btrfs
  2. But throw below error during building process:
    
    Writing manifest to image destination
    DONE
    Building manifest-qcow2.json
    starting -^[[0m^[[1mPipeline source org.osbuild.containers-storage: 8105ac14d14a1ebfd26a94fc6997269c19571097fca39bfd32f627a2b175a7ee^[[0m
    Build
    root: <host>
    ^[[0m^[[1mPipeline build: 29816606b7a8ddf9771caa75b819b480496f9e863e13dae91408215ad3114cc0^[[0m
    Build
    root: <host>
    runner: org.osbuild.fedora38 (org.osbuild.fedora38)
    ^[[0m^[[1morg.osbuild.container-deploy: 7723a09bd59ae0e0418c9891eb4ef0245d5396e2a2192731434ef5c483283e76^[[0m {}
    Getting image source signatures
    Copying blob sha256:ea833c5ff2520e020b854e1d9c24156bc556bb6f335675b2bc1c30737b54e51b
    ................

Writing manifest to image destination 42b5140d8febb666dd3d6c4f7c179f20ce566aabe1182e8cec9b03557591987b Untagged: docker.io/library/tmp-container-deploy-03383046765110:latest Deleted: 42b5140d8febb666dd3d6c4f7c179f20ce566aabe1182e8cec9b03557591987b

⏱ Duration: 78s ^[[0m^[[1morg.osbuild.selinux: 29816606b7a8ddf9771caa75b819b480496f9e863e13dae91408215ad3114cc0^[[0m { "file_contexts": "etc/selinux/targeted/contexts/files/file_contexts", "exclude_paths": [ "/sysroot" ], "labels": { "/usr/bin/mount": "system_u:object_r:install_exec_t:s0", "/usr/bin/ostree": "system_u:object_r:install_exec_t:s0", "/usr/bin/umount": "system_u:object_r:install_exec_t:s0" } } ⏱ Duration: 78s ^[[0m^[[1morg.osbuild.selinux: 29816606b7a8ddf9771caa75b819b480496f9e863e13dae91408215ad3114cc0^[[0m { "file_contexts": "etc/selinux/targeted/contexts/files/file_contexts", "exclude_paths": [ "/sysroot" ], "labels": { "/usr/bin/mount": "system_u:object_r:install_exec_t:s0", "/usr/bin/ostree": "system_u:object_r:install_exec_t:s0", "/usr/bin/umount": "system_u:object_r:install_exec_t:s0" } }

⏱ Duration: 17s ^[[0m^[[1mPipeline image: 242a653b6cd8f2158c4adaf4a5fffdf01a3c45686185ab6eeb9227c7933b6c0d^[[0m Build root: 29816606b7a8ddf9771caa75b819b480496f9e863e13dae91408215ad3114cc0 runner: org.osbuild.linux (org.osbuild.linux) ^[[0m^[[1morg.osbuild.truncate: 906ef06e6400a84d77016e204dcca18c10f4a027bd06a01c3b895ae1811582e4^[[0m { "filename": "disk.raw", "size": "10737418240" }

⏱ Duration: 0s ^[[0m^[[1morg.osbuild.sfdisk: fb338f49426dcb62ed30937681c3c7de909e640a978834570bdea1c3c7a94206^[[0m { "label": "gpt", "uuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0", "partitions": [ { "bootable": true, "size": 2048, "start": 2048, "type": "21686148-6449-6E6F-744E-656564454649", "uuid": "FAC7F1FB-3E8D-4137-A512-961DE09A5549" }, { "size": 1026048, "start": 4096, "type": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B", "uuid": "68B2905B-DF3E-4FB3-80FA-49D1E773AA33"

},
{
  "size": 2097152,
  "start": 1030144,
  "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
  "uuid": "CB07C243-BC44-4717-853E-28852021225B"
},
{
  "size": 17844191,
  "start": 3127296,
  "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
  "uuid": "6264D520-3FB9-423F-8AB8-7A0A8E3D3562"
}

] } device/device (org.osbuild.loopback): loop0 acquired (locked: True) label: gpt label-id: D209C89E-EA5E-4FBD-B161-B461CCE297E0 start="2048", size="2048", type="21686148-6449-6E6F-744E-656564454649", uuid="FAC7F1FB-3E8D-4137-A512-961DE09A5549", bootable start="4096", size="1026048", type="C12A7328-F81F-11D2-BA4B-00A0C93EC93B", uuid="68B2905B-DF3E-4FB3-80FA-49D1E773AA33" start="1030144", size="2097152", type="0FC63DAF-8483-4772-8E79-3D69D8477DE4", uuid="CB07C243-BC44-4717-853E-28852021225B" start="3127296", size="17844191", type="0FC63DAF-8483-4772-8E79-3D69D8477DE4", uuid="6264D520-3FB9-423F-8AB8-7A0A8E3D3562" { "partitiontable": { "label": "gpt", "id": "D209C89E-EA5E-4FBD-B161-B461CCE297E0", "device": "/dev/loop0", "unit": "sectors", "firstlba": 2048, "lastlba": 20971486, "sectorsize": 512, "partitions": [ start="3127296", size="17844191", type="0FC63DAF-8483-4772-8E79-3D69D8477DE4", uuid="6264D520-3FB9-423F-8AB8-7A0A8E3D3562" { "partitiontable": { "label": "gpt", "id": "D209C89E-EA5E-4FBD-B161-B461CCE297E0", "device": "/dev/loop0", "unit": "sectors", "firstlba": 2048, "lastlba": 20971486, "sectorsize": 512, "partitions": [ { "node": "/dev/loop0p1", "start": 2048, "size": 2048, "type": "21686148-6449-6E6F-744E-656564454649", "uuid": "FAC7F1FB-3E8D-4137-A512-961DE09A5549" },{ "node": "/dev/loop0p2", "start": 4096, "size": 1026048, "type": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B", "uuid": "68B2905B-DF3E-4FB3-80FA-49D1E773AA33" },{ "node": "/dev/loop0p3", "start": 1030144, "size": 2097152, "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4", "uuid": "CB07C243-BC44-4717-853E-28852021225B" },{ "node": "/dev/loop0p4", "start": 3127296, "size": 17844191, "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4", "uuid": "6264D520-3FB9-423F-8AB8-7A0A8E3D3562" } ] } }

⏱ Duration: 0s ^[[0m^[[1morg.osbuild.mkfs.fat: 56325b780d459b50263cfa7d23343f3bdba31341441044c431bf76b31724b4df^[[0m { "volid": "7B7795E7" } device/device (org.osbuild.loopback): loop0 acquired (locked: True) mkfs.fat 4.2 (2021-01-31)

⏱ Duration: 0s ^[[0m^[[1morg.osbuild.mkfs.ext4: ad980200f764a858e5aec3911d255769c68f07699e2e1c73a0dee45cfc0dad27^[[0m { "uuid": "df209ded-ede9-4c8d-b2a2-71c1feb88d1f", "label": "boot" } device/device (org.osbuild.loopback): loop0 acquired (locked: True) mke2fs 1.47.0 (5-Feb-2023) Discarding device blocks: 0/262144^H^H^H^H^H^H^H^H^H^H^H^H^H ^H^H^H^H^H^H^H^H^H^H^H^H^Hdone Creating filesystem with 262144 4k blocks and 65536 inodes Filesystem UUID: df209ded-ede9-4c8d-b2a2-71c1feb88d1f Superblock backups stored on blocks: 32768, 98304, 163840, 229376

Allocating group tables: 0/8^H^H^H ^H^H^Hdone Writing inode tables: 0/8^H^H^H ^H^H^Hdone Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: 0/8^H^H^H ^H^H^Hdone

⏱ Duration: 0s ^[[0m^[[1morg.osbuild.mkfs.btrfs: 0ff8cf7f15e3e75d2944c2329c2a468e9aaedb2e9c5e88c288c0d2abb5ca1fb7^[[0m { "uuid": "0a6a1670-88d0-4997-9590-10d50c96fc74", "label": "root" } device/device (org.osbuild.loopback): loop0 acquired (locked: True) WARNING: failed to open /dev/btrfs-control, skipping device registration: No such file or directory btrfs-progs v6.8.1 See https://btrfs.readthedocs.io for more information.

Performing full device TRIM /dev/loop0 (8.51GiB) ... NOTE: several default settings have changed in version 5.15, please make sure this does not affect your deployments:

Label: root UUID: 0a6a1670-88d0-4997-9590-10d50c96fc74 Node size: 16384 Sector size: 4096 (CPU page size: 4096) Filesystem size: 8.51GiB Block group profiles: Data: single 8.00MiB Metadata: DUP 256.00MiB System: DUP 8.00MiB SSD detected: no Zoned device: no Features: extref, skinny-metadata, no-holes, free-space-tree Checksum: crc32c Number of devices: 1 Devices: ID SIZE PATH 1 8.51GiB /dev/loop0

⏱ Duration: 0s ^[[0m^[[1morg.osbuild.btrfs.subvol: d7ec9fd5496b10c93542557e063885d4412ca64cc11747b14e8284695cd5c0fd^[[0m { "subvolumes": [ { "name": "/root" } ] } device/btrfs-0a6a (org.osbuild.loopback): loop0 acquired (locked: False) mount/btrfs-0a6a (org.osbuild.btrfs): mounting /dev/loop0 -> /store/tmp/buildroot-tmp-_4lqbslt/mounts/ mount/btrfs-0a6a (org.osbuild.btrfs): already unmounted: /store/tmp/buildroot-tmp-_4lqbslt/mounts/ Traceback (most recent call last): File "/usr/bin/osbuild", line 33, in sys.exit(load_entry_point('osbuild==124', 'console_scripts', 'osbuild')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/main_cli.py", line 181, in osbuild_cli r = manifest.build( ^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/pipeline.py", line 477, in build res = pl.run(store, monitor, libdir, debug_break, stage_timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/pipeline.py", line 376, in run results = self.build_stages(store, ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/pipeline.py", line 348, in buildstages r = stage.run(tree, ^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/pipeline.py", line 222, in run data = mntmgr.mount(mount) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/mounts.py", line 98, in mount path = client.call("mount", args) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/host.py", line 348, in call ret, = self.call_with_fds(method, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/host.py", line 384, in call_with_fds raise error osbuild.host.RemoteError: RuntimeError: b"mount: /store/tmp/buildroot-tmp-_4lqbslt/mounts: unknown filesystem type 'btrfs'.\n dmesg(1) may have more information after failed mount system call." (code: 32) File "/usr/lib/python3.12/site-packages/osbuild/host.py", line 268, in serve reply, reply_fds = self._handle_message(msg, fds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/host.py", line 301, in _handle_message ret, fds = self.dispatch(name, args, fds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/mounts.py", line 131, in dispatch r = self.mount(args) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/osbuild/mounts.py", line 199, in mount raise RuntimeError(f"{msg} (code: {code})") from e

2024/07/22 07:01:27 error: cannot run osbuild: running osbuild failed: exit status 1

chunfuwen commented 1 month ago

The host to run podman is rhel 9.5 x86

achilleas-k commented 1 month ago

The RHEL kernel doesn't support btrfs, so it will fail when it tries to mount the partition to copy data onto it. You'll need to run this on a host with a kernel built with btrfs support.