-
Notifications
You must be signed in to change notification settings - Fork 242
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
Skip the inspecting state when inspection is disabled #1128
Conversation
bb6f980
to
04bdc69
Compare
/test-v1b1-centos-integration |
/lgtm |
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.
It occurs to me only just now that to solve the problem of registration requiring a PreprovisioningImage during inspection, all we really need to do is return early from this switch statement in the inspecting state if inspection is disabled.
Skipping the state altogether shouldn't hurt though.
04bdc69
to
5574dad
Compare
Currently, a host moves to the inspecting state and requests a preprovisioning image even when inspection is disabled.
5574dad
to
3b6d72f
Compare
/test-v1b1-centos-integration |
/lgtm |
lgtm |
I cannot agree it's a good thing. Starting inspection when it's disabled is confusing. |
I found the original discussion where it was decided not to change the state machine: metal3-io/metal3-docs#155 (comment) |
switch { | ||
case hsm.Host.NeedsHardwareInspection(): | ||
// TODO(dtantsur): move this logic inside NeedsHardwareInspection? | ||
if hsm.Host.NeedsHardwareInspection() && !inspectionDisabled(hsm.Host) { |
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.
Moving it inside NeedsHardwareInspection would save updating the state machine diagram :)
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.
Yeah, it was a bit more effort (needs to move some code around), are you fine with a follow-up?
/test-centos-integration-main |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zaneb 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 |
Currently, a host moves to the inspecting state and requests
a preprovisioning image even when inspection is disabled.