Skip to content

Commit 9b529c0

Browse files
authored
error handling (#229)
1 parent e9c945e commit 9b529c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

controllers/maasmachine_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ func (r *MaasMachineReconciler) reconcileDelete(_ context.Context, machineScope
243243
// Fetch details to confirm and delete
244244
if gm, ge := client.Machines().Machine(gid).Get(ctx); ge == nil {
245245
_ = client.Machines().Machine(gm.SystemID()).Delete(ctx)
246+
if derr := client.Machines().Machine(gm.SystemID()).Delete(ctx); derr != nil {
247+
machineScope.Error(derr, "failed to delete guest VM during host release cleanup", "guestSystemID", gm.SystemID())
248+
}
246249
}
247250
}
248251
}

0 commit comments

Comments
 (0)