Skip to content

fix(maas): clean up node state before removal - #902

Open
xtrusia wants to merge 4 commits into
canonical:mainfrom
xtrusia:fix/lp2163212-hypervisor
Open

fix(maas): clean up node state before removal#902
xtrusia wants to merge 4 commits into
canonical:mainfrom
xtrusia:fix/lp2163212-hypervisor

Conversation

@xtrusia

@xtrusia xtrusia commented Aug 18, 2026

Copy link
Copy Markdown

MAAS node removal used the short hostname to clean up services that may be registered with the machine FQDN.
It could also remove Juju units without cleaning up their Cinder service records or MicroCeph OSDs.
This left stale state after the node was removed.

Preserve the FQDN returned by MAAS and use it to remove Nova services and Neutron agents after the target MicroOVN unit has stopped. Verify that no exact-host records remain.

Disable matching Cinder volume services before removing the cinder-volume unit. Remove their service records through a healthy Cinder control-plane unit afterward, matching both the short hostname and FQDN.

Remove DB-backed MicroCeph OSDs before removing the MicroCeph unit.
Compare the MicroCeph database with the CRUSH tree before making changes and stop removal when the two sources disagree.
Force removal passes the supported MicroCeph safety flags without hiding cleanup failures.

Closes-Bug: LP: #2163212

Preserve the FQDN returned by MAAS so downstream removal steps can
distinguish it from the short cluster node name.

Partial-Bug: LP: #2163212
Signed-off-by: Seyeong Kim <seyeong.kim@canonical.com>
@xtrusia
xtrusia marked this pull request as draft August 18, 2026 01:29
@xtrusia xtrusia changed the title fix(maas): remove stale OpenStack service records fix(maas): clean up node state before removal Aug 18, 2026
@xtrusia
xtrusia force-pushed the fix/lp2163212-hypervisor branch from 6c38e2d to 040eb07 Compare August 18, 2026 06:45
@xtrusia
xtrusia marked this pull request as ready for review August 19, 2026 05:10
Remove Nova services and Neutron agents by the MAAS FQDN after the
target MicroOVN unit is gone. Verify that the control-plane records no
longer exist so retrying node removal cannot silently leave stale state.

Partial-Bug: LP: #2163212
Signed-off-by: Seyeong Kim <seyeong.kim@canonical.com>
Disable matching cinder-volume services before removing the Juju unit.
Use a healthy Cinder control-plane unit to remove the records afterward
and require an empty exact-host postcondition.

Partial-Bug: LP: #2163212
Signed-off-by: Seyeong Kim <seyeong.kim@canonical.com>
Remove DB-backed MicroCeph OSDs before deleting their Juju unit.
Stop removal when MicroCeph and CRUSH state disagree so unsupported
orphan recovery remains visible.

Closes-Bug: LP: #2163212
Signed-off-by: Seyeong Kim <seyeong.kim@canonical.com>
@xtrusia
xtrusia force-pushed the fix/lp2163212-hypervisor branch from 040eb07 to 56e7a3d Compare August 19, 2026 08:16
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