Skip to content

Commit

Permalink
add cancel check in drainBackOff
Browse files Browse the repository at this point in the history
  • Loading branch information
YZ775 committed Apr 19, 2024
1 parent 5798f89 commit f27329c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions op/reboot.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,14 @@ func drainBackOff(ctx context.Context, inf cke.Infrastructure, entry *cke.Reboot
"name": entry.Node,
log.FnError: err,
})

etcdEntry, err := inf.Storage().GetRebootsEntry(ctx, entry.Index)
if err != nil {
return err
}
if etcdEntry.Status == cke.RebootStatusCancelled {
return nil
}
entry.Status = cke.RebootStatusQueued
entry.LastTransitionTime = time.Now().Truncate(time.Second).UTC()
entry.DrainBackOffCount++
Expand Down

0 comments on commit f27329c

Please sign in to comment.