Skip to content

Commit 33ecf8f

Browse files
authored
[nexus] Use cockroachdb range stats in reconfigurator planner (#8441)
Updates the reconfigurator to evaluate cockroachdb cluster health before upgrading zones Only updates zones if: - Ranges underreplicated == 0, and - Live nodes == COCKROACH_REDUNDANCY - At least COCKROACH_REDUNDANCY nodes are reporting their status successfully Builds on #8379 and #8426
1 parent e4b4420 commit 33ecf8f

File tree

7 files changed

+356
-13
lines changed

7 files changed

+356
-13
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev-tools/reconfigurator-cli/tests/output/cmds-example-stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ INFO sufficient ExternalDns zones exist in plan, desired_count: 0, current_count
506506
WARN failed to place all new desired Nexus zones, placed: 0, wanted_to_place: 3
507507
INFO sufficient Oximeter zones exist in plan, desired_count: 0, current_count: 0
508508
WARN cannot issue more SP updates (no current artifacts)
509-
INFO some zones not yet up-to-date, sled_id: 89d02b1b-478c-401a-8e28-7a26f74fa41b
509+
INFO some zones not yet up-to-date, sled_id: 89d02b1b-478c-401a-8e28-7a26f74fa41b, zones_currently_updating: [(b3c9c041-d2f0-4767-bdaf-0e52e9d7a013 (service), InternalNtp)]
510510
INFO will ensure cockroachdb setting, setting: cluster.preserve_downgrade_option, value: DoNotModify
511511
generated blueprint 86db3308-f817-4626-8838-4085949a6a41 based on parent blueprint ade5749d-bdf3-4fab-a8ae-00bea01b3a5a
512512

dev-tools/reconfigurator-cli/tests/output/cmds-expunge-newly-added-external-dns-stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ INFO added zone to sled, sled_id: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a, kind: Ex
981981
INFO sufficient Nexus zones exist in plan, desired_count: 3, current_count: 3
982982
INFO sufficient Oximeter zones exist in plan, desired_count: 0, current_count: 0
983983
WARN cannot issue more SP updates (no current artifacts)
984-
INFO some zones not yet up-to-date, sled_id: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a
984+
INFO some zones not yet up-to-date, sled_id: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a, zones_currently_updating: [(fe2d5287-24e3-4071-b214-2640b097a759 (service), ExternalDns)]
985985
INFO will ensure cockroachdb setting, setting: cluster.preserve_downgrade_option, value: DoNotModify
986986
generated blueprint 9c998c1d-1a7b-440a-ae0c-40f781dea6e2 based on parent blueprint 366b0b68-d80e-4bc1-abd3-dc69837847e0
987987

dev-tools/reconfigurator-cli/tests/output/cmds-expunge-newly-added-internal-dns-stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ INFO sufficient ExternalDns zones exist in plan, desired_count: 3, current_count
10141014
INFO sufficient Nexus zones exist in plan, desired_count: 3, current_count: 3
10151015
INFO sufficient Oximeter zones exist in plan, desired_count: 0, current_count: 0
10161016
WARN cannot issue more SP updates (no current artifacts)
1017-
INFO some zones not yet up-to-date, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c
1017+
INFO some zones not yet up-to-date, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, zones_currently_updating: [(e375dd21-320b-43b7-bc92-a2c3dac9d9e1 (service), InternalDns)]
10181018
INFO will ensure cockroachdb setting, setting: cluster.preserve_downgrade_option, value: DoNotModify
10191019
generated blueprint af934083-59b5-4bf6-8966-6fb5292c29e1 based on parent blueprint 58d5e830-0884-47d8-a7cd-b2b3751adeb4
10201020

nexus/reconfigurator/planning/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ omicron-workspace-hack.workspace = true
4747
dropshot.workspace = true
4848
expectorate.workspace = true
4949
maplit.workspace = true
50+
omicron-cockroach-metrics.workspace = true
5051
omicron-common = { workspace = true, features = ["testing"] }
5152
omicron-test-utils.workspace = true
5253
proptest.workspace = true

nexus/reconfigurator/planning/src/blueprint_builder/builder.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,12 @@ impl fmt::Display for Operation {
400400
/// However, the new blueprint can only be made the system's target if its
401401
/// parent is the current target.
402402
pub struct BlueprintBuilder<'a> {
403-
#[allow(dead_code)]
404403
log: Logger,
405404

406405
/// previous blueprint, on which this one will be based
407406
parent_blueprint: &'a Blueprint,
408407

409408
/// The latest inventory collection
410-
#[allow(unused)]
411409
collection: &'a Collection,
412410

413411
// These fields are used to allocate resources for sleds.

0 commit comments

Comments
 (0)