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

feat: implement infra machine reboot #814

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

utkuozdemir
Copy link
Member

@utkuozdemir utkuozdemir commented Jan 6, 2025

Implement reboot functionality.
The logic goes as follows:

  • When a user wants to reboot a server, they set a new unique requested_reboot_id on the InfraMachineConfig resource (for example, a UUID).
  • When the InfraMachineStatus resource gets updated with the last_reboot_id equal to the requested one, Omni knows that the reboot was processed.
  • The last_reboot_timestamp is updated by the infra provider when a machine is actually rebooted.

The provider might or might not issue a reboot for each and every reboot request - if it had rebooted the machine too recently - but it will mark the request as "processed" by updating the last_reboot_id.

Part of #813.

Implement reboot functionality.
The logic goes as follows:
- When a user wants to reboot a server, they set a new unique `requested_reboot_id` on the `InfraMachineConfig` resource (for example, a UUID).
- When the `InfraMachineStatus` resource gets updated with the `last_reboot_id` equal to the requested one, Omni knows that the reboot was processed.
- The `last_reboot_timestamp` is updated by the infra provider when a machine is actually rebooted.

The provider might or might not issue a reboot for each and every reboot request - if it had rebooted the machine too recently - but it will mark the request as "processed" by updating the `last_reboot_id`.

Signed-off-by: Utku Ozdemir <[email protected]>
@utkuozdemir utkuozdemir force-pushed the infra-machine-reboot branch from 2485398 to 1c4f9af Compare January 8, 2025 12:57
@utkuozdemir
Copy link
Member Author

/m

@talos-bot talos-bot merged commit 1c4f9af into siderolabs:main Jan 8, 2025
22 checks passed
@utkuozdemir utkuozdemir deleted the infra-machine-reboot branch January 8, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants