Skip to content

Clean up orphaned test volumes during onboarding - #385

Merged
notandy merged 1 commit into
mainfrom
fix-orphaned-test-volumes
Nov 4, 2026
Merged

notandy merged 1 commit into
mainfrom
fix-orphaned-test-volumes

Conversation

@notandy

@notandy notandy commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Aborted smoke test builds leave their boot volumes behind in the test project; once the project exhausts its volume quota, every subsequent onboarding of that host fails with VolumeLimitExceeded and stays stuck.

The onboarding controller now sweeps the test project for orphaned volumes after a test server ends up in error state and before creating a new test server. A volume is deleted only when it is unattached, named after an instance UUID, and no instance with that ID exists in the project anymore.

Aborted smoke test builds (e.g. volume quota exceeded) leave their boot
volumes behind in the test project. Once the project exhausts its volume
quota, every subsequent onboarding fails with VolumeLimitExceeded and the
host is stuck.

The onboarding controller now sweeps the test project for orphaned
volumes after a test server ends up in error state and before creating a
new test server. A volume is only deleted when it is unattached, named
after an instance UUID, and no instance with that ID exists in the
project anymore.

Signed-off-by: Andrew Karpow <andrew.karpow@sap.com>
@notandy
notandy requested a review from fwiesel November 3, 2026 19:01
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller 75.43% (+0.41%) 👍
Coverage details

Compared to commit c4c8979 (run #41664443347)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/onboarding_controller.go 65.28% (+3.11%) 265 (+35) 173 (+30) 92 (+5) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files:

  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/onboarding_controller_test.go

@notandy
notandy merged commit 0667854 into main Nov 4, 2026
7 checks passed
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.

3 participants