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

✨ Supported forced reboot of preprovisioning images #1237

Merged
merged 6 commits into from
Apr 20, 2023

Conversation

dtantsur
Copy link
Member

@dtantsur dtantsur commented Mar 16, 2023

This change adds a new reboot variant:

reboot.metal3.io: '{"force": true}'

This reboot mode works in available, provisioning and inspecting states.

Includes:

@metal3-io-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@metal3-io-bot metal3-io-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 16, 2023
@dtantsur dtantsur force-pushed the reboot-preprov branch 2 times, most recently from aa1da0e to 33e1c36 Compare March 23, 2023 15:20
Most of them were not testing what they are supposed to test. The
exposed errors, for example, were due to a misconfigured Validate
mock, not because of actual deployment failures. Clean it up.
Hosts can stay in the "available" state for a long time. If the
underlying ramdisk image changes, their state may become invalid.

This change allows an operator to request a host reboot that will also
act in states where the ramdisk is waiting for something.
@dtantsur dtantsur changed the title [WIP] ✨ Force reboot preprovisioning images ✨ Supported forced reboot of preprovisioning images Mar 24, 2023
@dtantsur dtantsur marked this pull request as ready for review March 24, 2023 15:13
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 24, 2023
@dtantsur dtantsur force-pushed the reboot-preprov branch 2 times, most recently from 25149aa to 5e82fad Compare March 24, 2023 17:21
@dtantsur
Copy link
Member Author

/test-centos-e2e-integration-main
/test-ubuntu-integration-main

@elfosardo
Copy link
Member

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 5, 2023
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.

Some comments inline, but I'm happy with this approach to the problem.

controllers/metal3.io/baremetalhost_controller.go Outdated Show resolved Hide resolved
pkg/provisioner/provisioner.go Show resolved Hide resolved
pkg/provisioner/ironic/ironic.go Outdated Show resolved Hide resolved
Allows restarting a running inspection on image change.

The "force" argument to InspectHardware has been renamed to
restartOnFailure to avoid confusion.

Change the error handling code to immediately retry aborted inspection.
The only way to do it is to go through cleaning.
@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2023
@dtantsur
Copy link
Member Author

/test-centos-e2e-integration-main
/test-ubuntu-integration-main

The word "force" is too generic, the new name reflects better what
the flag does: restart the process when it previously failed.

Power actions are left intact since "force" has a more subtle dual
meaning in PowerOff.
@metal3-io-bot metal3-io-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 14, 2023
@dtantsur
Copy link
Member Author

/test-centos-e2e-integration-main
/test-ubuntu-integration-main

@elfosardo
Copy link
Member

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 20, 2023
@honza
Copy link
Member

honza commented Apr 20, 2023

/approve

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: honza

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 Apr 20, 2023
@metal3-io-bot metal3-io-bot merged commit fa0829d into metal3-io:main Apr 20, 2023
@dtantsur dtantsur deleted the reboot-preprov branch April 20, 2023 11:57
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
None yet
Development

Successfully merging this pull request may close these issues.

5 participants