-
Notifications
You must be signed in to change notification settings - Fork 7
Add bootstate endpoint to registry server #424
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
base: main
Are you sure you want to change the base?
Conversation
bd4e68c to
9a2c29f
Compare
|
Adding a |
This would introduce a gap in which the bootstate can be lost:
Restarting the registry in the second step would loose the bootstate event. |
9a2c29f to
f32a257
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @Nuckal777, dropped some nit inline.
Thinking about it a little more, I’d propose a following holistic way of handling the first-boot flow. Instead of tying it to a single signal, we could make it more flexible, for example, let the boot-operator set conditions like IPXEScriptFetched and IgnitionDataFetched, and have the /bootstate POST update a BootStateReceived condition on the ServerBootConfig.
Then, the metal-operator could decide which of these conditions to treat as the actual boot completion using a boot-completion-condition flag. This would also make it easier to support things like NetBootOnce and NetBootAlways policies on the ServerClaim side later even when /bootstate POST call is not configured in the Ignition. Wdyt?
|
|
||
| // BootstatePayload represents the payload to send to the `/bootstate` endpoint, | ||
| // including the systemUUID and the booted state. | ||
| type BootstatePayload struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: how about camel-case for BootState references instead?
| conditionutils.UpdateStatus(metav1.ConditionTrue), | ||
| conditionutils.UpdateReason("BootStatePosted"), | ||
| conditionutils.UpdateMessage("Server successfully posted boot state"), | ||
| conditionutils.UpdateObserved(&server), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be interesting to explore the trade offs between having this condition on Server vs ServerBootConfig CR. I am somehow leaning more towards ServerBootConfig.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, ServerBootConfiguration might be more fitting as their lifetimes are bound to a ServerClaim and the discovery boot. 🤔
Agree, iirc it was part of the initial discussion on the topic that the owner of a |
Proposed Changes
/bootstatecall back endpoint inmanagerto track ifServersuccessfully booted #399 the systemUUID is moved into the JSON payload, similar to the/registerendpoint.Fixes #399.