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

Create a new version of StartSledAgentRequest #4407

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

andrewjstone
Copy link
Contributor

In preparation for sled-addition, a new version of StartSledAgentRequest was created and the old version coverted to V0. Deterministic conversion from v0 to v1 is possible because we know that ntp_servers and dns_servers fields are not in use. We also know the values of the new fields. is_lrtq_learner must be false because we only support RSS addition on existing sleds.

We then implement a deserialize method that will return the new version regardless of what's on disk. This is similar to how we handled the bootstore upgrade for EarlyNetworkConfig. Also similar to that, we extended the format of StartSledAgentRequest to ease future deserializations. In those deserializations we can deserialize the "header" and use serde_json::value::RawValue in order to defer deserialization of the body field until we know the schema_version.

In preparation for sled-addition, a new version of
`StartSledAgentRequest` was created and the old version coverted to V0.
Deterministic conversion from v0 to v1 is possible because we know that
`ntp_servers` and `dns_servers` fields are not in use. We also know the
values of the new fields. `is_lrtq_learner` must be false because we
only support RSS addition on existing sleds.

We then implement a deserialize method that will return the new version
regardless of  what's on disk. This is similar to how we handled the
bootstore upgrade for `EarlyNetworkConfig`. Also similar to that,
we extended the format of `StartSledAgentRequest` to ease future
deserializations. In those deserializations we can deserialize the
"header" and use [serde_json::value::RawValue](https://docs.rs/serde_json/latest/serde_json/value/struct.RawValue.html)
in order to defer deserialization of the `body` field until we know
the `schema_version`.
@andrewjstone
Copy link
Contributor Author

Tested successfully on madrid via mupdate based upgrade.

@andrewjstone andrewjstone merged commit 3445996 into main Nov 7, 2023
20 checks passed
@andrewjstone andrewjstone deleted the sled-agent-add-sled-to-rack-cluster branch November 7, 2023 20:36
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.

2 participants