Skip to content

fix: recover stale deleted nodegroups#1054

Open
Rico Lin (ricolin) wants to merge 2 commits into
mainfrom
fix-nodegroup-delete-reconcile
Open

fix: recover stale deleted nodegroups#1054
Rico Lin (ricolin) wants to merge 2 commits into
mainfrom
fix-nodegroup-delete-reconcile

Conversation

@ricolin

Copy link
Copy Markdown
Member

Summary

  • recover Magnum nodegroups stuck in DELETE_FAILED when the CAPI topology and backend nodegroup resources are already gone
  • keep DELETE_FAILED unchanged while any MachineDeployment, MachineSet, Machine, or OpenStackMachine still exists for the nodegroup
  • run best-effort worker server-group cleanup before marking the stale delete complete

Validation

  • PYTHONPATH=$PWD .tox/py310/bin/pytest -q magnum_cluster_api/tests/unit/test_driver.py -k 'recovers_stale_delete_failed or keeps_delete_failed'
  • git diff --check
  • PYTHONPATH=$PWD .tox/py310/bin/python -m compileall -q magnum_cluster_api/driver.py magnum_cluster_api/tests/unit/test_driver.py

Note: the local tox env needed setuptools<81 because newer setuptools no longer provides pkg_resources, which this tree still imports through resources.py.

Recover nodegroups stuck in DELETE_FAILED when the CAPI topology and backend
resources for that nodegroup are already gone. The driver now completes the
Magnum nodegroup delete and runs best-effort server-group cleanup only after
verifying the MachineDeployment, MachineSets, Machines, and OpenStackMachines
are absent.

Assisted-By: Codex <noreply@openai.com>

Signed-off-by: Rico Lin <rlin@vexxhost.com>
@ricolin Rico Lin (ricolin) force-pushed the fix-nodegroup-delete-reconcile branch 2 times, most recently from 2dd91a9 to f4cf129 Compare June 16, 2026 00:56
@ricolin Rico Lin (ricolin) marked this pull request as ready for review June 18, 2026 00:12
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