Bug 1937214 - Ingress operator performs spurious updates in response to API's defaulting of NodePort service's clusterIPs field
Summary: Ingress operator performs spurious updates in response to API's defaulting of...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.8
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.7.z
Assignee: Miciah Dashiel Butler Masters
QA Contact: Hongan Li
Depends On: 1936030
TreeView+ depends on / blocked
Reported: 2021-03-10 07:45 UTC by OpenShift BugZilla Robot
Modified: 2022-08-04 22:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-04-05 13:56:14 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift cluster-ingress-operator pull 570 0 None open [release-4.7] Bug 1937214: Fix spurious reconciliation of NodePort services 2021-03-17 01:00:39 UTC
Red Hat Product Errata RHSA-2021:1005 0 None None None 2021-04-05 13:56:32 UTC

Description OpenShift BugZilla Robot 2021-03-10 07:45:38 UTC
+++ This bug was initially created as a clone of Bug #1936030 +++

Description of problem:

When the ingress operator reconciles an ingresscontroller that has the "NodePortService" endpoint publishing strategy type, the operator gets the ingresscontroller's nodeport service (if one exists) from the API to determine whether the operator needs to create or update the service.  If the service does not exist, the operator creates it, and if the service does exist, the operator compares it with what the operator expects to get in order to determine whether an update is needed for that service.  In this comparison, if the API has set a value for the service's clusterIPs field, the operator detects the update and tries to set the clusterIPs field back to the empty value.  The operator should not update the service in response to API defaulting.

Version-Release number of selected component (if applicable):

The clusterIPs field is new in Kubernetes 1.20 (OpenShift 4.7).

Steps to Reproduce:

1. Launch a new cluster.

2. Create an ingresscontroller with the "NodePortService" endpoint publishing strategy:

    oc create -f - <<'EOF'
    apiVersion: operator.openshift.io/v1
    kind: IngressController
      name: nodeport
      namespace: openshift-ingress-operator
      replicas: 1
      domain: example.com
        type: NodePortService

3. Check the ingress operator's logs:

    oc -n openshift-ingress-operator logs deploy/ingress-operator -c ingress-operator

Actual results:

The ingress operator's logs have "updated NodePort service" repeated several times.

Expected results:

The ingress operator should ignore the clusterIPs field's value and should not log "updated NodePort service" unless the service is updated outside of API defaulting.

Comment 2 Hongan Li 2021-03-25 03:25:13 UTC
Verified with 4.7.0-0.nightly-2021-03-24-213550 and passed.

didn't see "updated NodePort service" and just saw one related logs as below:

$ oc -n openshift-ingress-operator logs deploy/ingress-operator -c ingress-operator | grep NodePort
2021-03-25T03:18:03.762Z	INFO	operator.ingress_controller	ingress/controller.go:667	created NodePort service{"service": "&Service{ObjectMeta:{router-nodeport-nodeport  openshift-ingress /api/v1/namespaces/openshift-ingress/services/router-nodeport-nodeport

Comment 5 errata-xmlrpc 2021-04-05 13:56:14 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.7.5 security and 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.


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