Skip to content

Conversation

@nagadeesh-nagaraja
Copy link
Contributor

Fixes #472 #469

@nagadeesh-nagaraja nagadeesh-nagaraja self-assigned this Oct 8, 2025
@nagadeesh-nagaraja nagadeesh-nagaraja changed the title Reboot skip disk Re-order boot order to avoid booting into disk during maintenance reboots Oct 8, 2025
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 8, 2025
Copy link
Member

@hardikdr hardikdr left a comment

Choose a reason for hiding this comment

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

Had a first quick iteration, have left few comments inline.
Thanks for the PR @nagadeesh-nagaraja

Copy link
Contributor

@Nuckal777 Nuckal777 left a comment

Choose a reason for hiding this comment

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

Thanks. 👍

return ctrl.Result{RequeueAfter: r.ResyncInterval}, nil
}
// if no config found or if it has changed, we need to create or path it
config, err = r.applyServerBootConfiguration(ctx, log, serverMaintenance, server)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this PR cover cover the use case to change bios settings, which don't need a reboot? In that case the boot config dance isn't strictly needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Nuckal777 workflow is as follows:

For operations which needs reboots:
The creator of serverMaintenance needs to provide the bootConfig Spec. if provided, it will be handled

For Operations which does not need server reboots: (however, as of now, almost all maintenance needs it)
The creator of serverMaintenance will not provide the bootConfig Spec. if skipped, the server bootConfig will not be created/changed.

// Note: this is to check skip of BootConfiguration
// implication of skipping is that the server will still continue to run the OS during Maintenance
// might be subjected to reboots
val, found := serverMaintenance.GetAnnotations()[metalv1alpha1.OperationSkipBootConfiguration]
Copy link
Contributor

Choose a reason for hiding this comment

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

The annotation feels a bit redundant to .spec.serverBootConfigurationTemplate: null on the ServerMaintenance. Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

from what I have seen until now. All of the operations related to maintenance needs server reboot. Idea is to force servermaintenance creator to provide the bootCondifguration spec.
if this is not needed for some extra ordinary conditions, we can skip providing the spec using annotation.

Comment on lines 29 to 31
OperationSkipBootConfiguration = "metal.ironcore.dev/operation-skip-boot-configuration"
// SkipBootConfiguration skips the boot configuration if set to this value.
SkipBootConfiguration = "skip"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to simply delete an unused bootconfig?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dont understand this

@afritzler
Copy link
Member

I think this PR will be made obsolete by ironcore-dev/boot-operator#232 and the fact that we will use NetBootOnce to ensure Netboot on newly created ServerBootConfiguration e.g. when coming from a ServerMaintenance.

@nagadeesh-nagaraja
Copy link
Contributor Author

I think this PR will be made obsolete by ironcore-dev/boot-operator#232 and the fact that we will use NetBootOnce to ensure Netboot on newly created ServerBootConfiguration e.g. when coming from a ServerMaintenance.

I dont think this is true.
this was for the cases where we are rebooting server during Maintenance. each time i reboot the server during Maintainance the reserved server has potential to show up as "online" after booting into the OS.

@nagadeesh-nagaraja nagadeesh-nagaraja marked this pull request as draft November 17, 2025 10:38
@nagadeesh-nagaraja
Copy link
Contributor Author

parking it as we work on a centralized solution to change the boot order of a server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change area/metal-automation documentation Improvements or additions to documentation size/XXL

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Server Resource Controller setBoot Order is not working as expected

5 participants