-
Notifications
You must be signed in to change notification settings - Fork 28
[DNM] Retest original service-abort code to troubleshoot issues with the final version accepted upstream #472
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?
Changes from all commits
80cb2d2
3375ac6
6e524c6
37bc8af
3e8c53d
41620b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -86,17 +86,6 @@ func TestService(t *testing.T) { | |||||||||||||||||||||||||||||||||||||||||||
| expectedRequestAfter: 0, | ||||||||||||||||||||||||||||||||||||||||||||
| expectedDirty: false, | ||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| name: "serviceFail state(abort - no firmware spec)", | ||||||||||||||||||||||||||||||||||||||||||||
| ironic: testserver.NewIronic(t).WithDefaultResponses().Node(nodes.Node{ | ||||||||||||||||||||||||||||||||||||||||||||
| ProvisionState: string(nodes.ServiceFail), | ||||||||||||||||||||||||||||||||||||||||||||
| UUID: nodeUUID, | ||||||||||||||||||||||||||||||||||||||||||||
| }), | ||||||||||||||||||||||||||||||||||||||||||||
| skipConfig: true, | ||||||||||||||||||||||||||||||||||||||||||||
| expectedStarted: true, | ||||||||||||||||||||||||||||||||||||||||||||
| expectedRequestAfter: 10, | ||||||||||||||||||||||||||||||||||||||||||||
| expectedDirty: true, | ||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| name: "serviceFail state(retry)", | ||||||||||||||||||||||||||||||||||||||||||||
| ironic: testserver.NewIronic(t).WithDefaultResponses().Node(nodes.Node{ | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -141,17 +130,6 @@ func TestService(t *testing.T) { | |||||||||||||||||||||||||||||||||||||||||||
| expectedRequestAfter: 10, | ||||||||||||||||||||||||||||||||||||||||||||
| expectedDirty: true, | ||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| name: "serviceWait state(abort - no firmware spec)", | ||||||||||||||||||||||||||||||||||||||||||||
| ironic: testserver.NewIronic(t).WithDefaultResponses().Node(nodes.Node{ | ||||||||||||||||||||||||||||||||||||||||||||
| ProvisionState: string(nodes.ServiceWait), | ||||||||||||||||||||||||||||||||||||||||||||
| UUID: nodeUUID, | ||||||||||||||||||||||||||||||||||||||||||||
| }), | ||||||||||||||||||||||||||||||||||||||||||||
| skipConfig: true, | ||||||||||||||||||||||||||||||||||||||||||||
| expectedStarted: true, | ||||||||||||||||||||||||||||||||||||||||||||
| expectedRequestAfter: 10, | ||||||||||||||||||||||||||||||||||||||||||||
| expectedDirty: true, | ||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| name: "active state(servicing finished)", | ||||||||||||||||||||||||||||||||||||||||||||
| ironic: testserver.NewIronic(t).WithDefaultResponses().Node(nodes.Node{ | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -186,14 +164,13 @@ func TestService(t *testing.T) { | |||||||||||||||||||||||||||||||||||||||||||
| host.Status.Provisioning.ID = nodeUUID | ||||||||||||||||||||||||||||||||||||||||||||
| prepData := provisioner.ServicingData{} | ||||||||||||||||||||||||||||||||||||||||||||
| if !tc.skipConfig { | ||||||||||||||||||||||||||||||||||||||||||||
| host.Spec.BMC.Address = "bios-test://test.bmc/" | ||||||||||||||||||||||||||||||||||||||||||||
| host.Spec.BMC.Address = "raid-test://test.bmc/" | ||||||||||||||||||||||||||||||||||||||||||||
| prepData.ActualFirmwareSettings = metal3api.SettingsMap{ | ||||||||||||||||||||||||||||||||||||||||||||
| "Answer": "unknown", | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| prepData.TargetFirmwareSettings = metal3api.DesiredSettingsMap{ | ||||||||||||||||||||||||||||||||||||||||||||
| "Answer": intstr.FromInt(42), | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| prepData.HasFirmwareSpec = true | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
166
to
174
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Set the new spec-presence flag in these configured fixtures. When Suggested fix if !tc.skipConfig {
host.Spec.BMC.Address = "raid-test://test.bmc/"
prepData.ActualFirmwareSettings = metal3api.SettingsMap{
"Answer": "unknown",
}
prepData.TargetFirmwareSettings = metal3api.DesiredSettingsMap{
"Answer": intstr.FromInt(42),
}
+ prepData.HasFirmwareSettingsSpec = true
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| publisher := func(reason, message string) {} | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
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.
Keep legacy
BareMetalHost.spec.firmwarerepresented inHasFirmwareSettingsSpec.Lines 1465-1468 still start servicing from the legacy firmware field, but this flag is now derived only from
HostFirmwareSettings. After a service starts and status is synced,fwDirtydrops to false; on the nextServicing/ServiceWaitreconcile,pkg/provisioner/ironic/servicing.gosees both spec flags false and aborts an in-flight legacy firmware update as if the user had removed it. Please fold the legacy firmware-config presence into this signal as well.🤖 Prompt for AI Agents