Skip to content

Fix OVN condition flapping during minor updates#1966

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
karelyatin:OSPRH-31318
Jul 8, 2026
Merged

Fix OVN condition flapping during minor updates#1966
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
karelyatin:OSPRH-31318

Conversation

@karelyatin

Copy link
Copy Markdown
Contributor

During minor updates, reconcileOVNControllers was called on every reconcile throughout all update phases, causing two issues:

  1. OVNReadyCondition flapping: Since InitConditions() resets all conditions to Unknown on each reconcile, calling reconcileOVNControllers during later phases (RabbitMQ, Galera, etc.) could transiently flip OVNReadyCondition to False, blocking the OpenStackVersion controller from maintaining MinorUpdateOVNControlplane as True.

  2. Metrics DaemonSet unnecessary restarts: reconcileOVNControllers passed an empty string for the metrics cert name, clearing the MetricsTLS fields on the OVNController CR. This changed the metrics config hash, causing two spurious DaemonSet rollouts — once when MetricsTLS was cleared during the update, and again when the normal reconcile path restored it after the update completed.

Fix both by:

  • Skipping reconcileOVNControllers after the OVN controlplane phase completes, directly marking OVNReadyCondition True instead (needed because InitConditions() resets conditions each reconcile).
  • Passing the correct metrics cert name via EnsureOVNMetricsCert so MetricsTLS stays consistent when reconcileOVNControllers does run.

There was another issue in ovn-operator for pre mature readiness, that is being fixed as part of openstack-k8s-operators/ovn-operator#587

Related-Issue: https://redhat.atlassian.net/browse/OSPRH-31318
Assisted-By: Claude

@openshift-ci openshift-ci Bot requested review from abays and rabi July 1, 2026 14:57
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

OpenStackControlPlane CRD Size Report

Metric Value
CRD JSON size 350002 bytes (342KB)
Base branch size 350002 bytes
Change +0.00%
Status yellow — growing
Threshold reference
Color Range Meaning
🟢 green < 300KB Comfortable
🟡 yellow 300–400KB Growing
🟠 orange 400–750KB Concerning
🔴 red > 750KB Approaching 1.5MB etcd limit (cut in half to allow space for update)

@karelyatin

Copy link
Copy Markdown
Contributor Author

/test openstack-operator-build-deploy-kuttl-4-18
unrelated failure operator restarts

@karelyatin

Copy link
Copy Markdown
Contributor Author

/test openstack-operator-build-deploy-kuttl-4-18
error: Post "https://api.oko-07.oooci.ccitredhat.com:6443/apis/build.openshift.io/v1/namespaces/openstack/buildconfigs": net/http: TLS handshake timeout

@karelyatin

Copy link
Copy Markdown
Contributor Author

/test openstack-operator-build-deploy-kuttl-4-18
Error from server: rpc error: code = Unavailable desc = keepalive ping failed to receive ACK within timeout

@karelyatin karelyatin requested review from dprince and stuggi July 2, 2026 14:21
Comment thread internal/controller/core/openstackcontrolplane_controller.go Outdated
Comment thread internal/controller/core/openstackcontrolplane_controller.go Outdated
During minor updates, reconcileOVNControllers was called on every
reconcile throughout all update phases, causing two issues:

1. OVNReadyCondition flapping: Since InitConditions() resets all
   conditions to Unknown on each reconcile, calling
   reconcileOVNControllers during later phases (RabbitMQ, Galera, etc.)
   could transiently flip OVNReadyCondition to False, blocking the
   OpenStackVersion controller from maintaining MinorUpdateOVNControlplane
   as True.

2. Metrics DaemonSet unnecessary restarts: reconcileOVNControllers
   passed an empty string for the metrics cert name, clearing the
   MetricsTLS fields on the OVNController CR. This changed the metrics
   config hash, causing two spurious DaemonSet rollouts — once when
   MetricsTLS was cleared during the update, and again when the normal
   reconcile path restored it after the update completed.

Fix both by:
- Skipping reconcileOVNControllers after the OVN controlplane phase
  completes, directly marking OVNReadyCondition True instead (needed
  because InitConditions() resets conditions each reconcile).
- Passing the correct metrics cert name via EnsureOVNMetricsCert so
  MetricsTLS stays consistent when reconcileOVNControllers does run.

There was another issue in ovn-operator for pre mature readiness, that is
being fixed as part of openstack-k8s-operators/ovn-operator#587

Related-Issue: https://redhat.atlassian.net/browse/OSPRH-31318
Assisted-By: Claude
Signed-off-by: Yatin Karel <ykarel@redhat.com>
@karelyatin

Copy link
Copy Markdown
Contributor Author

/test functional
unrelated failure dataplane

@karelyatin

Copy link
Copy Markdown
Contributor Author

/test openstack-operator-build-deploy-kuttl-4-18
github rate limit

@karelyatin

Copy link
Copy Markdown
Contributor Author

/test openstack-operator-build-deploy-kuttl-4-18
net/http: TLS handshake timeout

@karelyatin

Copy link
Copy Markdown
Contributor Author

/test openstack-operator-build-deploy-kuttl-4-18
must gather failure

@karelyatin

Copy link
Copy Markdown
Contributor Author

/test openstack-operator-build-deploy-kuttl-4-18
net/http: request canceled (Client.Timeout exceeded while awaiting headers)

@karelyatin

Copy link
Copy Markdown
Contributor Author

/test openstack-operator-build-deploy-kuttl-4-18
dial tcp: lookup api.oko-07.oooci.ccitredhat.com on 172.30.0.10:53: no such host"

@karelyatin

Copy link
Copy Markdown
Contributor Author

/test openstack-operator-build-deploy-kuttl-4-18
dial tcp: lookup api.oko-23.oooci.ccitredhat.com

@karelyatin

Copy link
Copy Markdown
Contributor Author

/cherry-pick 18.0-fr6

@openshift-cherrypick-robot

Copy link
Copy Markdown

@karelyatin: once the present PR merges, I will cherry-pick it on top of 18.0-fr6 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick 18.0-fr6

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-sigs/prow repository.

@stuggi stuggi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@abays abays left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abays, karelyatin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved label Jul 8, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 62e4071 into openstack-k8s-operators:main Jul 8, 2026
8 checks passed
@openshift-cherrypick-robot

Copy link
Copy Markdown

@karelyatin: new pull request created: #1976

Details

In response to this:

/cherry-pick 18.0-fr6

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants