Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1972417

Summary: [Assisted-4.8] [Staging] OCS and CNV operators deployments fails for cluster that require HTTP_PROXY
Product: OpenShift Container Platform Reporter: Lital Alon <lalon>
Component: assisted-installerAssignee: Piotr Kliczewski <pkliczew>
assisted-installer sub component: CNV Plugin QA Contact: Lital Alon <lalon>
Status: CLOSED NOTABUG Docs Contact:
Severity: urgent    
Priority: unspecified CC: aos-bugs, masayag, nshidlin
Version: 4.8Flags: lalon: needinfo-
lalon: needinfo-
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-16 11:44:07 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:
Attachments:
Description Flags
installation logs none

Description Lital Alon 2021-06-15 20:23:07 UTC
Created attachment 1791388 [details]
installation logs

Description of problem:
OCS and CNV operators deployment fails for a cluster that require HTTP_PROXY.
Pods are failing to start with image pull error.
In addition:
1. CNV operator is hang on progressing, and cluster is hang on Finalizing (i expected timeout)
2. Controller log is missing OLM operators log print


Version-Release number of selected component (if applicable):
Staging, v1.0.21.3

How reproducible:
100%

Steps to Reproduce:
1. Boot 3 masters, and block http/s traffic for cluster nodes (using iptable rules)
2. Setup http proxy server (i.e squid container)
3. Create a cluster - choose to generate iso from http proxy server
4. enable ocs and cnv
5. install cluster

Actual results:
1. Cluster is hang on Finalizing
2. CNV operator hang on progressing
3. Controller log is missing OLM operator deployment log print
4. Operator deployment failed, pods are failing to pull image

Expected results:
1. OCS and CNV deployment success
2. In case of operator failure - cluster should fail on timeout

Additional info:
Cluster: https://qaprodauth.cloud.redhat.com/openshift/assisted-installer/clusters/77bdeb31-7112-4636-a925-a5f8ae193527

[root@sealusa48 assisted-test-infra]# oc get po -n openshift-storage
NAME                                            READY   STATUS             RESTARTS   AGE
csi-cephfsplugin-8tfvr                          1/3     ImagePullBackOff   0          65m
csi-cephfsplugin-9z7nt                          3/3     Running            0          65m
csi-cephfsplugin-provisioner-6685dc595c-bvvtp   2/6     ImagePullBackOff   0          65m
...


[root@sealusa48 assisted-test-infra]# oc get pods -n openshift-cnv
NAME                                                  READY   STATUS                  RESTARTS   AGE
bridge-marker-5w8p7                                   1/1     Running                 0          23m
bridge-marker-fjbzd                                   1/1     Running                 0          23m
bridge-marker-mm7bl                                   1/1     Running                 0          23m
cdi-apiserver-54cfd94d-w4wbh                          1/1     Running                 0          23m
cdi-deployment-67cd58976-xzpnp                        0/1     ImagePullBackOff        0          23m

...
kubevirt-node-labeller-rxg8l                          0/1     Init:ImagePullBackOff   0          23m
kubevirt-node-labeller-s9h85                          0/1     Init:ImagePullBackOff   0          23m
kubevirt-node-labeller-vw9pj                          0/1     Init:ImagePullBackOff   0          23m
nmstate-handler-k2qc5                                 1/1     Running                 0          23m

Comment 1 Piotr Kliczewski 2021-06-16 06:18:46 UTC
Moti, I remember you work on the proxy in the past. Do you know why some nodes are unable to pull the images?

Comment 2 Moti Asayag 2021-06-16 07:12:09 UTC
The link to https://qaprodauth.cloud.redhat.com/openshift/assisted-installer/clusters/77bdeb31-7112-4636-a925-a5f8ae193527 is unavaiable.

However, gathered more information from the installed cluster:

[root@sealusa48 ~]# oc get proxy cluster -o yaml
apiVersion: config.openshift.io/v1
kind: Proxy
metadata:
  creationTimestamp: "2021-06-15T17:31:25Z"
  generation: 1
    manager: cluster-bootstrap
    operation: Update
    time: "2021-06-15T17:31:26Z"
  name: cluster
  resourceVersion: "471"
  uid: 6277ca16-4a24-4238-a264-f8e400a8b1b5
spec:
  httpProxy: http://assisted:redhat@10.19.131.5:59151
  httpsProxy: http://assisted:redhat@10.19.131.5:59151
  noProxy: 192.168.127.0/24,.test-infra-cluster-c912ff98.qe.lab.redhat.com,10.128.0.0/14,172.30.0.0/16
  trustedCA:
    name: user-ca-bundle
status:
  httpProxy: http://assisted:redhat@10.19.131.5:59151
  httpsProxy: http://assisted:redhat@10.19.131.5:59151
  noProxy: .cluster.local,.svc,.test-infra-cluster-c912ff98.qe.lab.redhat.com,10.128.0.0/14,127.0.0.1,172.30.0.0/16,192.168.127.0/24,api-int.test-infra-cluster-c912ff98.qe.lab.redhat.com,localhost

and this issue is not limited only to OCS and CNV namespaces:
[root@sealusa48 ~]# oc get pods -A | grep ImagePullBackOff
openshift-cnv                                      cdi-deployment-67cd58976-xzpnp                                    0/1     ImagePullBackOff        0          12h
openshift-cnv                                      kubevirt-node-labeller-rxg8l                                      0/1     Init:ImagePullBackOff   0          12h
openshift-cnv                                      kubevirt-node-labeller-s9h85                                      0/1     Init:ImagePullBackOff   0          12h
openshift-cnv                                      kubevirt-node-labeller-vw9pj                                      0/1     Init:ImagePullBackOff   0          12h
openshift-cnv                                      virt-api-6cbf698cd-2xhl4                                          0/1     ImagePullBackOff        0          12h
openshift-cnv                                      virt-api-6cbf698cd-t9zcv                                          0/1     ImagePullBackOff        0          12h
openshift-cnv                                      vm-import-controller-54bd9d975b-zrwns                             0/1     ImagePullBackOff        0          12h
openshift-marketplace                              certified-operators-n8mxp                                         0/1     ImagePullBackOff        0          12h
openshift-marketplace                              community-operators-vsg9q                                         0/1     ImagePullBackOff        0          12h
openshift-marketplace                              redhat-marketplace-fss7m                                          0/1     ImagePullBackOff        0          12h
openshift-marketplace                              redhat-operators-f76z9                                            0/1     ImagePullBackOff        0          12h
openshift-monitoring                               prometheus-adapter-648d79bf67-k7b6r                               0/1     ImagePullBackOff        0          68m
openshift-storage                                  csi-cephfsplugin-8tfvr                                            1/3     ImagePullBackOff        0          12h
openshift-storage                                  csi-cephfsplugin-provisioner-6685dc595c-bvvtp                     2/6     ImagePullBackOff        0          12h
openshift-storage                                  csi-cephfsplugin-provisioner-6685dc595c-wfhqc                     3/6     ImagePullBackOff        0          12h
openshift-storage                                  csi-cephfsplugin-t2j76                                            1/3     ImagePullBackOff        0          12h
openshift-storage                                  csi-rbdplugin-provisioner-7d98bc744-455nx                         2/6     ImagePullBackOff        0          12h
openshift-storage                                  csi-rbdplugin-provisioner-7d98bc744-vbnpf                         1/6     ImagePullBackOff        0          12h
openshift-storage                                  csi-rbdplugin-v55gl                                               1/3     ImagePullBackOff        0          12h
openshift-storage                                  csi-rbdplugin-wctd5                                               1/3     ImagePullBackOff        0          12h
openshift-storage                                  rook-ceph-detect-version-ckgg4                                    0/1     ImagePullBackOff        0          20m

Viewing the events of pod openshift-cnv/cdi-deployment-67cd58976-xzpnp:

Events:
  Type    Reason   Age                     From     Message
  ----    ------   ----                    ----     -------
  Normal  Pulling  168m (x121 over 12h)    kubelet  Pulling image "registry.redhat.io/container-native-virtualization/virt-cdi-controller@sha256:3165e1e22341c54170dc0d3413b121d7498bca7c10ee3dc38b819ed6ec0b590f"
  Normal  BackOff  3m29s (x3350 over 12h)  kubelet  Back-off pulling image "registry.redhat.io/container-native-virtualization/virt-cdi-controller@sha256:3165e1e22341c54170dc0d3413b121d7498bca7c10ee3dc38b819ed6ec0b590f"

[root@sealusa48 ~]# ping registry.redhat.io
PING e14353.g.akamaiedge.net (23.51.138.73) 56(84) bytes of data.

Comment 3 Lital Alon 2021-06-16 11:42:47 UTC
After investigation we got to conclusion that this is not a real bug but test issue.

This bug reproduced by test_infra - but test failed, due to operator deployment failure caused by a bug that doesn't related to HTTP_PROXY (https://bugzilla.redhat.com/show_bug.cgi?id=1968181). 
This failure caused the test-infra container to finish, which caused the HTTP proxy server to be down (because the squad container, AKA proxy server, is starting up from within test-infra container).

Both OCS and CNV were in fact Progressing, and proxy was down, which caused pull image error.

Added a test to cover OCS CNV and HTTP proxy to test infra, but it wont run properly until mentioned OCS bug will be fixed (https://gitlab.cee.redhat.com/ocp-edge-qe/kni-assisted-installer-auto/-/merge_requests/354)

Closing the bug.