Skip to content

[machineset controller] Do not update machine status if there is an error adding deletionTimestamp #984

@aaronfern

Description

@aaronfern

How to categorize this issue?

/area control-plane
/kind bug
/priority 3

What happened:
There was a bug reported where a machine had its's status.currentStatus.phase set to Terminating even though the machine did not have a deletionTimestamp set.
This can happen when the DeleteMachine()call here fails (for whatever reason). We do not return from this place, instead we continue with a status update

The machineset controller will not consider this machine as a stale machine anymore and hence will never reattempt to add a deletionTimestamp. The lack of a deletionTimestamp will also not cause the machine controller to run the deletion flow for the machine. Machines in this state will therefore be stuck indefinitely in this state

What you expected to happen:
The machineset controller should update the status of stale machines only if it has successfully added a deletionTimestamp to it

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • Others:

Metadata

Metadata

Assignees

Labels

area/control-planeControl plane relatedkind/bugBugpriority/3Priority (lower number equals higher priority)status/closedIssue is closed (either delivered or triaged)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions