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 240 forks source link

[BUG] When upgrading from crc 2.33 -> 2.34 OperatorHub shows no items #4109

Open ruivieira opened 7 months ago

ruivieira commented 7 months ago

General information

CRC version

CRC version: 2.34.1+b470b5
OpenShift version: 4.15.3
Podman version: 4.4.4

CRC status

DEBU CRC version: 2.34.1+b470b5
DEBU OpenShift version: 4.15.3
DEBU Podman version: 4.4.4
DEBU Running 'crc status'
crc does not seem to be setup correctly, have you run 'crc setup'?

NOTE: despite this status, crc seems to be working fine.

CRC config

- consent-telemetry                     : no
- cpus                                  : 8
- disk-size                             : 200
- enable-shared-dirs                    : false
- kubeadmin-password                    : <redacted>
- memory                                : 32000
- pull-secret-file                      : /home/rui/crc/pull-secret.txt

Host Operating System

NAME="Fedora Linux"
VERSION="39 (Workstation Edition)"
ID=fedora
VERSION_ID=39
VERSION_CODENAME=""
PLATFORM_ID="platform:f39"
PRETTY_NAME="Fedora Linux 39 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:39"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f39/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=39
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=39
SUPPORT_END=2024-11-12
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Steps to reproduce

  1. Having an existing crc 2.33, upgrade to 2.34
  2. crc stop ; crc delete --cache
  3. crc setup
  4. crc start

Expected

OperatorHub to be available

Actual

OperatorHub empty with no items. community-operators, redhat-operators, redhat-marketplace, certified-operators pods crashing with incorrect SHA value errors.

Logs

No logs collected. Errors detect in the cluster, not crc directly.

This was fixed by disabling and renabling the sources, eg.

oc patch operatorhubs/cluster --type merge --patch "'{"spec":{"sources":[{"disabled": true,"name": <operatorname>}]}}'"
# wait
oc patch operatorhubs/cluster --type merge --patch "'{"spec":{"sources":[{"disabled": false,"name": <operatorname>}]}}'"
praveenkumar commented 7 months ago

Looks like marketplace operator is not able to resync the pull secret because if you check the pod description you will find auth error. Easy fix for it delete all the pods from openshift-marketplace which will allow to have new pods which have updated pull-secret.

$ oc delete pods --all -n openshift-marketplace
praveenkumar commented 7 months ago

Looks like there was issue on OLM side https://issues.redhat.com/browse/OCPBUGS-31645 have more info and https://github.com/operator-framework/operator-lifecycle-manager/pull/3197 upstream PR which is merged. So hopefully when we have latest version of OLM it will be fixed automatic.

ruivieira commented 7 months ago

Thanks for the update @praveenkumar!

marcelomrwin commented 7 months ago

I faced the same problem. After updating the version, Operator Hub disappeared. My environment is macOS 14.4 Intel based.

cfergeau commented 7 months ago

I faced the same problem. After updating the version, Operator Hub disappeared. My environment is macOS 14.4 Intel based.

You will need tihs workaround https://github.com/crc-org/crc/issues/4109#issuecomment-2042497411 until at least the next crc release.

nazcardev commented 6 months ago

Also faced this on Windows. I deleted the Pods that were saying crashloopback and reload/saved YAML in openshift-marketplace project to get OperatorHub working again.