🐛 Skip power off BMH if registration error OR no credentials#1386
🐛 Skip power off BMH if registration error OR no credentials#1386lentzi90 wants to merge 1 commit intometal3-io:mainfrom
Conversation
If a BMH is not registered OR we do not have proper credentials for it, we cannot power off before deleting. Therefore we should skip to deletion in either of these cases, not just when both hold.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
There is already a PR for this, and a good discussion: would you mind having a look? #1356 |
|
/hold |
|
It was correct before. If we are getting an error that we are not registered and we don't have credentials, then we should ignore the error because it is never getting better. /close |
|
@zaneb: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@zaneb can you please explain to me why we should try to register again if we are already in I imagine this chain of events:
|
|
If you look at the code for If we get into the state handler and the node is not registered in ironic, it means that the ironic DB has been lost between the time we did the registration and the time we tried to handle the current state. The solution to this is to requeue so that next time around The only exception to that when we find the node not registered in ironic is if I think this is confusing because the 'registered' in The case where credentials exist but are not sufficient to get us talking to the BMC is handled by #1356 - we try 3 times (note: each attempt may take a number of reconciles) and if we keep getting |
If a BMH is not registered OR we do not have proper credentials for it, we cannot power off before deleting. Therefore we should skip to deletion in either of these cases, not just when both hold.
What this PR does / why we need it:
If a BMH is not registered OR we do not have proper credentials for it, we cannot power off before deleting. Therefore we should skip to deletion in either of these cases, not just when both hold.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #1385