Bug 2023950

Summary: make test-e2e-operator on kubernetes-nmstate results in failure to pull image from "registry:5000" repository
Product: OpenShift Container Platform Reporter: Thomas L Falcon <tfalcon>
Component: NetworkingAssignee: Christoph Stäbler <cstabler>
Networking sub component: kubernetes-nmstate-operator QA Contact: Aleksandra Malykhin <amalykhi>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: low CC: amalykhi, aos-bugs, mtarsel
Version: 4.10   
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:28:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas L Falcon 2021-11-16 20:05:40 UTC
Description of problem:
I have deployed the kubernetes-nmstate operator on a bare-metal ppc64le cluster running openshift 4.9. test-e2e-operator tests fail and result in Events logged with failures to pull from an image repository "registry:5000":

Failed to pull image "registry:5000/tlfalcon5/kubernetes-nmstate-operator:latest": rpc error: code = Unknown desc = pinging container registry registry:5000: Get "https://registry:5000/v2/": dial tcp: lookup registry on 192.168.79.1:53: no such host

Back-off pulling image "registry:5000/tlfalcon5/kubernetes-nmstate-operator:latest"

which originates here:
https://github.com/nmstate/kubernetes-nmstate/blob/main/test/e2e/operator/nmstate_install_test.go#L95

Providing the IMAGE_REGISTRY environment variable does not have any effect.

make test-e2e-operator KUBEVIRT_PROVIDER=external KUBECONFIG=/root/ocp4-workdir/auth/kubeconfig IMAGE_REGISTRY=quay.io IMAGE_REPO=tlfalcon5 IMAGE_BUILDER=podman

Comment 4 Aleksandra Malykhin 2022-02-10 06:44:55 UTC
Verified on kubernetes-nmstate 4.10.0-202201310820
Cluster version is 4.10.0-0.nightly-2022-02-02-000921

Req:
install  go >= 1.17 
install podman >=3.3.1 or docker

You need to run the tests from the kubernetes-nmstate folder. As the test setup will build and push the operator image, you must be able to pull & push from your registry and the repository where the operator is pushed to must be readable from your cluster (-> easiest is to make the repository public)

You can use this command to create the repos 'IMAGE_BUILDER=<podman/docker> IMAGE_REPO=<your repo user> make push' and change it permissions manually if you have problems

Steps to reproduce:
git clone https://github.com/openshift/kubernetes-nmstate
cd kubernetes-nmstate/
docker login -u="..." -p="..." <your image repo>
KUBEVIRT_PROVIDER=external KUBECONFIG=<path to kubeconfig> DEV_IMAGE_REGISTRY=<your image repo> IMAGE_REPO=<your repo user> IMAGE_BUILDER=<podman/docker> make cluster-sync-operator test-e2e-operator

Result:
Ran 4 of 4 Specs in 174.214 seconds
SUCCESS! -- 4 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Comment 6 errata-xmlrpc 2022-03-10 16:28:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056