oxidecomputer / oxidecomputer/omicron

need a way to preview what would happen if you made a blueprint the target

Open
#4,992 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

We've discussed having a way to ask the system "show me what you would do if became the target". I think we're at the point where this will shortly be a critical tool if we want to be able to use Reconfigurator in dogfood or the colo rack because we'll want to be very sure we're not doing anything destructive.

Concretely, with what's in "main" right now, this should show you every Omicron zone being added or removed. After oxidecomputer/omicron#4887, this should also show you every internal DNS name being added or removed (which includes those being changed).

In terms of implementation, maybe we carry out a "dry run" execution. Alongside the nexus_blueprint_execution::realize_blueprint() function, we could have nexus_blueprint_execution::dry_run_blueprint() that would return a description of what it's going to do without doing anything. This description needs to be a lot more detailed than either a blueprint or a collection. For example, for DNS, it would have all the DNS names being added or removed and their associated records. This is not part of the blueprint or an inventory collection, but it is already constructed during blueprint execution.


Other ideas: we could use the existing "diff blueprint against an inventory collection" to compare the latest inventory to the request blueprint. We might want to trigger an inventory collection first to make sure it's up to date. I'm a little worried this is always going to be somewhat incomplete, though, because of things that don't show up in either inventory or blueprints. DNS is an example that's not part of either today. It would be reasonable to put the current internal DNS version into the inventory, and then it would be possible for this diff to fetch that DNS config and do the diff, but it'll have to call into nexus_blueprint_execution anyway so I'm not sure phrasing it as "diff against inventory" is useful.)

I also considered using the existing "blueprint diff" functionality to compare the current target to the requested one. This has the same problems as above, but is further misleading because the current target isn't the current reality. We might want to support this feature also but it's a different feature.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading nexus_blueprint_execution::realize_blueprint() and the existing blueprint and inventory-diff functionality to understand what execution already constructs. Define the dry-run result around the requested blueprint, with completion showing every Omicron zone and internal DNS name added or removed, including associated DNS records, without making changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.