redhat-manufacturing / device-edge-workshops

GNU General Public License v2.0
22 stars 17 forks source link

Error: default OCI runtime "runc" not found: invalid argument #128

Open taruch opened 2 weeks ago

taruch commented 2 weeks ago

https://redhat-manufacturing.github.io/device-edge-workshops/exercises/rhde_aap_rhsi/2.2-setup-for-rhsi/ Step 2 - Copy the RHSI Image to our User [root@student2-edge-device ~]# podman images Error: default OCI runtime "runc" not found: invalid argument

[ansible@student2-edge-device ~]$ sudo podman images [sudo] password for ansible: Error: default OCI runtime "runc" not found: invalid argument [ansible@student2-edge-device ~]$ sudo -i [root@student2-edge-device ~]# which runc /usr/bin/which: no runc in (/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin) [root@student2-edge-device ~]# which crun /bin/crun [root@student2-edge-device ~]# exit logout [ansible@student2-edge-device ~]$ podman images Error: default OCI runtime "runc" not found: invalid argument [ansible@student2-edge-device ~]$

vi /usr/share/containers/containers.conf

Default OCI runtime

#

runtime = "crun"

runtime = "runc"

currently /usr where the above is stored is mounted RO [root@student2-edge-device ~]# mount | grep /usr /dev/vda3 on /usr type xfs (ro,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)

taruch commented 2 weeks ago

You can use the --runtime=crun, which is installed to run the podman commands, but ran into another issue with the instructions around using :latest.

[ansible@student2-edge-device ~]$ sudo podman images --runtime=crun REPOSITORY TAG IMAGE ID CREATED SIZE R/O registry.redhat.io/service-interconnect/skupper-router-rhel9 2.4.3 e4bd31ee7304 7 months ago 281 MB true [ansible@student2-edge-device ~]$ sudo podman --runtime=crun image scp root@localhost::registry.redhat.io/service-interconnect/skupper-router-rhel9:2.4.9 ansible@localhost: : Error: registry.redhat.io/service-interconnect/skupper-router-rhel9:2.4.9: image not known Error: exit status 125 [ansible@student2-edge-device ~]$ sudo podman --runtime=crun image scp root@localhost::registry.redhat.io/service-interconnect/skupper-router-rhel9:2.4.3 ansible@localhost: : Copying blob 0ceb24624abe done
Copying blob 45b4361b8405 done
Copying config e4bd31ee73 done
Writing manifest to image destination Storing signatures Getting image source signatures Copying blob 45b4361b8405 done
Copying blob 0ceb24624abe done
Copying config e4bd31ee73 done
Writing manifest to image destination Storing signatures Loaded image: registry.redhat.io/service-interconnect/skupper-router-rhel9:2.4.3 [ansible@student2-edge-device ~]$ sudo podman --runtime=crun image scp root@localhost::registry.redhat.io/service-interconnect/skupper-router-rhel9:latest ansible@localhost :: Error: registry.redhat.io/service-interconnect/skupper-router-rhel9:latest: image not known Error: exit status 125 [ansible@student2-edge-device ~]$

taruch commented 2 weeks ago

Here is the command (to copy the image and retag to 2.4.3): As there is no "latest" tag in root, and we had to copy it over using the 2.4.3 tag, there isn't any reason for the second command in the instructions below to retag the container image.

sudo podman image scp root@localhost::registry.redhat.io/service-interconnect/skupper-router-rhel9:latest ansible@localhost:: podman tag registry.redhat.io/service-interconnect/skupper-router-rhel9:latest registry.redhat.io/service-interconnect/skupper-router-rhel9:2.4.3

hvanniek commented 1 week ago

Added runc as a package for the image. Resolves the problem #131