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

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: karelyatin
Once this PR has been reviewed and has the lgtm label, please assign rabi for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@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)

@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@karelyatin: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/openstack-operator-build-deploy-kuttl-4-18 f0ad756 link true /test openstack-operator-build-deploy-kuttl-4-18

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

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