-
Notifications
You must be signed in to change notification settings - Fork 256
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
🐛 Fix HFC Status #1825
🐛 Fix HFC Status #1825
Conversation
This commit fixes the following cases for HFC: - Status Components Information using the newer information that ironic contains. - Clear the Status Updates in case of a failed fiirmware update, so it can retry. Also change the condition as a follow-up to baremetal-operator#1793 Signed-off-by: Iury Gregory Melo Ferreira <imelofer@redhat.com>
b2fd7e4
to
a62a169
Compare
// Check if there are Updates in the Spec that are different than the Status | ||
if meta.IsStatusConditionTrue(hfc.Status.Conditions, string(metal3api.HostFirmwareComponentsChangeDetected)) { | ||
// Check if the condition matches the current Generation to know if the data is not out of date. | ||
if readyCond := meta.FindStatusCondition(hfc.Status.Conditions, string(metal3api.HostFirmwareComponentsChangeDetected)); readyCond != nil && readyCond.Status == metav1.ConditionTrue && readyCond.ObservedGeneration == hfc.Generation { | ||
if meta.IsStatusConditionTrue(hfc.Status.Conditions, string(metal3api.HostFirmwareComponentsValid)) { |
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 assume we don't need the same generation check here because all conditions are updated together, right?
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.
correct
/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 |
/lgtm |
This commit fixes the following cases for HFC:
Also change the condition as a follow-up to baremetal-operator#1793
What this PR does / why we need it: metal3-io/metal3-docs#364,