Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
38a265b
(4/N) db_metadata_nexus database queries (handoff)
smklein Aug 27, 2025
3e61a97
(5/N) Read database access records on boot
smklein Aug 27, 2025
e1b43c3
(6/N) Add image to planning report for zones
smklein Aug 27, 2025
6b7e9ed
(7/N) Use nexus_generation, update it
smklein Aug 27, 2025
db263c1
Merge with main
smklein Sep 3, 2025
bbb204c
drop keys for InlineErrorChain
smklein Sep 3, 2025
67505ec
Merge
smklein Sep 4, 2025
e1f2fe1
Merge
smklein Sep 4, 2025
529874d
update nexus internal API
smklein Sep 4, 2025
961338c
Actually create NotYet records when appropriate
smklein Sep 4, 2025
fed7aa0
Merge with main
smklein Sep 4, 2025
bf79e74
Merge
smklein Sep 5, 2025
51b3103
Merge
smklein Sep 5, 2025
9514deb
Fix database_nexus_access_create to use active Nexus
smklein Sep 5, 2025
ce31570
Make clippy happy
smklein Sep 5, 2025
70d4ab9
Simplify database_nexus_access_create, move tests
smklein Sep 5, 2025
690ea16
Unify queries for all db_metadata_nexus states
smklein Sep 8, 2025
f15fa4b
comments, enums, set_..._nexuses
smklein Sep 8, 2025
5525529
determine_nexus_generation no longer returns an option
smklein Sep 9, 2025
c8126af
maybe when we say the gen bumps, we should do that
smklein Sep 9, 2025
056829f
merge
smklein Sep 9, 2025
e3615a9
merge
smklein Sep 9, 2025
a38a811
move some generation checks out of planner, into blippy
smklein Sep 9, 2025
b4bcca7
get_zones_not_yet_propagated_to_inventory comments
smklein Sep 10, 2025
a6548ca
clarifying planner comments
smklein Sep 10, 2025
448a39d
proposed
smklein Sep 10, 2025
07d79f3
Test cleanup, make lack of nexus zones more of an error, delay deploy…
smklein Sep 10, 2025
730a3b5
Ensure nexus can always be 'shut down' safely, refactor can_zone_be_u…
smklein Sep 12, 2025
f34422f
Merge
smklein Sep 15, 2025
4939771
clippy
smklein Sep 15, 2025
aa76e15
Change how simulated reconfigurator creates planning input
smklein Sep 15, 2025
b4cfa2d
plumb nexus_generation as arg
smklein Sep 15, 2025
ff13b71
stop using --no-zones
smklein Sep 16, 2025
2e04448
set nexus_generation explicitly during reconfigurator-cli tests
smklein Sep 16, 2025
8067ac9
Also update reconfigurator-cli output
smklein Sep 16, 2025
e9b2e17
remove XXX comment
smklein Sep 16, 2025
2ab3af2
Merge with main (mostly sled_add_zone_nexus stuff)
smklein Sep 16, 2025
87ecf81
merge with main
smklein Sep 16, 2025
02d6aae
Review feedback (BTreeSets, using PlanningInputBuilder, dedup setters)
smklein Sep 16, 2025
e8d0d03
Converge with 9023, to make the incoming merge easier
smklein Sep 16, 2025
ef82b33
merge
smklein Sep 17, 2025
0ac6f92
merge
smklein Sep 17, 2025
f82ad3b
Continuing to reduce the diff
smklein Sep 17, 2025
59194c0
Continuing to reduce diff
smklein Sep 17, 2025
deb3139
Report about the right zones
smklein Sep 17, 2025
e7c58ef
Throw errors on corrupt db/bp active gens
smklein Sep 17, 2025
d42a109
iterate over all zones
smklein Sep 17, 2025
ff3d86b
Update nexus last
smklein Sep 17, 2025
7b67eaf
review feedback
smklein Sep 17, 2025
8d17221
Review feedback, moving determine_nexus_gen (and tests) to planner
smklein Sep 17, 2025
b1ee973
update nexus tests to only upgrade between non-installdataset versions
smklein Sep 18, 2025
4ea1405
trying to improve planner report
smklein Sep 18, 2025
9843b4a
Minimize window where planner report shows up, test it
smklein Sep 18, 2025
4beb420
More feedback
smklein Sep 18, 2025
f61d3fd
Merge
smklein Sep 22, 2025
8a96005
wip
jgallagher Sep 22, 2025
7d259c9
WIP: internal/external DNS should only contain records for active Nex…
davepacheco Sep 22, 2025
d491246
cargo fmt
jgallagher Sep 22, 2025
8ba98ca
fix style
davepacheco Sep 22, 2025
ab8783c
fix tests
davepacheco Sep 22, 2025
5392671
Merge branch 'main' into john/target-release-test-nexus-handoff
jgallagher Sep 23, 2025
8118180
fix incorrect comments referring to the install dataset
jgallagher Sep 23, 2025
5fd5517
more specific description of `set active-nexus-gen`
jgallagher Sep 23, 2025
19a7276
Merge remote-tracking branch 'origin/main' into john/target-release-t…
jgallagher Sep 23, 2025
0ecb80c
remove test pruned from main
jgallagher Sep 23, 2025
4b292fd
fix test
davepacheco Sep 23, 2025
ddf1afb
determine active Nexus generation from UnstableReconfiguratorState
jgallagher Sep 23, 2025
df222ed
Merge remote-tracking branch 'origin/john/target-release-test-nexus-h…
davepacheco Sep 23, 2025
9d0071e
use the simulated state sometimes
davepacheco Sep 24, 2025
be18c62
nit update to test
davepacheco Sep 24, 2025
eaae460
fix up tests, load-example path
davepacheco Sep 24, 2025
7e98e62
update live test
davepacheco Sep 24, 2025
6ac6274
remove XXX
davepacheco Sep 24, 2025
02dddd9
clean up and document reconfigurator-cli changes
davepacheco Sep 24, 2025
2255fac
remove now-pointless test
davepacheco Sep 24, 2025
4dd7325
Merge commit 'e76962a5f67b8c5bf813ee24a7600634de708b35' into dap/hand…
davepacheco Sep 24, 2025
af24be5
Merge commit 'f53eb00555f3aa0319806e91f6104ceea7d6b454' into dap/hand…
davepacheco Sep 24, 2025
ec7a0a7
Merge branch 'main' into dap/handoff-dns
davepacheco Sep 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions dev-tools/reconfigurator-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2443,14 +2443,26 @@ fn cmd_blueprint_diff(
// each blueprint. To do that we need to construct a list of sleds suitable
// for the executor.
let sleds_by_id = make_sleds_by_id(state.system().description())?;

// It's tricky to figure out which active Nexus generation number to use
// when diff'ing blueprints. What's currently active might be wholly
// different from what's here. (Imagine generation 7 is active and these
// blueprints are from Nexus generation 4.) What's most likely useful is
// picking the Nexus generation of the blueprint itself.
let blueprint1_active_nexus_generation =
blueprint_active_nexus_generation(&blueprint1);
let blueprint2_active_nexus_generation =
blueprint_active_nexus_generation(&blueprint2);
let internal_dns_config1 = blueprint_internal_dns_config(
&blueprint1,
&sleds_by_id,
blueprint1_active_nexus_generation,
&Default::default(),
)?;
let internal_dns_config2 = blueprint_internal_dns_config(
&blueprint2,
&sleds_by_id,
blueprint2_active_nexus_generation,
&Default::default(),
)?;
let dns_diff = DnsDiff::new(&internal_dns_config1, &internal_dns_config2)
Expand All @@ -2462,11 +2474,13 @@ fn cmd_blueprint_diff(
&blueprint1,
state.config().silo_names(),
external_dns_zone_name.to_owned(),
blueprint1_active_nexus_generation,
);
let external_dns_config2 = blueprint_external_dns_config(
&blueprint2,
state.config().silo_names(),
external_dns_zone_name.to_owned(),
blueprint2_active_nexus_generation,
);
let dns_diff = DnsDiff::new(&external_dns_config1, &external_dns_config2)
.context("failed to assemble external DNS diff")?;
Expand Down Expand Up @@ -2524,19 +2538,23 @@ fn cmd_blueprint_diff_dns(
}
};

let blueprint_active_generation =
blueprint_active_nexus_generation(&blueprint);
let blueprint_dns_zone = match dns_group {
CliDnsGroup::Internal => {
let sleds_by_id = make_sleds_by_id(state.system().description())?;
blueprint_internal_dns_config(
blueprint,
&sleds_by_id,
blueprint_active_generation,
&Default::default(),
)?
}
CliDnsGroup::External => blueprint_external_dns_config(
blueprint,
state.config().silo_names(),
state.config().external_dns_zone_name().to_owned(),
blueprint_active_generation,
),
};

Expand Down Expand Up @@ -3005,9 +3023,12 @@ fn cmd_load_example(

// Generate the internal and external DNS configs based on the blueprint.
let sleds_by_id = make_sleds_by_id(&example.system)?;
let blueprint_nexus_generation =
blueprint_active_nexus_generation(&blueprint);
let internal_dns = blueprint_internal_dns_config(
&blueprint,
&sleds_by_id,
blueprint_nexus_generation,
&Default::default(),
)?;
let external_dns_zone_name =
Expand All @@ -3016,6 +3037,7 @@ fn cmd_load_example(
&blueprint,
state.config_mut().silo_names(),
external_dns_zone_name,
blueprint_nexus_generation,
);

let blueprint_id = blueprint.id;
Expand Down Expand Up @@ -3082,3 +3104,30 @@ fn cmd_file_contents(args: FileContentsArgs) -> anyhow::Result<Option<String>> {

Ok(Some(s))
}

/// Returns the "active Nexus generation" to use for a historical blueprint
/// (i.e., a blueprint that may not have been generated or executed against the
/// current simulated state). This is used for `blueprint-diff`, for example,
/// which avoids assuming anything about the simulated state in comparing the
/// two blueprints.
///
/// In general, the active Nexus generation for a blueprint is not well-defined.
/// We cannot know what the active Nexus generation was at some point in the
/// past. But we do know that it's one of these two values:
///
/// - `blueprint.nexus_generation - 1`, if this blueprint was created as part
/// of an upgrade, starting with the point where the Nexus handoff was
/// initiated (inclusive) and ending with the first blueprint after the
/// handoff (exclusive). In most cases, this means that this is the single
/// blueprint during an upgrade that triggered the handoff.
/// - `blueprint.nexus_generation` otherwise (which includes all other
/// blueprints that are created during an upgrade and all blueprints created
/// outside of an upgrade).
///
/// This implementation always returns `blueprint.nexus_generation`. In the
/// second case above, this is always correct. In the first case, this is
/// basically equivalent to assuming that the Nexus handoff had happened
/// instantaneously when the blueprint was created.
fn blueprint_active_nexus_generation(blueprint: &Blueprint) -> Generation {
blueprint.nexus_generation
}
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,9 @@ inventory-generate

# Planning now should bump the top-level `nexus_generation` to 2, indicating
# that we want handoff to begin.
# Note that `blueprint-diff` will show the DNS changes as though the handoff has
# happened already because that command does not take into account simulated
# state.
blueprint-plan latest latest
blueprint-diff latest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,38 +117,12 @@ to: blueprint 8da82a8e-bf97-4fbd-8ddd-9f6462732cf1


internal DNS:
* DNS zone: "control-plane.oxide.internal":
+ name: 16a766ee-9400-4e67-9363-883670371a1b.host (records: 1)
+ AAAA fd00:1122:3344:101::28
* name: _nexus-lockstep._tcp (records: 3 -> 4)
- SRV port 12232 0c71b3b2-6ceb-4e8f-b020-b08675e83038.host.control-plane.oxide.internal
- SRV port 12232 3eeb8d49-eb1a-43f8-bb64-c2338421c2c6.host.control-plane.oxide.internal
- SRV port 12232 466a9f29-62bf-4e63-924a-b9efdb86afec.host.control-plane.oxide.internal
+ SRV port 12232 0c71b3b2-6ceb-4e8f-b020-b08675e83038.host.control-plane.oxide.internal
+ SRV port 12232 16a766ee-9400-4e67-9363-883670371a1b.host.control-plane.oxide.internal
+ SRV port 12232 3eeb8d49-eb1a-43f8-bb64-c2338421c2c6.host.control-plane.oxide.internal
+ SRV port 12232 466a9f29-62bf-4e63-924a-b9efdb86afec.host.control-plane.oxide.internal
* name: _nexus._tcp (records: 3 -> 4)
- SRV port 12221 0c71b3b2-6ceb-4e8f-b020-b08675e83038.host.control-plane.oxide.internal
- SRV port 12221 3eeb8d49-eb1a-43f8-bb64-c2338421c2c6.host.control-plane.oxide.internal
- SRV port 12221 466a9f29-62bf-4e63-924a-b9efdb86afec.host.control-plane.oxide.internal
+ SRV port 12221 0c71b3b2-6ceb-4e8f-b020-b08675e83038.host.control-plane.oxide.internal
+ SRV port 12221 16a766ee-9400-4e67-9363-883670371a1b.host.control-plane.oxide.internal
+ SRV port 12221 3eeb8d49-eb1a-43f8-bb64-c2338421c2c6.host.control-plane.oxide.internal
+ SRV port 12221 466a9f29-62bf-4e63-924a-b9efdb86afec.host.control-plane.oxide.internal
unchanged names: 50 (records: 62)
DNS zone: "control-plane.oxide.internal" (unchanged)
unchanged names: 52 (records: 68)

external DNS:
* DNS zone: "oxide.example":
* name: example-silo.sys (records: 3 -> 4)
- A 192.0.2.2
- A 192.0.2.3
- A 192.0.2.4
+ A 192.0.2.2
+ A 192.0.2.3
+ A 192.0.2.5
+ A 192.0.2.4
unchanged names: 4 (records: 6)
DNS zone: "oxide.example" (unchanged)
unchanged names: 5 (records: 9)



Expand Down Expand Up @@ -177,12 +151,35 @@ to: blueprint 58d5e830-0884-47d8-a7cd-b2b3751adeb4


internal DNS:
DNS zone: "control-plane.oxide.internal" (unchanged)
unchanged names: 53 (records: 71)
* DNS zone: "control-plane.oxide.internal":
- name: 0c71b3b2-6ceb-4e8f-b020-b08675e83038.host (records: 1)
- AAAA fd00:1122:3344:101::22
+ name: 16a766ee-9400-4e67-9363-883670371a1b.host (records: 1)
+ AAAA fd00:1122:3344:101::28
- name: 3eeb8d49-eb1a-43f8-bb64-c2338421c2c6.host (records: 1)
- AAAA fd00:1122:3344:103::22
- name: 466a9f29-62bf-4e63-924a-b9efdb86afec.host (records: 1)
- AAAA fd00:1122:3344:102::22
* name: _nexus-lockstep._tcp (records: 3 -> 1)
- SRV port 12232 0c71b3b2-6ceb-4e8f-b020-b08675e83038.host.control-plane.oxide.internal
- SRV port 12232 3eeb8d49-eb1a-43f8-bb64-c2338421c2c6.host.control-plane.oxide.internal
- SRV port 12232 466a9f29-62bf-4e63-924a-b9efdb86afec.host.control-plane.oxide.internal
+ SRV port 12232 16a766ee-9400-4e67-9363-883670371a1b.host.control-plane.oxide.internal
* name: _nexus._tcp (records: 3 -> 1)
- SRV port 12221 0c71b3b2-6ceb-4e8f-b020-b08675e83038.host.control-plane.oxide.internal
- SRV port 12221 3eeb8d49-eb1a-43f8-bb64-c2338421c2c6.host.control-plane.oxide.internal
- SRV port 12221 466a9f29-62bf-4e63-924a-b9efdb86afec.host.control-plane.oxide.internal
+ SRV port 12221 16a766ee-9400-4e67-9363-883670371a1b.host.control-plane.oxide.internal
unchanged names: 47 (records: 59)

external DNS:
DNS zone: "oxide.example" (unchanged)
unchanged names: 5 (records: 10)
* DNS zone: "oxide.example":
* name: example-silo.sys (records: 3 -> 1)
- A 192.0.2.2
- A 192.0.2.3
- A 192.0.2.4
+ A 192.0.2.5
unchanged names: 4 (records: 6)



Loading
Loading