Fix OVN condition flapping during minor updates by karelyatin · Pull Request #1966 · openstack-k8s-operators/openstack-operator · GitHub
Skip to content

Fix OVN condition flapping during minor updates#1966

Open
karelyatin wants to merge 1 commit into
openstack-k8s-operators:mainfrom
karelyatin:OSPRH-31318
Open

Fix OVN condition flapping during minor updates#1966
karelyatin wants to merge 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

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>
@openshift-ci openshift-ci Bot requested review from abays and rabi July 1, 2026 14:57
@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@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

@karelyatin karelyatin requested a review from dprince July 2, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant