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

Allow machines reset #489

Merged
merged 51 commits into from
Aug 4, 2023
Merged

Conversation

anmazzotti
Copy link
Contributor

@anmazzotti anmazzotti commented Jul 27, 2023

Resolves rancher/elemental#526

List of changes:

  • Added Reset object to MachineRegistration to customize reset behavior
  • Implemented elemental.cattle.io/resettable annotation for MachineInventories that can be reset
  • Implemented finalizer handler on MachineInventory, so that a resettable machine will receive a reset plan to be executed
  • elemental-system-agent is no longer stopped and will continue to run to apply an eventual reset plan
  • Implemented --reset and --install arguments for elemental-register to decouple reset and installation workflows from registration updates
  • elemental-register now exploits the passed elemental install --config-urls to inject /oem/registration/config.yaml and /oem/registration/state.yaml into an installed system

@github-actions github-actions bot added area/operator operator related changes area/register register related changes area/tests test related changes labels Jul 27, 2023
@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Patch coverage: 56.55% and project coverage change: +2.96% 🎉

Comparison is base (cf023ac) 48.54% compared to head (3bcf68b) 51.50%.

❗ Current head 3bcf68b differs from pull request most recent head b00495b. Consider uploading reports for the commit b00495b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #489      +/-   ##
==========================================
+ Coverage   48.54%   51.50%   +2.96%     
==========================================
  Files          41       41              
  Lines        5319     5551     +232     
==========================================
+ Hits         2582     2859     +277     
+ Misses       2520     2443      -77     
- Partials      217      249      +32     
Files Changed Coverage Δ
api/v1beta1/machineinventory_types.go 100.00% <ø> (ø)
pkg/elementalcli/elementalcli.go 0.00% <0.00%> (ø)
pkg/register/register.go 0.00% <0.00%> (ø)
pkg/server/server.go 58.79% <0.00%> (-1.67%) ⬇️
api/v1beta1/zz_generated.deepcopy.go 43.20% <53.33%> (+1.02%) ⬆️
pkg/install/install.go 69.03% <57.62%> (+64.96%) ⬆️
cmd/register/main.go 54.81% <59.57%> (-2.21%) ⬇️
controllers/machineinventory_controller.go 71.19% <76.10%> (+3.58%) ⬆️
controllers/machineselector_controller.go 56.22% <100.00%> (-2.40%) ⬇️
pkg/server/api_registration.go 59.89% <100.00%> (+0.10%) ⬆️
... and 1 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anmazzotti anmazzotti marked this pull request as ready for review August 2, 2023 14:55
@anmazzotti anmazzotti requested a review from a team as a code owner August 2, 2023 14:55
Copy link
Contributor

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

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

Nice job 👍

@anmazzotti I think we already clarified few little things on the chat and already stated some follow up little improvements that can be done later for which we already have issues created.

@github-actions github-actions bot added the area/build build related changes label Aug 3, 2023
Copy link
Member

@fgiudici fgiudici left a comment

Choose a reason for hiding this comment

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

great job!

@anmazzotti anmazzotti merged commit ffb9c01 into rancher:main Aug 4, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build build related changes area/operator operator related changes area/register register related changes area/tests test related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remote Reset of Machine when Cluster is deleted or Machine is removed from Pool
3 participants