Skip to content

Stopped nodes in VMSS/MP are not cleaned up #5541

Open
@mweibel

Description

@mweibel

/kind bug

What steps did you take and what happened:
When for some reason a node is in PowerState: Stopped, the AzureMachinePoolMachine controller does not detect it and the stopped node stays until detected manually in the VMSS.

To reproduce, scale up a MachinePool, SSH into the machine and execute a shutdown.

What did you expect to happen:
Stopped nodes are treated like failed nodes and get removed automatically.

Anything else you would like to add:
PowerStates are only exposed in the instanceView or when using list instances with $expand=instanceView. I wonder if we should switch to either of that API and take the statuses property into account. Example listInstancesExpandInstanceView.json

Environment:

  • cluster-api-provider-azure version: latest main
  • Kubernetes version: (use kubectl version): 1.32.x
  • OS (e.g. from /etc/os-release): windows/linux

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.priority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions