Bug 1850681 - cluster-config-operator does not properly update serviceEndpoint status
Summary: cluster-config-operator does not properly update serviceEndpoint status
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.6.0
Assignee: Abhinav Dahiya
QA Contact: Yunfei Jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-24 17:30 UTC by Daneyon Hansen
Modified: 2020-10-27 16:09 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:08:51 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-config-operator pull 143 0 None closed Bug 1850681: aws_platform_service_location: resync when user unsets the service endpoints in spec 2020-10-26 02:00:00 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:09:16 UTC

Description Daneyon Hansen 2020-06-24 17:30:25 UTC
Description of problem:
AWS Endpoints are not removed from status of infrastructures.config.openshift.io after being removed from spec.

Version-Release number of the following components:
Cluster version is 4.6.0-0.nightly-2020-06-23-160540

How reproducible:
100%
Steps to Reproduce:
1. Install a 4.6.0 cluster
2. Update spec of infrastructure/cluster, for example:
  platformSpec:
    aws:
      serviceEndpoints:
      - name: route53
        url: https://route53.amazonaws.com

3. Verify status of infrastructure/cluster has been updated.
4. Remove the changes from step 3.
5. Verify status of infrastructure/cluster has NOT been updated.

Actual results:
Status still shows:

  platformSpec:
    aws:
      serviceEndpoints:
      - name: route53
        url: https://route53.amazonaws.com

Expected results:
That status was updated after removing serviceEndpoints from spec.

Additional info:
The following EP added custom endpoint support:

https://github.com/openshift/enhancements/blob/master/enhancements/installer/aws-custom-region-and-endpoints.md

Comment 1 Abhinav Dahiya 2020-06-24 18:05:47 UTC
> https://github.com/openshift/cluster-config-operator/blob/3ff40a9228ec536487ab392a6c2ec41a55e5e7cc/pkg/operator/aws_platform_service_location/controller.go#L78-L81

seems like the controller doesn't reconcile on reseting the list to zero.. as it treats that as no-op, 

we should change it to skip only when spec and status match, and not len == 0

Comment 2 Abhinav Dahiya 2020-06-29 17:16:43 UTC
this should be a blocker for 4.6 but we won't be able to get to it because of higher priority bugs.

Comment 6 Yunfei Jiang 2020-08-17 07:55:26 UTC
verified. PASS.

version: 4.6.0-0.nightly-2020-08-15-132419

1. oc describe infrastructure/cluster
...
Spec:
  Cloud Config:
    Name:  
  Platform Spec:
    Aws:
    Type:  AWS
...

2. oc edit infrastructure/cluster  (add service endpoint)

3. oc describe infrastructure/cluster
...
Spec:
  Cloud Config:
    Name:  
  Platform Spec:
    Aws:
      Service Endpoints:
        Name:  route53
        URL:   https://route53.amazonaws.com
    Type:      AWS
...

4. oc edit infrastructure/cluster  (remove service endpoint)

5. oc describe infrastructure/cluster
...
Spec:
  Cloud Config:
    Name:  
  Platform Spec:
    Aws:
    Type:  AWS
...

Comment 8 errata-xmlrpc 2020-10-27 16:08:51 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.6 GA Images), 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-2020:4196


Note You need to log in before you can comment on or make changes to this bug.