Skip to content

[release-5.0] NO-ISSUE: Fix OVN failure after hostname change in cleanup script - #7303

Closed
agullon wants to merge 2 commits into
openshift:release-5.0from
agullon:fix-hostname-ovs-cleanup-release-5.0
Closed

[release-5.0] NO-ISSUE: Fix OVN failure after hostname change in cleanup script#7303
agullon wants to merge 2 commits into
openshift:release-5.0from
agullon:fix-hostname-ovs-cleanup-release-5.0

Conversation

@agullon

@agullon agullon commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Manual backport of #7302 to release-5.0.

  • Restart openvswitch service after OVN cleanup in microshift-cleanup-data.sh. The script was stopping ovsdb-server without restarting the openvswitch service, leaving ovs-vswitchd running without its database. This stale OVS state prevented OVN from reinitializing on the next MicroShift start, causing all pods to get stuck in FailedCreatePodSandBox.
  • Change hostname test from .local to .example. The .local TLD is reserved for mDNS (RFC 6762) and can cause DNS interference with OVN initialization, especially on systems with Avahi/systemd-resolved.

Root Cause

Found during RC.0 release testing (PR #7284). The hostname RF test (suites/standard1/hostname.robot) was failing in all release scenarios that use optional images (*-lrel-optional). The failure chain:

  1. Test changes hostname to microshift.local and calls microshift-cleanup-data --all --keep-images
  2. Cleanup script stops ovsdb-server.service (line 106) but never restarts openvswitch.service
  3. ovs-vswitchd continues running without its database
  4. MicroShift starts, microshift.service has Wants=openvswitch.service — if systemd considers it still "active", it won't restart it
  5. OVN-Kubernetes fails: on RPM (error clearing stale ovs flow targets), on bootc (readiness probe returns empty)
  6. CNI conf /etc/cni/net.d/10-ovn-kubernetes.conf is never created → all pods stuck in FailedCreatePodSandBox
  7. With optional components installed (~20 workloads), the 600s healthcheck timeout is exceeded

This was masked in non-release scenarios because those use images without optional components — fewer workloads meant the system could recover in time despite the stale OVS state.

Test plan

  • Verify hostname RF test passes in standard1 scenarios with optional images
  • Verify microshift-cleanup-data --all followed by systemctl start microshift results in healthy OVN
  • Verify no regression in non-release standard1 scenarios

🤖 Generated with Claude Code

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@agullon: This pull request explicitly references no jira issue.

Details

In response to this:

Summary

Manual backport of #7302 to release-5.0.

  • Restart openvswitch service after OVN cleanup in microshift-cleanup-data.sh. The script was stopping ovsdb-server without restarting the openvswitch service, leaving ovs-vswitchd running without its database. This stale OVS state prevented OVN from reinitializing on the next MicroShift start, causing all pods to get stuck in FailedCreatePodSandBox.
  • Change hostname test from .local to .example. The .local TLD is reserved for mDNS (RFC 6762) and can cause DNS interference with OVN initialization, especially on systems with Avahi/systemd-resolved.

Root Cause

Found during RC.0 release testing (PR #7284). The hostname RF test (suites/standard1/hostname.robot) was failing in all release scenarios that use optional images (*-lrel-optional). The failure chain:

  1. Test changes hostname to microshift.local and calls microshift-cleanup-data --all --keep-images
  2. Cleanup script stops ovsdb-server.service (line 106) but never restarts openvswitch.service
  3. ovs-vswitchd continues running without its database
  4. MicroShift starts, microshift.service has Wants=openvswitch.service — if systemd considers it still "active", it won't restart it
  5. OVN-Kubernetes fails: on RPM (error clearing stale ovs flow targets), on bootc (readiness probe returns empty)
  6. CNI conf /etc/cni/net.d/10-ovn-kubernetes.conf is never created → all pods stuck in FailedCreatePodSandBox
  7. With optional components installed (~20 workloads), the 600s healthcheck timeout is exceeded

This was masked in non-release scenarios because those use images without optional components — fewer workloads meant the system could recover in time despite the stale OVS state.

Test plan

  • Verify hostname RF test passes in standard1 scenarios with optional images
  • Verify microshift-cleanup-data --all followed by systemctl start microshift results in healthy OVN
  • Verify no regression in non-release standard1 scenarios

🤖 Generated with Claude Code

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: d77160c1-7596-47a2-90de-500650e9d456

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from jogeo and pmtk September 2, 2026 10:38
@openshift-ci

openshift-ci Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agullon

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 Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 2, 2026
…-data

The cleanup script stops ovsdb-server but does not restart the
openvswitch service, leaving ovs-vswitchd running without its
database. This stale OVS state prevents OVN from reinitializing
when MicroShift is restarted, causing all pods to get stuck in
FailedCreatePodSandBox.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
The .local TLD is reserved for mDNS (RFC 6762) and can cause DNS
interference with OVN initialization on systems with Avahi or
systemd-resolved, contributing to healthcheck timeouts after
hostname changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@agullon
agullon force-pushed the fix-hostname-ovs-cleanup-release-5.0 branch from 315c1c7 to fd398bb Compare September 2, 2026 10:51
@openshift-ci

openshift-ci Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@agullon: all tests passed!

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.

@pacevedom

Copy link
Copy Markdown
Contributor

/pipeline auto

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

The pipeline-auto label has been added to this PR. Second-stage tests will be triggered automatically when all first-stage tests pass.

@agullon

agullon commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated into #7327

@agullon agullon closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. pipeline-auto

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants