Bug 2007674

Summary: [4.7.z] Cluster-version operator loads proxy config from spec, not status
Product: OpenShift Container Platform Reporter: Pablo Alonso Rodriguez <palonsor>
Component: Cluster Version OperatorAssignee: Over the Air Updates <aos-team-ota>
Status: CLOSED ERRATA QA Contact: Johnny Liu <jialiu>
Severity: low Docs Contact:
Priority: low    
Version: 4.2.0CC: aos-bugs, jialiu, jokerman, palonsor, wking
Target Milestone: ---   
Target Release: 4.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1980411
: 2014165 (view as bug list) Environment:
Last Closed: 2021-10-12 19:52:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1980411, 2014170    
Bug Blocks: 2014165    

Comment 3 Johnny Liu 2021-09-28 10:40:41 UTC
It does not complain about the proxy URI, using staus for that.

[root@preserve-jialiu-ansible ~]# oc get co network
NAME      VERSION                             AVAILABLE   PROGRESSING   DEGRADED   SINCE
network   4.7.0-0.nightly-2021-09-27-191553   True        False         False      153m

[root@preserve-jialiu-ansible ~]# oc edit proxies.config.openshift.io
proxy.config.openshift.io/cluster edited

[root@preserve-jialiu-ansible ~]# oc get proxies.config.openshift.io cluster -o json
{
    "apiVersion": "config.openshift.io/v1",
    "kind": "Proxy",
    "metadata": {
        "creationTimestamp": "2021-09-28T07:56:21Z",
        "generation": 2,
        "name": "cluster",
        "resourceVersion": "71624",
        "selfLink": "/apis/config.openshift.io/v1/proxies/cluster",
        "uid": "45e01e45-9345-4758-a14d-076bd1818599"
    },
    "spec": {
        "httpProxy": "proxy-user1",
        "httpsProxy": "proxy-user1",
        "noProxy": "test.no-proxy.com",
        "trustedCA": {
            "name": ""
        }
    },
    "status": {
        "httpProxy": "http://proxy-user1:xxxx@ec2-3-144-25-95.us-east-2.compute.amazonaws.com:3128",
        "httpsProxy": "http://proxy-user1:xxxx@ec2-3-144-25-95.us-east-2.compute.amazonaws.com:3128",
        "noProxy": ".cluster.local,.svc,.us-east-2.compute.internal,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.jialiu47aws.qe.devcluster.openshift.com,localhost,test.no-proxy.com"
    }
}

[root@preserve-jialiu-ansible ~]# oc get co network
NAME      VERSION                             AVAILABLE   PROGRESSING   DEGRADED   SINCE
network   4.7.0-0.nightly-2021-09-27-191553   True        False         True       155m

[root@preserve-jialiu-ansible ~]# oc describe co network
Name:         network
Namespace:    
Labels:       <none>
Annotations:  include.release.openshift.io/ibm-cloud-managed: true
              include.release.openshift.io/self-managed-high-availability: true
              include.release.openshift.io/single-node-developer: true
              network.operator.openshift.io/last-seen-state: {"DaemonsetStates":[],"DeploymentStates":[]}
API Version:  config.openshift.io/v1
Kind:         ClusterOperator
Metadata:
  Creation Timestamp:  2021-09-28T07:56:23Z
  Generation:          1
<snip-->
Spec:
Status:
  Conditions:
    Last Transition Time:  2021-09-28T10:37:42Z
    Message:               The configuration is invalid for proxy 'cluster' (invalid httpProxy URI: parse "proxy-user1": invalid URI for request). Use 'oc edit proxy.config.openshift.io cluster' to fix.
    Reason:                InvalidProxyConfig
    Status:                True
    Type:                  Degraded

Comment 6 errata-xmlrpc 2021-10-12 19:52:21 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 (OpenShift Container Platform 4.7.33 bug fix 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/RHBA-2021:3686