coreos / coreos-assembler

Tooling container to assemble CoreOS-like systems
https://coreos.github.io/coreos-assembler/
Apache License 2.0
337 stars 166 forks source link

failed to run cosa container followed by README.md #1246

Closed chuanchang closed 9 months ago

chuanchang commented 4 years ago

Bug Report

as summary.

Environment

[root@dell-per630-04 rhcos]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.8 (Maipo)

[root@dell-per630-04 rhcos]# rpm -q podman skopeo runc kernel podman-1.6.4-13.el7_8.x86_64 skopeo-0.1.40-7.el7_8.x86_64 runc-1.0.0-65.rc8.el7.x86_64 kernel-3.10.0-1127.el7.x86_64

What operating system is being used to run coreos-assembler? [root@dell-per630-04 rhcos]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.8 (Maipo)

What operating system is being assembled? RHCOS

Is coreos-assembler running in Podman or Docker? podman-1.6.4-13.el7_8.x86_64

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

Expected Behavior

Actual Behavior

Reproduction Steps

  1. # podman run --rm -ti --security-opt label=disable --privileged --uidmap=1000:0:1 --uidmap=0:1:1000 --uidmap 1001:1001:64536 -v /home/ajia/Workspace/rhcos:/srv/ --device /dev/kvm --device /dev/fuse --tmpfs /tmp -v /var/tmp:/var/tmp --name cosa quay.io/coreos-assembler/coreos-assembler:latest

Other Information

[root@dell-per630-04 rhcos]# sh -x cosa.sh + cosa + env + grep COREOS_ASSEMBLER + set -x + podman run --rm -ti --security-opt label=disable --privileged --uidmap=1000:0:1 --uidmap=0:1:1000 --uidmap 1001:1001:64536 -v /home/ajia/Workspace/rhcos:/srv/ --device /dev/kvm --device /dev/fuse --tmpfs /tmp -v /var/tmp:/var/tmp --name cosa quay.io/coreos-assembler/coreos-assembler:latest Trying to pull quay.io/coreos-assembler/coreos-assembler:latest... Getting image source signatures Copying blob d25653df1d59 done Copying blob fc73fbb0ca8b done Copying blob b65c422c27c1 done Copying blob 5b4fef96b42c done Copying blob 82422234ceca done Copying blob 30e2563951cf done Copying blob 8f9f7ba233e1 done Copying blob 989fafa99d48 done Copying blob 78757c836428 done Copying blob 4ff4edc468ec done Copying blob 7e0c9177ac55 done Copying blob 79f0e1b0893b done Copying blob 58034a569e50 done Copying blob 3df62b1ab5f9 done Copying blob 8cfb7f14911f done Copying blob 0422c111a979 done Copying blob 4c510cfc38f6 done Copying config 0fe4bbcbf0 done Writing manifest to image destination Storing signatures Error: container_linux.go:345: starting container process caused "process_linux.go:303: getting the final child's pid from pipe caused \"EOF\"": OCI runtime error + rc=126 + set +x

dustymabe commented 4 years ago

I don't personally know of anyone running this on RHEL7 so there could be some issues with older versions of software. I'd say try it on RHEL8 or Fedora to see if you have the same problem, which will give some good information for the investigation.

relyt0925 commented 4 years ago

I also saw the same errors on a RHEL 7 box.

relyt0925 commented 4 years ago

I'm able to get it running in docker with

COREOS_ASSEMBLER_CONTAINER=quay.io/coreos-assembler/coreos-assembler:rhcos-4.3
cosa_docker() {
   env | grep COREOS_ASSEMBLER
   set -x
   docker run --rm -ti --security-opt label=disable --privileged                                    \
              -v ${PWD}:/srv/ --device /dev/kvm --device /dev/fuse                                  \
              --tmpfs /tmp -v /var/tmp:/var/tmp --name cosa                                         \
              ${COREOS_ASSEMBLER_CONFIG_GIT:+-v $COREOS_ASSEMBLER_CONFIG_GIT:/srv/src/config/:ro}   \
              ${COREOS_ASSEMBLER_GIT:+-v $COREOS_ASSEMBLER_GIT/src/:/usr/lib/coreos-assembler/:ro}  \
              ${COREOS_ASSEMBLER_CONTAINER_RUNTIME_ARGS}                                            \
              ${COREOS_ASSEMBLER_CONTAINER:-quay.io/coreos-assembler/coreos-assembler:latest} "$@"
   rc=$?; set +x; return $rc
}

However currently hit an error trying to run a rhcos image: https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.3/4.3.8/rhcos-4.3.8-x86_64-qemu.x86_64.qcow2.gz

with cosa run -d rhcos-4.3.8-x86_64-qemu.x86_64.qcow2

It fails with

[    7.945746] systemd[1]: ignition-fetch.service: Main process exited, code=exited, status=1/FAILURE

[FAILED[    7.948584] ignition[786]: Ignition failed: unsupported config version

] Failed to [    7.951274] systemd[1]: ignition-fetch.service: Failed with result 'exit-code'.

start Ignition ([    7.954604] systemd[1]: Failed to start Ignition (fetch).

fetch).

See 'systemctl status ignition-fetch.service' for details.

[    7.958594] systemd[1]: Dependency failed for Ignition Complete.

[DEPEND] Dependency failed for Ignition Complete.

[    7.962118] systemd[1]: Dependency failed for Initrd Default Target.

[DEPEND] Dependency failed for Initrd Default Target.

[    7.966164] systemd[1]: initrd.target: Job initrd.target/start failed with result 'dependency'.

[    7.969733] systemd[1]: initrd.target: Triggering OnFailure= dependencies.

[  OK      7.973368] systemd[1]: ignition-complete.target: Job ignition-complete.target/start failed with result 'dependency'.

0m] Stopped targ[    7.979152] systemd[1]: ignition-complete.target: Triggering OnFailure= dependencies.
cgwalters commented 4 years ago

First, it looks like you have an old coreos-assembler since -d is now --qemu-image. Second, try cosa run --ignition-version v2 --qemu-image rhcos-4.3.8-x86_64-qemu.x86_64.qcow2 - this needs work in our Ignition version detection probably.

c4rt0 commented 9 months ago

This report is stale, please open a new issue if still relevant.