osbuild / bootc-image-builder

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

Does not work on Linux with Podman Machine (errors with cp: error writing '/output/image/./disk.raw') #540

Closed cdrage closed 3 weeks ago

cdrage commented 1 month ago

Building any image does not work on Linux at the moment and always ends with an error.

Running Fedora 40. This is used with Podman Machine.

I can confirm this works fine on macOS.

Command to run:

podman run \
  --name httpd-bootc-image-builder \
  --tty \
  --privileged \
  --security-opt label=type:unconfined_t \
  -v /home/wikus/bootc/test123:/output/ \
  -v /var/lib/containers/storage:/var/lib/containers/storage \
  --label bootc.image.builder=true \
  quay.io/centos-bootc/bootc-image-builder:latest-1720185748 \
  quay.io/bootc-extension/httpd:latest \
  --output \
  /output/ \
  --local \
  --type \
  raw \
  --target-arch \
  amd64

Output:

Generating manifest manifest-raw.json
DONE
Building manifest-raw.json
starting -Pipeline source org.osbuild.containers-storage: c92d1cfb2c847de51c3e83e23a7cb26ec89b77a4fdd15d604f23bf98f94b7478
Build
  root: <host>
Pipeline build: 92c1e3447a9297bfaef6bc2b513753780ee6ba30d02eb4b59ff4545722c2db59
Build
  root: <host>
  runner: org.osbuild.fedora38 (org.osbuild.fedora38)
org.osbuild.container-deploy: d07247389ed74d343ba8009a2603b8cfdd8df35bc9866cfac5452b5678b5a327 {}
Getting image source signatures
Copying blob sha256:050a8d406ab9bebd00216e052ad3fc5dac1e2ab36f07355972946d0d5f7cfe8d
Copying blob sha256:88aab01220f9684503fb67e4ac6c7548d5503bec19e1b9935e04f86119f72f5c
Copying blob sha256:d8decd5f703135bd521efbb9c6fae5109e665923da66e3255edbe3c0ae33623f
Copying blob sha256:4422b7a8bb166aa0d593590047a73ad2a9a5bf388b4a352012878223716988a5
Copying blob sha256:e3b62f900c8b4709ae357ad311e304c2a55916e024fe4dc02568661c209abd4f
Copying blob sha256:bc1abff2c8d4d62d4e06e3455d87c243f6620d0439dd0ac1c9d2891758c25f75
Copying blob sha256:2c53e7fc418de04a2f593e22c9038f3629c2b5b1eff25bc42e46bbfe292a76ae
Copying blob sha256:40694771f957e0d159533bff1d82515036931bbc226938d8eca7612053d6336d
Copying blob sha256:547b4fc5eb1d0e4ec374f4d01865486ba64df03cf160c6adb2b0d0309c3a50fa
Copying blob sha256:f7009374c8ac81e22d17ad6aa9065552d7fcf74b50229f467e4593e047c8e38d
Copying blob sha256:3b3a32a51b11fb5a10b36d7fd6c5785c149b41f765471c50510f3b9247d29fdd
Copying blob sha256:76817607bbbad2236f463808a1d62d82b929189fa2091412573dff1813e3a591
Copying blob sha256:fcf6481a4a7a731847736583e0996a1a6585efff15099a1a2e316d34ebc725a2
Copying blob sha256:ecf93de80cdf448eafa578da45ebbfe6184e0c1900cad7403a251fe444911133
Copying blob sha256:24a595cdf1dacc9a5841be4b12b41ff2d678e56e91005b76e7efc641b985c244
Copying blob sha256:28bc05ee29ada09fd624a599de52d59243cf5fb35fefdf0560ebc9445d11d7cf
Copying blob sha256:2b11556798bcedcc0b4033383e8f8a392fbccca8eeeb4737ef4ab97034313d12
Copying blob sha256:7cd49ddea5e689996c72a6622ce847e22df580f01ad035fedf35bd8aa7d518c0
Copying blob sha256:312bd44fbfb86e4a31816751d39104a1bdd0e1ffed486ed5df080bcf92d99885
Copying blob sha256:4d4514d9afbcb103d0d24b1cdb5306c0da155b039a954d84cef550146bf51134
Copying blob sha256:68a338e45b6b13dca85ccf3bea266774a1ef9c5ef29aa8297504633c1c5b1b0e
Copying blob sha256:3aa7de50f1da1b9d27da718dade01f3df4ebdaf9d7a891df71932a612229ee2d
Copying blob sha256:03f8187d462decd660e9d518a136c79c867bae006e6d4ad0e29cd476b7f81f5d
Copying blob sha256:7fd3632758b032d1f41d535673b314aad8ef42a63eb5eecad56bda93dc344621
Copying blob sha256:49affea1b052e35d393f5f3551c58738cf44aadf46a39e782bd9415eadd53224
Copying blob sha256:ff69d462f41d09a5560c59f9696c03f8f534795a193ff7d38e4314906a6c02c1
Copying blob sha256:8bf2dcf18ec5748e2c8e10a6120442946787c797e08371844dfafb69955e396d
Copying blob sha256:f24cd4a0d082f0fcec67ffa828116885613fbe6b89b624813edcc756a165091f
Copying blob sha256:69b91f1def4779a00343db294a8a0c0a311ee41da671ab64816ef0d87cf7c096
Copying blob sha256:3e71bd75a420991927ab6b1eff1f04b261e9ab67c5a153dfe915db117b7373ff
Copying blob sha256:06aadb75dc1a18d58c7cb5e7dc6e4652e73abac9c6e762034c4b8f160045a692
Copying blob sha256:653ff0858b056823c5b078870b6ab41f61a6ce58b37de5314f13a32f65268c24
Copying blob sha256:a284a4218a2f4decd70ea6ff4bbf202c07aca7e5759a0ab6589cf841dd64ec3c
Copying blob sha256:2d20fc08fa88b301c5ba5d3bb1f136c9655c8c401b8743e00cd11fc9fac12697
Copying blob sha256:83e6ac618a47cd5dde370b59c684af7e878139b301c5c32f3e38d141cfde34f5
Copying blob sha256:b479021718aac3c23fa6e054b4c5ec4d46f38f475da37e814e558a96f7e485a3
Copying blob sha256:3ba8418305d2cff71ed367962535e6dd30af2f0a7e461b167f4247e2f514f1ad
Copying blob sha256:b30c6b1a08063708e9f3cd5424762a7be6372c085132bf91fdd5ac4b5e39be87
Copying blob sha256:5a520e4d1e26db369da29cb3964e56f2a771df952afc69abd135388d3d1d9b9a
Copying blob sha256:778fe1335137f29cbdae3105d0bfffbb0f4cc10cdad293918204995f7eb6fe2e
Copying blob sha256:8269eca1801f0db635a35c39c81eef9e5bef566cdaeb85a176a224e93947e6aa
Copying blob sha256:c7bf665245d94ecc749b04873351b174465b6e53a8e48c2618b7e6dc5a7df35e
Copying blob sha256:c45816af2e117471546069774e8f8b2af0c296ff837e333521cefd74ca9ab937
Copying blob sha256:902c912da3357e1bd00fef2b21a80fb3033f4ad08ce694f22f78aa2c1b3e8ed6
Copying blob sha256:707a1af1c29276330ab1535be8482d4cae20239798714b2e3616ea7a3a973c7e
Copying blob sha256:b9f62a844b0ea6dd17c7405e7a36deb3b6f01478bee7d65ca93b96462be1596f
Copying blob sha256:ed522efe7b99f01bf166401a8824117866d283645f25066e538bc3862dc8a9b2
Copying blob sha256:7ed6967e21ad01b1999fa2b34ff9008a15d1e0c3191287b9e6eb545c89e5ef9f
Copying blob sha256:8d400339b2f320fcadf8ab94ea430cfea9e076fd6623cf3be61bd31c26f9a8a6
Copying blob sha256:ec63d786a92b9a38ddc020f63e10adbad042496e26bb39699a5e1919de250002
Copying blob sha256:9867800280a5257d4a30bd5d9a46b91a2a2bd0ce1a34e5683782d8fcad5b54c7
Copying blob sha256:de54488a85698b8b06651da0ab00608224234e5ff38f3c7e24945fcc3151906a
Copying blob sha256:7dfc49c222e13a272c475e3fffa3f3e169e086f56278b2cd32aacc139d7f96e4
Copying blob sha256:bf89277fd95ba69663e68cf56956db2120762724b0aaf1e1712c3f36145b9d1e
Copying blob sha256:faf56c9d61bcb4ba9ff0c3e94e8f6fcfe7b6e82f53445889ff89f78b1dbe264b
Copying blob sha256:e667dc94e2bfcc94e4f1db3fb642d62caa6026f1e12dc6c8aafdbbb8fd99d67a
Copying blob sha256:fb3536218ac1cc2c2466d4ea94fcd6678ad2d4b87c7c2ae04db9d287976722d2
Copying blob sha256:4b845f795692745dfa8ebb3807dde10d1aa718e389eaf25b2b5d7b72a8fd4df5
Copying blob sha256:4f56878fc2692b9c600f19df2771248c2a22a968b98cc7620ef6c2aec58bd1ff
Copying blob sha256:a9b9d3ed600815d86d4cb3a692dacb6c84a204c4227f08854bacbb58da21ae20
Copying blob sha256:b1d37af156e3e02c162b17432a2ca07cbdeb6b87422b1aebf8cc6beb839bbaba
Copying blob sha256:d87815c86f3e11b1c665761ff7ac2f81f85d4c32c4663562ea3aec332e5c84b3
Copying blob sha256:0f221afcb054ecc51ec1d5bbee34e6a431e6ddc6d869e52c7247afe3059bea7d
Copying blob sha256:86d200f230428e1d521446084c9ae311af69a8bd75bafe725e7956f81459bd6c
Copying blob sha256:12787d84fa137cd5649a9005efe98ec9d05ea46245fdc50aecb7dd007f2035b1
Copying blob sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef
Copying blob sha256:4e844e9d7ec5da8fa840494e93eebf4612d30e5b71671458b3f33cebc9677009
Copying blob sha256:2ebcbfdf28cb1fab7e4b5a82cdff3147e1f20b15c043d6cae2d584f33f57099a
Copying blob sha256:c011a9b134b868c6643d874a2a8c8b443657e90aebacf5035130c3b0d732292c
Copying config sha256:1808c4ba49140f6f9e6e94045e0bfe284cf85af0ee0ea4add80d7426bd1598ee
Writing manifest to image destination
1808c4ba49140f6f9e6e94045e0bfe284cf85af0ee0ea4add80d7426bd1598ee
Untagged: docker.io/library/tmp-container-deploy-66972563953142:latest
Deleted: 1808c4ba49140f6f9e6e94045e0bfe284cf85af0ee0ea4add80d7426bd1598ee

⏱  Duration: 86s
org.osbuild.selinux: 92c1e3447a9297bfaef6bc2b513753780ee6ba30d02eb4b59ff4545722c2db59 {
  "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"
  }
}
setfiles: Regex version mismatch, expected: 10.42 2022-12-11 actual: 10.40 2022-04-14
setfiles: Regex version mismatch, expected: 10.42 2022-12-11 actual: 10.40 2022-04-14

⏱  Duration: 19s
Pipeline image: b16d5c5fd4bb6729d662dbdd89664b404b8ca46416c65f85cafbcbac208823fc
Build
  root: 92c1e3447a9297bfaef6bc2b513753780ee6ba30d02eb4b59ff4545722c2db59
  runner: org.osbuild.linux (org.osbuild.linux)
org.osbuild.truncate: e53575e34b00b3248112e7251de0dc75369b808c28d3957835266ec864aa6b27 {
  "filename": "disk.raw",
  "size": "10737418240"
}

⏱  Duration: 0s
org.osbuild.sfdisk: e17c41ddf75467806583a832b01fa52375c02514be40b491c4999d092336fb55 {
  "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"
{
   "partitiontable": {
start="3127296", size="17844191", type="0FC63DAF-8483-4772-8E79-3D69D8477DE4", uuid="6264D520-3FB9-423F-8AB8-7A0A8E3D3562"
      "label": "gpt",
      "id": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
      "device": "/dev/loop0",
      "unit": "sectors",
      "lastlba": 20971486,
      "firstlba": 2048,
      "sectorsize": 512,
      "partitions": [
         {
            "node": "/dev/loop0p1",
            "start": 2048,
            "size": 2048,
            "type": "21686148-6449-6E6F-744E-656564454649",
            "uuid": "FAC7F1FB-3E8D-4137-A512-961DE09A5549"
         },{
            "start": 4096,
            "node": "/dev/loop0p2",
            "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
org.osbuild.mkfs.fat: bbb3e87906835b0d8ed52b453e1d2b8a614ac43f11e24fb3ba1616ee0ffc8b8b {
  "volid": "7B7795E7"
}
device/device (org.osbuild.loopback): loop0 acquired (locked: True)
mkfs.fat 4.2 (2021-01-31)

⏱  Duration: 0s
org.osbuild.mkfs.ext4: 24615a0fd145b9175f9af4e95f63a8bef3bf9161641727c20c72f29aa59d13a7 {
  "uuid": "3f31cacd-b90a-40f8-aefc-c59f10423800",
  "label": "boot"
}
device/device (org.osbuild.loopback): loop0 acquired (locked: True)
mke2fs 1.46.5 (30-Dec-2021)
Discarding device blocks:      0/262144             done                            
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: 3f31cacd-b90a-40f8-aefc-c59f10423800
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376

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

⏱  Duration: 0s
org.osbuild.mkfs.xfs: 8a82ddd68203e326cef04b4a46cee378d0fdf8a9bda42f233d49360d4bcdab04 {
  "uuid": "961dfd7a-d78b-4564-b77f-9f62b61fe8b8",
  "label": "root"
}
device/device (org.osbuild.loopback): loop0 acquired (locked: True)
meta-data=/dev/loop0             isize=512    agcount=4, agsize=557631 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1    bigtime=1 inobtcount=1 nrext64=0
data     =                       bsize=4096   blocks=2230523, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=16384, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
Discarding blocks...Done.

⏱  Duration: 0s
org.osbuild.bootc.install-to-filesystem: 8f7bd3969bffe25db5abbfb57d17033f08282fcb57110e50b45a459ce713ca77 {
  "kernel-args": [
    "rw",
    "console=tty0",
    "console=ttyS0"
  ],
  "target-imgref": "quay.io/bootc-extension/httpd:latest"
}
device/disk (org.osbuild.loopback): loop0 acquired (locked: False)
mount/- (org.osbuild.xfs): mounting /dev/loop0p4 -> /store/tmp/buildroot-tmp-z1ce4djk/mounts/
mount/boot (org.osbuild.ext4): mounting /dev/loop0p3 -> /store/tmp/buildroot-tmp-z1ce4djk/mounts/boot
mount/boot-efi (org.osbuild.fat): mounting /dev/loop0p2 -> /store/tmp/buildroot-tmp-z1ce4djk/mounts/boot/efi
Host kernel does not have SELinux support, but target enables it by default; this is less well tested.  See https://github.com/containers/bootc/issues/419
Installing image: docker://quay.io/bootc-extension/httpd:latest
Initializing ostree layout
Initializing sysroot
ostree/deploy/default initialized as OSTree stateroot
Deploying container image
Deployment complete
Running bootupctl to install bootloader
Installed: grub.cfg
Installed: "centos/grub.cfg"
Trimming boot
/run/osbuild/mounts/boot: 907.2 MiB (951291904 bytes) trimmed
Finalizing filesystem boot
Trimming mounts
/run/osbuild/mounts: 7 GiB (7537094656 bytes) trimmed
Finalizing filesystem mounts
Installation complete!
mount/boot-efi (org.osbuild.fat): umount: /store/tmp/buildroot-tmp-z1ce4djk/mounts/boot/efi unmounted
mount/boot (org.osbuild.ext4): umount: /store/tmp/buildroot-tmp-z1ce4djk/mounts/boot unmounted
mount/- (org.osbuild.xfs): umount: /store/tmp/buildroot-tmp-z1ce4djk/mounts/ unmounted

⏱  Duration: 198s
org.osbuild.fstab: b16d5c5fd4bb6729d662dbdd89664b404b8ca46416c65f85cafbcbac208823fc {
  "filesystems": [
    {
      "uuid": "961dfd7a-d78b-4564-b77f-9f62b61fe8b8",
      "vfs_type": "xfs",
      "path": "/",
      "freq": 1,
      "options": "ro",
      "passno": 1
    },
    {
      "uuid": "3f31cacd-b90a-40f8-aefc-c59f10423800",
      "vfs_type": "ext4",
      "path": "/boot",
      "options": "ro",
      "freq": 1,
      "passno": 2
    },
    {
      "uuid": "7B77-95E7",
      "vfs_type": "vfat",
      "path": "/boot/efi",
      "options": "umask=0077,shortname=winnt",
      "passno": 2
    }
  ]
}
device/disk (org.osbuild.loopback): loop0 acquired (locked: False)
mount/- (org.osbuild.xfs): mounting /dev/loop0p4 -> /store/tmp/buildroot-tmp-uvg15m1z/mounts/
mount/boot (org.osbuild.ext4): mounting /dev/loop0p3 -> /store/tmp/buildroot-tmp-uvg15m1z/mounts/boot
mount/boot-efi (org.osbuild.fat): mounting /dev/loop0p2 -> /store/tmp/buildroot-tmp-uvg15m1z/mounts/boot/efi
mount/ostree.deployment (org.osbuild.ostree.deployment): Deployment root at 'ostree/deploy/default/deploy/1ec970c2dbfc682a5bf143ed66b289a094ab8021bf489a3c14c8518c9f98a04d.0'
mount/bind-ostree-deployment-to-tree (org.osbuild.bind): umount: /store/stage/uuid-eca851b3667646369f6395d1b3e2840e/data/tree/boot unmounted
mount/bind-ostree-deployment-to-tree (org.osbuild.bind): umount: /store/stage/uuid-eca851b3667646369f6395d1b3e2840e/data/tree/var unmounted
mount/bind-ostree-deployment-to-tree (org.osbuild.bind): umount: /store/stage/uuid-eca851b3667646369f6395d1b3e2840e/data/tree/sysroot unmounted
mount/bind-ostree-deployment-to-tree (org.osbuild.bind): umount: /store/stage/uuid-eca851b3667646369f6395d1b3e2840e/data/tree unmounted
mount/ostree.deployment (org.osbuild.ostree.deployment): mounting /store/tmp/buildroot-tmp-uvg15m1z/mounts/ostree/deploy/default/deploy/1ec970c2dbfc682a5bf143ed66b289a094ab8021bf489a3c14c8518c9f98a04d.0 -> /store/tmp/buildroot-tmp-uvg15m1z/mounts
mount/ostree.deployment (org.osbuild.ostree.deployment): umount: /store/tmp/buildroot-tmp-uvg15m1z/mounts/var unmounted
mount/ostree.deployment (org.osbuild.ostree.deployment): umount: /store/tmp/buildroot-tmp-uvg15m1z/mounts/boot unmounted
mount/ostree.deployment (org.osbuild.ostree.deployment): umount: /store/tmp/buildroot-tmp-uvg15m1z/mounts/sysroot unmounted
mount/ostree.deployment (org.osbuild.ostree.deployment): umount: /store/tmp/buildroot-tmp-uvg15m1z/mounts unmounted
mount/ostree.deployment (org.osbuild.ostree.deployment): umount: /store/tmp/buildroot-tmp-uvg15m1z/mounts unmounted
mount/ostree.deployment (org.osbuild.ostree.deployment): umount: /store/tmp/buildroot-tmp-uvg15m1z/mounts/boot/efi unmounted
mount/ostree.deployment (org.osbuild.ostree.deployment): umount: /store/tmp/buildroot-tmp-uvg15m1z/mounts/boot unmounted
mount/ostree.deployment (org.osbuild.ostree.deployment): umount: /store/tmp/buildroot-tmp-uvg15m1z/mounts unmounted
mount/boot-efi (org.osbuild.fat): already unmounted: /store/tmp/buildroot-tmp-uvg15m1z/mounts/boot/efi
mount/boot (org.osbuild.ext4): already unmounted: /store/tmp/buildroot-tmp-uvg15m1z/mounts/boot
mount/- (org.osbuild.xfs): already unmounted: /store/tmp/buildroot-tmp-uvg15m1z/mounts/

⏱  Duration: 1s
manifest - finished successfully
cp: error writing '/output/image/./disk.raw': Resource temporarily unavailable
Traceback (most recent call last):
  File "/usr/bin/osbuild", line 33, in <module>
    sys.exit(load_entry_point('osbuild==123', 'console_scripts', 'osbuild')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/osbuild/main_cli.py", line 197, in osbuild_cli
    export(pid, output_directory, object_store, manifest)
  File "/usr/lib/python3.12/site-packages/osbuild/main_cli.py", line 62, in export
    obj.export(dest, skip_preserve_owner=skip_preserve_owner)
  File "/usr/lib/python3.12/site-packages/osbuild/objectstore.py", line 260, in export
    subprocess.run(cp_cmd, check=True)
  File "/usr/lib64/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cp', '--reflink=auto', '-a', '--no-preserve=ownership', '/store/stage/uuid-eca851b3667646369f6395d1b3e2840e/data/tree/.', '/output/image']' returned non-zero exit status 1.
2024/07/11 13:14:19 error: cannot run osbuild: running osbuild failed: exit status 1
cdrage commented 1 month ago

Okay further investigation could be pointing towards an issue with podman machine itself rather than bib.

sudo podman run \
  --name httpd-bootc-image-builder \
  --tty \
  --privileged \
  --security-opt label=type:unconfined_t \
  -v /home/wikus/bootc/test123:/output/ \
  -v /var/lib/containers/storage:/var/lib/containers/storage \
  --label bootc.image.builder=true \
  quay.io/centos-bootc/bootc-image-builder:latest-1720185748 \
  quay.io/bootc-extension/httpd:latest \
  --output \
  /output/ \
  --local \
  --type \
  raw \
  --target-arch \
  amd64

MAYBE due to https://github.com/containers/podman/pull/22920 @cgwalters but I'm not entire 100% sure yet to diagnose why. It could be due to the switch of the underlying fs system?

cgwalters commented 1 month ago

MAYBE due to https://github.com/containers/podman/pull/22920 @cgwalters but I'm not entire 100% sure yet to diagnose why. It could be due to the switch of the underlying fs system?

Do you actually have that commit? I think it's more that commit should fix that problem. As for why it started occurring...well, I think what happened is probably a Linux kernel upgrade in Fedora made 9p buggier. I didn't bother investigating deeply (though see e.g. https://github.com/containers/bootc/issues/485#issuecomment-2076127555 where I found a likely commit that caused a different bug on 9p).

IOW: run podman machine ssh findmnt|grep virtiofs - if that's empty then you don't have the commit, and try upgrading to current git main podman to see if my fix works for you too.

cdrage commented 1 month ago

MAYBE due to containers/podman#22920 @cgwalters but I'm not entire 100% sure yet to diagnose why. It could be due to the switch of the underlying fs system?

Do you actually have that commit? I think it's more that commit should fix that problem. As for why it started occurring...well, I think what happened is probably a Linux kernel upgrade in Fedora made 9p buggier. I didn't bother investigating deeply (though see e.g. containers/bootc#485 (comment) where I found a likely commit that caused a different bug on 9p).

IOW: run podman machine ssh findmnt|grep virtiofs - if that's empty then you don't have the commit, and try upgrading to current git main podman to see if my fix works for you too.

Doh, you are right. I am using podman 5.0.3 and it's using an older version but with an updated kernel upgrade in the fedora image. Checking findmnt and it shows 9p.

So your PR is doing the opposite and actually fixing the issue, sorry!

I'm unable to update podman though (not on fedora channels yet) to the latest version which is unfortunate, so I'll just have to wait.

Due to numerous issues, I've opened up https://github.com/containers/podman-desktop-extension-bootc/issues/623 to perhaps move away from podman machine requirement for the bootc extension.

germag commented 1 month ago

I mentioned this issue here: https://github.com/containers/podman-bootc/pull/58

It was not failing if we connect stdin, but now (in my machine) the error show up again. Btw, I think, bib IS working it's just failing when osbuild calls export, but if you check the output dir the disk image is there.

cdrage commented 1 month ago

I mentioned this issue here: https://github.com/containers/podman-bootc/pull/58

It was not failing if we connect stdin, but now (in my machine) the error show up again. Btw, I think, bib IS working it's just failing when osbuild calls export, but if you check the output dir the disk image is there.

Yeah :( the image outputs are okay and myself and another person confirmed it. Just the prevailing output is failing. If anymore users raise the issue I'll make sure to just say that the image is fine and ignore the error (for now).

cgwalters commented 3 weeks ago

Closing this here as there's nothing really easily this project can do directly to workaround it and the best fix is just to get the newer podman in the hands of users.