-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[7/n] [reconfigurator] combine inventory and omicron zones (#6739)
Currently, when the collection process makes two separate queries to sled-agent: one to obtain basic inventory, and the other to obtain Omicron zones. With this approach, it is possible for one of the two queries to fail -- in that case, the `sled_agents` and `omicron_zones` maps will not have the same set of keys. In general, consumers of collections must be able to handle these kinds of failing cases, because collections contain information from a variety of sources, not all of which are guaranteed to work all the time. But this specific case (sled-agent inventory vs Omicron zones) is not intrinsic to the system -- it is an artifact of our APIs. Change the API so that the `/inventory` endpoint also returns Omicron zones. The format remains the same, so that `PUT /omicron-zones` mirrors `GET /inventory | jq .omicron_zones`. I had to make a few changes to our tests, since we now have a unified notion of Omicron zones and sled agents. But this exposed what feels to me like a modeling deficiency in the way our tests work. I hope to fix that up at some point soon. There is also one behavior change to the reconfigurator CLI -- now, `inventory-generate` preserves zone information passed into it from the system. This matches the behavior of inventory generation within tests themselves.
- Loading branch information
1 parent
e634215
commit c9fc674
Showing
28 changed files
with
339 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.