-
Notifications
You must be signed in to change notification settings - Fork 220
Bug 1936030: Fix spurious reconciliation of NodePort services #567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1936030: Fix spurious reconciliation of NodePort services #567
Conversation
This commit improves log output when reconciling managed resources to include the diff between the current and updated resources when updating resources. * pkg/operator/controller/canary/route.go (updateCanaryRoute): Log the diff between the current and updated resources when updating the route. * pkg/operator/controller/ingress/cluster-role.go (ensureClusterRole): Move logging of updates from here... (updateClusterRole): ...to here. Log diff. * pkg/operator/controller/ingress/dns.go (ensureWildcardDNSRecord): Move logging of updates from here... (updateDNSRecord): ...to here. Log diff. * pkg/operator/controller/ingress/load_balancer_service.go (ensureLoadBalancerService): Move logging of updates from here... (updateLoadBalancerService): ...to here. Log diff. * pkg/operator/controller/ingress/monitoring.go (ensureServiceMonitor): Move logging of updates from here... (updateServiceMonitor): ...to here. Log diff. * pkg/operator/controller/ingress/nodeport_service.go (ensureNodePortService): Move logging of updates from here... (updateNodePortService): ...to here. Log diff. * pkg/operator/controller/ingress/poddisruptionbudget.go (ensureRouterPodDisruptionBudget): Move logging of updates from here... (updateRouterPodDisruptionBudget): ...to here. Log diff. * pkg/operator/controller/ingress/rsyslog_configmap.go (ensureRsyslogConfigMap): Move logging of updates from here... (updateRouterPodDisruptionBudget): ...to here. Log diff. * pkg/operator/controller/ingress/serviceca_configmap.go (ensureServiceCAConfigMap): Move logging of updates from here... (updateServiceCAConfigMap): ...to here. Log diff.
Ignore the clusterIPs field when comparing NodePort services to determine whether an update is required. Before this commit, the update logic would keep trying to revert the default value that the API set for the service's clusterIPs field. The clusterIPs field is new in Kubernetes 1.20 (OpenShift 4.7). This commit fixes bug 1936030. https://bugzilla.redhat.com/show_bug.cgi?id=1936030 * pkg/operator/controller/ingress/nodeport_service.go (nodePortServiceChanged): Ignore the service's clusterIPs field. * pkg/operator/controller/ingress/nodeport_service_test.go (TestNodePortServiceChanged): Verify that nodePortServiceChanged returns false if the only mutation is that the clusterIPs field's value has changed.
|
@Miciah: This pull request references Bugzilla bug 1936030, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
We should backport this to OpenShift 4.7, which added the |
|
@Miciah: once the present PR merges, I will cherry-pick it on top of release-4.7 in a new PR and assign it to you. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/retest |
3 similar comments
|
/retest |
|
/retest |
|
/retest |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Miciah, sgreene570 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
/test e2e-upgrade |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@Miciah: All pull requests linked via external trackers have merged: Bugzilla bug 1936030 has been moved to the MODIFIED state. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@Miciah: new pull request created: #570 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Log diffs when reconciling resources
This change improves log output when reconciling managed resources to include the diff between the current and updated resources when updating resources.
pkg/operator/controller/canary/route.go(updateCanaryRoute): Log the diff between the current and updated resources when updating the route.pkg/operator/controller/ingress/cluster-role.go(ensureClusterRole): Move logging of updates from here...(
updateClusterRole): ...to here. Log diff.pkg/operator/controller/ingress/dns.go(ensureWildcardDNSRecord): Move logging of updates from here...(
updateDNSRecord): ...to here. Log diff.pkg/operator/controller/ingress/load_balancer_service.go(ensureLoadBalancerService): Move logging of updates from here...(
updateLoadBalancerService): ...to here. Log diff.pkg/operator/controller/ingress/monitoring.go(ensureServiceMonitor): Move logging of updates from here...(
updateServiceMonitor): ...to here. Log diff.pkg/operator/controller/ingress/nodeport_service.go(ensureNodePortService): Move logging of updates from here...(
updateNodePortService): ...to here. Log diff.pkg/operator/controller/ingress/poddisruptionbudget.go(ensureRouterPodDisruptionBudget): Move logging of updates from here...(
updateRouterPodDisruptionBudget): ...to here. Log diff.pkg/operator/controller/ingress/rsyslog_configmap.go(ensureRsyslogConfigMap): Move logging of updates from here...(
updateRouterPodDisruptionBudget): ...to here. Log diff.pkg/operator/controller/ingress/serviceca_configmap.go(ensureServiceCAConfigMap): Move logging of updates from here...(
updateServiceCAConfigMap): ...to here. Log diff.nodePortServiceChanged: Fix forclusterIPsIgnore the
clusterIPsfield when comparing NodePort services to determine whether an update is required.Before this change, the update logic would keep trying to revert the default value that the API set for the service's
clusterIPsfield.The
clusterIPsfield is new in Kubernetes 1.20 (OpenShift 4.7).pkg/operator/controller/ingress/nodeport_service.go(nodePortServiceChanged): Ignore the service'sclusterIPsfield.pkg/operator/controller/ingress/nodeport_service_test.go(TestNodePortServiceChanged): Verify thatnodePortServiceChangedreturns false if the only mutation is that theclusterIPsfield's value has changed.