-
Notifications
You must be signed in to change notification settings - Fork 27
[DNM] Initial attempt at using wait step to back out of failed servicing. #452
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
base: main
Are you sure you want to change the base?
[DNM] Initial attempt at using wait step to back out of failed servicing. #452
Conversation
Generated-By: Claude Code Sonnet 4 Signed-off-by: Jacob Anders <janders@redhat.com> (cherry picked from commit c40d0ad)
|
PR meant for cluster-bot to allow rapid testing of an important workaround |
|
/hold |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jacob-anders 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 |
|
|
||
| // Track if HFS spec has actual settings - check independently since getHostFirmwareSettings | ||
| // returns nil when no changes even if object exists | ||
| hfsExists := &metal3api.HostFirmwareSettings{} |
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.
You probably also do this Get inside of getHostFirmwareSettings, let's try to avoid another request
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.
Actually, I feel we discussed this already, probably it's an issue of digging out an old unmerged patch. Will sort it out.
| // Track if HFC spec has actual updates - check independently since getHostFirmwareComponents | ||
| // returns nil when no changes even if object exists | ||
| hfcExists := &metal3api.HostFirmwareComponents{} | ||
| hfcExistsErr := r.Get(info.ctx, info.request.NamespacedName, hfcExists) |
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.
same
| // let the provisioner handle the transition back to active | ||
| if info.host.Status.ErrorType == metal3api.ServicingError && !hasChanges { | ||
| info.log.Info("updates removed from spec while in servicing error state, attempting recovery") | ||
| provResult, _, err := prov.Service(servicingData, false, false) |
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.
Thinking aloud: as we grow capabilities to abort processes, maybe we need a separate Abort call in the provisioner. Then you won't need to pass all these Has*Spec variables, and the Ironic-level code will be cleaner (if not necessarily shorter).
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 will look into this.
| ironicNode, | ||
| nodes.ProvisionStateOpts{Target: nodes.TargetAbort}, | ||
| ) | ||
| p.log.Info("janders_debug: abort result", "started", started, "result", result, "error", err) |
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.
To be cleaned up
| result, err = operationComplete() | ||
| case nodes.Servicing, nodes.ServiceWait: | ||
| // If user actually removed spec.updates/spec.settings while servicing is in progress, abort immediately | ||
| if !data.HasFirmwareSettingsSpec && !data.HasFirmwareComponentsSpec { |
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.
This cannot be done in Servicing, only in ServiceWait
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 fair point will drop nodes.Servicing.
|
@jacob-anders: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
Generated-By: Claude Code Sonnet 4
(cherry picked from commit c40d0ad)