crc-org / crc-cloud

Disposable OpenShift instances on cloud in minutes
31 stars 19 forks source link

[bug] missing tools on container image #146

Closed adrianriobo closed 11 months ago

adrianriobo commented 11 months ago

Within https://github.com/lmilbaum/crc-cloud/commit/ce94adc15b4cc54aeb7f2c9cf5f0ba687d67b710 then base image for the container was changed from alpine to ubi9-minimal on that change one tool was missing to be installed within the image: qemu-img, that tool is used at the importer script, also tar is required and missing.

Currently when the import operation is executed it ends up failing with:

@ updating........................................
rt_4.13.12_amd64.zst : 15.2 GiB...     /tmp/crc-cloud-2880896440: line 48: tar: command not found
@ updating....
 +  command:local:Command execExtractScript creating (546s) /tmp/crc-cloud-2880896440: line 52: qemu-img: command not found
 +  command:local:Command execExtractScript creating (546s) cp: cannot stat 'bundle/id_ecdsa_crc': No such file or directory
 +  command:local:Command execExtractScript created (546s) cp: cannot stat 'bundle/id_ecdsa_crc': No such file or directory
 +  command:local:Command execBootKeyContent creating (0s) 
 +  command:local:Command execBootKeyContent creating (0s) cat: id_ecdsa: No such file or directory
 +  command:local:Command execBootKeyContent creating (0s) error: exit status 1: running "cat id_ecdsa":
 +  command:local:Command execBootKeyContent **creating failed** error: exit status 1: running "cat id_ecdsa":
 +  pulumi:pulumi:Stack 4.13.12-eu-west-2-crcCloud-ImageImport creating (548s) error: update failed
 +  pulumi:pulumi:Stack 4.13.12-eu-west-2-crcCloud-ImageImport **creating failed** 1 error
adrianriobo commented 11 months ago

For ubi-minimal it seems there is no qemu-img pkg available

[ec2-user@ip-172-31-21-72 import]$ podman run -it --rm registry.access.redhat.com/ubi9-minimal:9.2-750@sha256:0dfa71a7ec2caf445e7ac6b7422ae67f3518960bd6dbf62a7b77fa7a6cfc02b1
Trying to pull registry.access.redhat.com/ubi9-minimal@sha256:0dfa71a7ec2caf445e7ac6b7422ae67f3518960bd6dbf62a7b77fa7a6cfc02b1...
Getting image source signatures
Checking if image destination supports signatures
Copying blob 35e8d0567610 done  
Copying config 088f0967f6 done  
Writing manifest to image destination
Storing signatures
[root@34ec989107af /]# microdnf install -y qemu-img

(microdnf:8): librhsm-WARNING **: 15:27:26.106: Found 0 entitlement certificates

(microdnf:8): librhsm-WARNING **: 15:27:26.107: Found 0 entitlement certificates
Downloading metadata...
Downloading metadata...
Downloading metadata...
error: No package matches 'qemu-img'
lmilbaum commented 11 months ago

@adrianriobo Have you checked if the full ubi image has the missing packages?

adrianriobo commented 11 months ago

yeah also failing :(, I tried with ubi9-minimal and ubi9 and even with ubi8-minimal and ubi8

praveenkumar commented 11 months ago

UBI might not contain any virtualization related package so may be we should use centos-stream image instead ubi?

Also look at https://stackoverflow.com/questions/76661003/what-is-best-practice-to-install-package-in-ubi-minimal-which-is-not-in-offical (no answer though)