Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMSS VM is in Deleting state, Owner Machine of AzureMachinePoolMachine is not deleted #4940

Closed
mweibel opened this issue Jun 25, 2024 · 0 comments · Fixed by #4943
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@mweibel
Copy link
Contributor

mweibel commented Jun 25, 2024

/kind bug

What steps did you take and what happened:
I noticed a few Machines with Failed state recently:

$MachinePoolName-42             $Cluster   $MachinePoolName000016           azure:///subscriptions/$Subscription/resourceGroups/$RG/providers/Microsoft.Compute/virtualMachineScaleSets/$MachinePoolName/virtualMachines/42          Failed    12d

The bug seems to be as follows:

  1. Scale Set VM is Deleting is logged - VMSS VM is in phase Deleting
  2. This marks the AzureMachinePoolMachine as deleted (setting DeletionTimestamp)
  3. AMPM.reconcileDelete then deletes VMSS VM
  4. once VMSS VM is gone, the AzureMachinePoolMachine gets completely removed
  5. Machine stays in Failed state

The behavior contract between Machine and InfraMachine doesn't specify how this should be done, I believe. However, given the current behavior, I believe step #2 is wrong and instead of marking the AzureMachinePoolMachine as deleted, it should instead mark the Machine (i.e. the Owner) as deleted.

What did you expect to happen:
Machine gets deleted successfully and doesn't stay in cluster.

Environment:

  • cluster-api-provider-azure version: 1.15.2 with PR 4928 applied
  • Kubernetes version: (use kubectl version): 1.28.5
  • OS (e.g. from /etc/os-release): Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Archived in project
2 participants