Skip to content

OCPBUGS-86826: Make vsphere template updates atomic#6117

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
djoshy:make-vsphere-atomic
Jun 23, 2026
Merged

OCPBUGS-86826: Make vsphere template updates atomic#6117
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
djoshy:make-vsphere-atomic

Conversation

@djoshy

@djoshy djoshy commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

- What I did

  • Import new OVA under a temp name, keeping the old template live throughout the upload
  • Swap with two fast renames once new template is ready and then destroy the old template
  • If we crash mid-swap, next reconciliation detects the missing template and renames the old one back

- How to verify it

This is fairly hard to reproduce as it only happens due to network failures. At the very least, we should ensure that vsphere bootimage tests continue to work as expected.

Summary by CodeRabbit

  • New Features

    • Deterministic temporary and rollback naming to enable safer, atomic template swaps without downtime.
  • Bug Fixes

    • OVF import now keeps existing live templates available during upload/import and switches templates via a rename-based swap after import.
    • Improved crash recovery: if the expected production template is missing, it automatically restores it from the rollback name and continues reconciliation.
    • Automatically cleans up stale temporary/rollback VMs from prior failed attempts.

@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 jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jun 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@djoshy: This pull request references Jira Issue OCPBUGS-86826, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

- What I did

  • Import new OVA under a temp name, keeping the old template live throughout the upload
  • Swap with two fast renames once new template is ready and then destroy the old template
  • If we crash mid-swap, next reconciliation detects the missing template and renames the old one back

- How to verify it

This is fairly hard to reproduce as it only happens due to network failures. At the very least, we should ensure that vsphere bootimage tests continue to work as expected.

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 Jun 2, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7de4ffdf-aa25-48a0-9ceb-4617ad6dc6ec

📥 Commits

Reviewing files that changed from the base of the PR and between fab78e4 and 0ebbf63.

📒 Files selected for processing (1)
  • pkg/controller/bootimage/vsphere_helpers.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/controller/bootimage/vsphere_helpers.go

Walkthrough

Adds deterministic temp/rollback VM naming, pre-import cleanup of stale temp/rollback VMs, importing OVFs to a deterministic temp VM, atomic rename-based template replacement (rename old→rollback, temp→prod, destroy rollback), and reconciliation recovery that renames rollback back to production when needed.

Changes

Template Replacement Atomicity

Layer / File(s) Summary
Atomic operation helpers
pkg/controller/bootimage/vsphere_helpers.go
Introduces atomicTempName, destroyVMIfPresent, and swapTemplate helpers that derive fixed-length deterministic temp/rollback names and perform the atomic rename-swap sequence (existing→rollback, temp→prod, destroy old).
Import flow setup and temp VM targeting
pkg/controller/bootimage/vsphere_helpers.go
Computes deterministic temp/rollback names, pre-cleans stale temp/rollback VMs, redirects OVF import to the deterministic temp VM name, and removes the prior pre-import destruction of existing templates.
Post-import template swap or direct rename
pkg/controller/bootimage/vsphere_helpers.go
After OVF import, conditionally calls swapTemplate to perform atomic rename-based replacement when a production template exists, or directly renames the imported temp VM to production when importing for the first time.
Crash recovery for missing templates
pkg/controller/bootimage/vsphere_helpers.go
When reconciliation finds the production template missing, locates the deterministic rollback-name VM, renames it back to the production name, and re-fetches the reference to continue reconciliation.
sequenceDiagram
  participant Reconciler
  participant vSphere
  Reconciler->>vSphere: compute atomicTempName and rollback name
  Reconciler->>vSphere: destroyVMIfPresent stale temp/rollback
  Reconciler->>vSphere: import OVF to temp VM name
  alt production template exists
    Reconciler->>vSphere: swapTemplate (rename Prod→rollback)
    Reconciler->>vSphere: rename temp→Prod
    Reconciler->>vSphere: destroy rollback
  else
    Reconciler->>vSphere: rename temp→Prod
  end
  alt production template missing during reconcile
    Reconciler->>vSphere: locate rollback VM by name
    Reconciler->>vSphere: rename rollback→Prod
    Reconciler->>vSphere: re-fetch Prod reference
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective of the changeset: implementing atomic vSphere template updates. It directly reflects the primary change across all modifications.
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR modifies only production code (vsphere_helpers.go). Repository uses standard Go testing, not Ginkgo. No test files or Ginkgo tests are added/modified in this PR.
Test Structure And Quality ✅ Passed This PR does not add or modify any Ginkgo test code. The existing boot_image_controller_test.go uses testify/assert and standard Go testing with t.Run subtests, not Ginkgo. The vsphere_helpers.go c...
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests are added by this PR. The only modified file (pkg/controller/bootimage/vsphere_helpers.go) is production code containing helper functions for vSphere template replacement, n...
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR does not add new Ginkgo e2e tests; it only modifies production code in vsphere_helpers.go. The SNO test compatibility check is not applicable when no tests are added.
Topology-Aware Scheduling Compatibility ✅ Passed This PR modifies only vsphere_helpers.go, a vSphere infrastructure utility library with no Kubernetes deployment manifests, pod definitions, or scheduling constraints. It adds atomic VM rename/swap...
Ote Binary Stdout Contract ✅ Passed The PR modifies vsphere_helpers.go, a controller helper library with no main(), TestMain(), or suite setup functions. It contains only klog.Infof() calls (which output to stderr in klog v2) and no...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added in this PR. Changes are limited to vsphere_helpers.go production code which contains no test definitions.
No-Weak-Crypto ✅ Passed Code only uses SHA256 (strong algorithm) from crypto/sha256; no weak crypto (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB), custom implementations, or unsafe secret comparisons detected.
Container-Privileges ✅ Passed PR modifies only Go source code (vsphere_helpers.go); container-privileges check applies only to container/K8s manifests, which this PR does not contain.
No-Sensitive-Data-In-Logs ✅ Passed All 10 logging statements in the added code log only non-sensitive infrastructure data (VM names, hostnames, version numbers). No passwords, tokens, API keys, PII, or session IDs are exposed in logs.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

Command failed


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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@djoshy: This pull request references Jira Issue OCPBUGS-86826, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

- What I did

  • Import new OVA under a temp name, keeping the old template live throughout the upload
  • Swap with two fast renames once new template is ready and then destroy the old template
  • If we crash mid-swap, next reconciliation detects the missing template and renames the old one back

- How to verify it

This is fairly hard to reproduce as it only happens due to network failures. At the very least, we should ensure that vsphere bootimage tests continue to work as expected.

Summary by CodeRabbit

Release Notes

  • Bug Fixes
  • Improved reliability and atomicity of vSphere template replacement operations
  • Enhanced crash recovery mechanisms when template imports fail, automatically restoring from previous state
  • Better cleanup of temporary resources from incomplete operations to prevent resource leaks

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.

@djoshy

djoshy commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive

@openshift-ci

openshift-ci Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

@djoshy: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/81361080-5e98-11f1-8281-d019b8daff8d-0

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
pkg/controller/bootimage/vsphere_helpers.go (1)

321-333: 💤 Low value

Consider also cleaning up stale oldTempName VMs.

Currently, only tempName (mco-tmp-*) is cleaned up at the start. If a previous swapTemplate completed both renames but the final Destroy failed, the old template under oldTempName (mco-old-*) would remain orphaned. Adding a cleanup call for oldTempName here would prevent accumulation of orphaned VMs from repeated destroy failures.

♻️ Suggested improvement
 	if err := cleanupStaleTempVM(ctx, finder, tempName); err != nil {
 		return err
 	}
+	if err := cleanupStaleTempVM(ctx, finder, oldTempName); err != nil {
+		return err
+	}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/controller/bootimage/vsphere_helpers.go` around lines 321 - 333, The
current startup cleanup only calls cleanupStaleTempVM for tempName which leaves
orphaned oldTempName VMs if a prior swap left mco-old-* behind; add a call to
cleanupStaleTempVM(ctx, finder, oldTempName) alongside the existing cleanup for
tempName (handle its error return the same way) before proceeding with
swapTemplate/findAllRequiredResources so both tempName and oldTempName are
cleaned up; reference tempName, oldTempName, cleanupStaleTempVM and ensure error
is returned if cleanupStaleTempVM(ctx, finder, oldTempName) fails.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/controller/bootimage/vsphere_helpers.go`:
- Around line 556-559: The error returned when finder.VirtualMachine(ctx,
oldTempName) fails currently wraps only the original err and omits oldErr;
update the error construction in the rollback VM lookup (around
finder.VirtualMachine / oldVM / oldErr) to include oldErr details (e.g., add
oldErr to the fmt.Errorf message or wrap it with %w) so the returned error
contains both the template not found context and the actual failure reason from
oldErr when looking up oldTempName alongside the existing err and variables
name/oldTempName.

---

Nitpick comments:
In `@pkg/controller/bootimage/vsphere_helpers.go`:
- Around line 321-333: The current startup cleanup only calls cleanupStaleTempVM
for tempName which leaves orphaned oldTempName VMs if a prior swap left
mco-old-* behind; add a call to cleanupStaleTempVM(ctx, finder, oldTempName)
alongside the existing cleanup for tempName (handle its error return the same
way) before proceeding with swapTemplate/findAllRequiredResources so both
tempName and oldTempName are cleaned up; reference tempName, oldTempName,
cleanupStaleTempVM and ensure error is returned if cleanupStaleTempVM(ctx,
finder, oldTempName) fails.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 518a9907-6871-46fa-85ac-cc35b0a64636

📥 Commits

Reviewing files that changed from the base of the PR and between 26d41f7 and 80b5b21.

📒 Files selected for processing (1)
  • pkg/controller/bootimage/vsphere_helpers.go

Comment thread pkg/controller/bootimage/vsphere_helpers.go
@djoshy

djoshy commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

/payload-abort

@openshift-ci

openshift-ci Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

@djoshy: aborted 1 active payload job(s) for pull request #6117

@djoshy djoshy force-pushed the make-vsphere-atomic branch from 80b5b21 to 276fe58 Compare June 2, 2026 15:50
@djoshy

djoshy commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive

@openshift-ci

openshift-ci Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

@djoshy: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/bb9eb130-5e9a-11f1-9e66-32f081cd610f-0

@djoshy djoshy force-pushed the make-vsphere-atomic branch from 276fe58 to fab78e4 Compare June 2, 2026 15:52

@isabella-janssen isabella-janssen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

This looks fair to me

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-upgrade
/test e2e-gcp-op-ocl-part1
/test e2e-gcp-op-ocl-part2
/test e2e-gcp-op-part1
/test e2e-gcp-op-part2
/test e2e-gcp-op-single-node
/test e2e-hypershift

@sergiordlr

Copy link
Copy Markdown
Contributor

/test e2e-gcp-op-ocl-part2

@sergiordlr

Copy link
Copy Markdown
Contributor

/payload-job periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive-techpreview periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@sergiordlr: trigger 2 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive-techpreview
  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/9743f230-64a5-11f1-888c-7c4b8ea79051-0

@sergiordlr

Copy link
Copy Markdown
Contributor

/payload-job periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive-techpreview

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@sergiordlr: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/5e304ca0-64c3-11f1-83a9-335e639bf0fa-0

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@sergiordlr: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/26579e40-64c4-11f1-96f2-617dd1b8636b-0

@djoshy djoshy force-pushed the make-vsphere-atomic branch from fab78e4 to 0ebbf63 Compare June 18, 2026 14:27
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 18, 2026

@isabella-janssen isabella-janssen left a comment

Copy link
Copy Markdown
Member

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 added the lgtm Indicates that a PR is ready to be merged. label Jun 18, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-upgrade
/test e2e-gcp-op-ocl-part1
/test e2e-gcp-op-ocl-part2
/test e2e-gcp-op-part1
/test e2e-gcp-op-part2
/test e2e-gcp-op-single-node
/test e2e-hypershift

@openshift-ci

openshift-ci Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: djoshy, isabella-janssen

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:
  • OWNERS [djoshy,isabella-janssen]

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

@djoshy

djoshy commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive-techpreview

Jobs logs are looking for v1alpha1 osimagestream CRDs which are no longer in use, I suspect payload-job command is not merging against main, so rebasing and testing again.

@openshift-ci

openshift-ci Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

@djoshy: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-vsphere-mco-disruptive-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/ff7af940-6b24-11f1-8ddf-24b62c38228e-0

@djoshy

djoshy commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

/retest-required

@sergiordlr

Copy link
Copy Markdown
Contributor

/verified by @sergiordlr

We will only verify that nothing is broken. Long duration jobs and vsphere disruptive suite test cases passed.

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@sergiordlr: This PR has been marked as verified by @sergiordlr.

Details

In response to this:

/verified by @sergiordlr

We will only verify that nothing is broken. Long duration jobs and vsphere disruptive suite test cases passed.

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.

@djoshy

djoshy commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

/cherry-pick release-4.22 release-4.21 release-4.20

@openshift-cherrypick-robot

Copy link
Copy Markdown

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

Details

In response to this:

/cherry-pick release-4.22 release-4.21 release-4.20

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.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD fb5bfe2 and 2 for PR HEAD 0ebbf63 in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 90c582b and 1 for PR HEAD 0ebbf63 in total

@djoshy

djoshy commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD dd2d4f3 and 0 for PR HEAD 0ebbf63 in total

@djoshy

djoshy commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

GCP failures are related to the RHEL10 switch and it cannot be affected by vsphere changes in the bootimage controller. Overriding:

/override ci/prow/e2e-gcp-op-part2

@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@djoshy: Overrode contexts on behalf of djoshy: ci/prow/e2e-gcp-op-part2

Details

In response to this:

GCP failures are related to the RHEL10 switch and it cannot be affected by vsphere changes in the bootimage controller. Overriding:

/override ci/prow/e2e-gcp-op-part2

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.

@djoshy

djoshy commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@djoshy: 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.

@openshift-merge-bot openshift-merge-bot Bot merged commit c41a042 into openshift:main Jun 23, 2026
17 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@djoshy: Jira Issue Verification Checks: Jira Issue OCPBUGS-86826
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-86826 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

- What I did

  • Import new OVA under a temp name, keeping the old template live throughout the upload
  • Swap with two fast renames once new template is ready and then destroy the old template
  • If we crash mid-swap, next reconciliation detects the missing template and renames the old one back

- How to verify it

This is fairly hard to reproduce as it only happens due to network failures. At the very least, we should ensure that vsphere bootimage tests continue to work as expected.

Summary by CodeRabbit

  • New Features

  • Deterministic temporary and rollback naming to enable safer, atomic template swaps without downtime.

  • Bug Fixes

  • OVF import now keeps existing live templates available during upload/import and switches templates via a rename-based swap after import.

  • Improved crash recovery: if the expected production template is missing, it automatically restores it from the rollback name and continues reconciliation.

  • Automatically cleans up stale temporary/rollback VMs from prior failed attempts.

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.

@openshift-cherrypick-robot

Copy link
Copy Markdown

@djoshy: new pull request created: #6226

Details

In response to this:

/cherry-pick release-4.22 release-4.21 release-4.20

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.

@openshift-merge-robot

Copy link
Copy Markdown
Contributor

Fix included in release 5.0.0-0.nightly-2026-06-24-062812

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/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants