-
Notifications
You must be signed in to change notification settings - Fork 131
Fix checking of MachineCreationTimeout when machine is Pending
#1015
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
Conversation
aaronfern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR @thiyyakat!
Some comments from me
aaronfern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions for the test descriptions. You don't have to use these as is, but use these as a reference
Co-authored-by: Aaron Francis Fernandes <[email protected]>
Co-authored-by: Aaron Francis Fernandes <[email protected]>
Co-authored-by: Aaron Francis Fernandes <[email protected]>
aaronfern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
/lgtm
What this PR does / why we need it:
This PR fixes the bug in calculation of timeout check for
MachineCreationTimeoutwhen the machine isPending. Earlier, the valuemachine.Status.CurrentStatus.LastUpdateTime.Timewas being used, which would reset the timer and allow machine to stay inPendingfor longer than intended. The check now usesmachine.CreationTimestamp.Timeto check if time out has occurred. The PR also changes the way in which other timeouts are checked inreconcileMachineHealthto improve readability. Unit tests have been corrected to reflect change made to the logic.Which issue(s) this PR fixes:
Fixes #1009
Special notes for your reviewer:
IT for mcm-provider-aws and mcm-provider-gcp passed.
The changes made were tested locally by setting
machineCreationTimeoutto5m, and changing mcm-provider-aws such thatGetMachineStatus()andCreateMachine()return errors untilmachineCreationTimeouthas passed. The relevant logs, with additional logs added for testing, can be found here :Release note: