Skip to content
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

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Conversation

iurygregory
Copy link
Member

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

What this PR does / why we need it: metal3-io/metal3-docs#364,

@metal3-io-bot metal3-io-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 26, 2024
@iurygregory
Copy link
Member Author

/assign @zaneb @dtantsur

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>
// 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)) {
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct

@dtantsur
Copy link
Member

/approve

@metal3-io-bot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 30, 2024
@elfosardo
Copy link
Member

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2024
@metal3-io-bot metal3-io-bot merged commit efae71e into metal3-io:main Jul 30, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants