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
🐛 allow namespace to continue terminating when bmh is deprovisioning at the same time #1226
Conversation
Hi @pixelsoccupied. Thanks for your PR. I'm waiting for a metal3-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
ee1d482
to
8e80299
Compare
/ok-to-test |
/test-centos-integration-e2e-main |
8e80299
to
6bc51c2
Compare
…he same time print ns to easier tracing allow namespace to continue with terminating when deprovisioning at the same time
6bc51c2
to
d953ffd
Compare
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.
/lgtm
// No need to create PreprovisioningImage if host is not yet registered | ||
// or is externally provisioned | ||
preprovImgFormats = nil | ||
case metal3v1alpha1.StateDeprovisioning: | ||
// PreprovisioningImage is not required for deprovisioning when cleaning is disabled | ||
if info.host.Spec.AutomatedCleaningMode == metal3v1alpha1.CleaningModeDisabled { |
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.
I don't love that we're encoding an assumption about the implementation of Ironic (i.e. that it doesn't need a PreprovisioningImage when cleaning is disabled) into the controller (rather than the ironic provisioner), but the alternative of passing the state and cleaning mode to PreprovisioningImageFormats() doesn't make a lot of conceptual sense either, so I think this is probably the best hack for now.
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.
I'm afraid we already have way too many assumptions about Ironic baked everywhere, including the API.
/test-centos-integration-e2e-main |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dtantsur The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
When BMH is deleted and NS is also in terminating state around the same time (usually GitOps/ArgoCD is involved), BMO may not be able to creating additional CRs as part of the deprovisioning steps. This condition essentially hangs the cleanup of BMH, its Secret (used for BMC) while the NS stays at a terminating state.
As long as registerHost is handling errors during this time, the issue goes away.
/cc @dtantsur
/cc @rhjanders
/cc @zaneb
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 #