crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.26k stars 238 forks source link

[BUG] Display user friendly message when OKD preset selected on Apple Silicon (M1/M2 - arm64) #3389

Open alibo opened 2 years ago

alibo commented 2 years ago

General information

CRC version

CRC version: 2.10.1+7e7f6b2d
OpenShift version: 4.11.0-0.okd-2022-08-20-022919
Podman version: 4.2.0

CRC status

Machine does not exist. Use 'crc start' to create it

CRC config

- consent-telemetry                     : no
- preset                                : okd

Host Operating System

sw_vers
ProductName:    macOS
ProductVersion: 12.3.1
BuildVersion:   21E258

Steps to reproduce

Run the following commands on a machine with apple silicon:

  1. crc config set preset okd
  2. crc setup

Expected

setup CRC without any errors.

Actual

setup fails with the following error:

choosing an image from manifest list docker://quay.io/crcont/okd-bundle:4.11.0-0.okd-2022-08-20-022919: no image found in image index for architecture arm64, variant "", OS darwin

worth mentioning that it works with preset openshift.

Logs

Before gather the logs try following if that fix your issue

$ crc setup
CRC is constantly improving and we would like to know more about usage (more details at https://developers.redhat.com/article/tool-data-collection)
Your preference can be changed manually if desired using 'crc config set consent-telemetry <yes/no>'
Would you like to contribute anonymous usage statistics? [y/N]: n
No worry, you can still enable telemetry manually with the command 'crc config set consent-telemetry yes'.
INFO Using bundle path /Users/aliborhani/.crc/cache/crc_okd_vfkit_4.11.0-0.okd-2022-08-20-022919_arm64.crcbundle
INFO Checking if running as non-root
INFO Checking if crc-admin-helper executable is cached
INFO Checking for obsolete admin-helper executable
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
INFO Creating symlink for crc executable
INFO Checking if running emulated on a M1 CPU
INFO Checking if vfkit is installed
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if /Users/aliborhani/.crc/cache/crc_okd_vfkit_4.11.0-0.okd-2022-08-20-022919_arm64.crcbundle exists
INFO Getting bundle for the CRC executable
choosing an image from manifest list docker://quay.io/crcont/okd-bundle:4.11.0-0.okd-2022-08-20-022919: no image found in image index for architecture arm64, variant "", OS darwin

$ crc start --log-level debug
DEBU CRC version: 2.10.1+7e7f6b2d
DEBU OpenShift version: 4.11.0-0.okd-2022-08-20-022919
DEBU Podman version: 4.2.0
DEBU Running 'crc start'
DEBU Total memory of system is 17179869184 bytes
DEBU Got bundle path: /Users/aliborhani/.crc/cache/crc_okd_vfkit_4.11.0-0.okd-2022-08-20-022919_arm64.crcbundle
file '/Users/aliborhani/.crc/cache/crc_okd_vfkit_4.11.0-0.okd-2022-08-20-022919_arm64.crcbundle' does not exist
praveenkumar commented 2 years ago

@alibo This is because OKD release doesn't have arm64 bits https://github.com/okd-project/okd/issues/1165 have discussion around it.

cfergeau commented 2 years ago

A user-friendly message when trying to use the okd preset on ARM would be a lot more useful than the error reported in this bug report.

gbraad commented 2 years ago

@praveenkumar @cfergeau perhaps detect this when the preset is chosen

gbraad commented 2 years ago

selected on Apple Silicon (M1/M2 - arm64)

selected on an Arm platform