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

✨ Add reference to HostUpdatePolicy in Servicing with HFS Support #2041

Merged
merged 7 commits into from
Nov 8, 2024

Conversation

iurygregory
Copy link
Member

What this PR does / why we need it:

This PR enables BMO to run Ironic servicing operations (such as applying firmware settings changes - or in the future firmware updates to already provisioned nodes). Servicing is an opt-in feature and is controlled by creation of a HostUpdatePolicy for a node with attributes indicating the desire to make changes to firmware configuration onReboot.

This is a partial implementation of metal3-io/metal3-docs@e260d42 (please note only firmware settings changes are currently supported, firmware update support will be added next).

@metal3-io-bot metal3-io-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 5, 2024
@iurygregory
Copy link
Member Author

/assign @zaneb

Copy link
Member

@zaneb zaneb left a comment

Choose a reason for hiding this comment

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

Looking pretty solid.

dtantsur and others added 6 commits November 7, 2024 09:01
Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
Servicing only runs when a host is powered off (either completely or
by rebooting it).

Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
Signed-off-by: Jacob Anders <janders@redhat.com>

Removed unused ServicingData fields.
…ageHostPower.

Signed-off-by: Jacob Anders <janders@redhat.com>
Signed-off-by: Jacob Anders <janders@redhat.com>
Signed-off-by: Jacob Anders <janders@redhat.com>
@iurygregory iurygregory changed the title ✨ Add reference to HostUpdatePolicy in Servicing ✨ Add reference to HostUpdatePolicy in Servicing with HFS Support Nov 7, 2024
@iurygregory
Copy link
Member Author

I've tested the code trying to update a firmware setting, it works updating the setting but the OperationalStatus for the BMH stays servicing and doesn't move to OK

@zaneb @dtantsur any thoughts on this? Seems to be related to the comment's I've addressed in the last commit, but no idea at the moment.

- we no longer need the currentError stored, since we don't clear
  the ErrorType before calling Service.
- include dirty when changing the Status.Provisioning.Firmware, this
  is to ensure we would run an actionUpdate.
- return actionUpdate if provisioner returns a clean result, but
  there are changes to the BMH.
- acquireHostUpdatePolicy is also called during registerHost

Signed-off-by: Iury Gregory Melo Ferreira <imelofer@redhat.com>
@iurygregory
Copy link
Member Author

Moved back to the old logic, since for the servicingAllowed, since we still need to account

@zaneb
Copy link
Member

zaneb commented Nov 8, 2024

/approve

@metal3-io-bot
Copy link
Contributor

[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 /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 Nov 8, 2024
@honza
Copy link
Member

honza commented Nov 8, 2024

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 8, 2024
@metal3-io-bot metal3-io-bot merged commit af93711 into metal3-io:main Nov 8, 2024
15 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Status: BMO WIP
Development

Successfully merging this pull request may close these issues.

7 participants