Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,9 @@ COCKROACH STATUS


NTP STATUS
No NTP zones reported timesync information
Zone 0ab3dbe9-8387-4600-b097-cb71ee91ee83: NTP reports that time is synced
Zone 18b3781d-571b-4d7c-b65d-18a452e5a64a: NTP reports that time is synced
Zone ac5bb28e-91d5-42f3-a57a-d84e1c414c17: NTP reports that time is synced

INTERNAL DNS STATUS
Zone 4692cc31-6eb6-437c-9634-9688663d06ae: Internal DNS generation @ 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,9 @@ COCKROACH STATUS


NTP STATUS
No NTP zones reported timesync information
Zone 62620961-fc4a-481e-968b-f5acbac0dc63: NTP reports that time is synced
Zone 6444f8a5-6465-4f0b-a549-1993c113569c: NTP reports that time is synced
Zone f10a4fb9-759f-4a65-b25e-5794ad2d07d8: NTP reports that time is synced

INTERNAL DNS STATUS
Zone 427ec88f-f467-42fa-9bbb-66a91a36103c: Internal DNS generation @ 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,9 @@ COCKROACH STATUS


NTP STATUS
No NTP zones reported timesync information
Zone 62620961-fc4a-481e-968b-f5acbac0dc63: NTP reports that time is synced
Zone 6444f8a5-6465-4f0b-a549-1993c113569c: NTP reports that time is synced
Zone f10a4fb9-759f-4a65-b25e-5794ad2d07d8: NTP reports that time is synced

INTERNAL DNS STATUS
Zone 427ec88f-f467-42fa-9bbb-66a91a36103c: Internal DNS generation @ 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,9 @@ COCKROACH STATUS


NTP STATUS
No NTP zones reported timesync information
Zone 62620961-fc4a-481e-968b-f5acbac0dc63: NTP reports that time is synced
Zone 6444f8a5-6465-4f0b-a549-1993c113569c: NTP reports that time is synced
Zone f10a4fb9-759f-4a65-b25e-5794ad2d07d8: NTP reports that time is synced

INTERNAL DNS STATUS
Zone 427ec88f-f467-42fa-9bbb-66a91a36103c: Internal DNS generation @ 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,9 @@ COCKROACH STATUS


NTP STATUS
No NTP zones reported timesync information
Zone 62620961-fc4a-481e-968b-f5acbac0dc63: NTP reports that time is synced
Zone 6444f8a5-6465-4f0b-a549-1993c113569c: NTP reports that time is synced
Zone f10a4fb9-759f-4a65-b25e-5794ad2d07d8: NTP reports that time is synced

INTERNAL DNS STATUS
Zone 427ec88f-f467-42fa-9bbb-66a91a36103c: Internal DNS generation @ 1
Expand Down
9 changes: 9 additions & 0 deletions nexus/inventory/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,15 @@ impl CollectionBuilder {
metrics.get_metric_unsigned(CockroachMetric::RangesUnderreplicated);
status.liveness_live_nodes =
metrics.get_metric_unsigned(CockroachMetric::LivenessLiveNodes);
self.found_cockroach_status(node_id, status);
}

/// Record pre-built status for a CockroachDB node
pub fn found_cockroach_status(
&mut self,
node_id: InternalNodeId,
status: CockroachStatus,
) {
self.cockroach_status.insert(node_id, status);
}

Expand Down
33 changes: 29 additions & 4 deletions nexus/reconfigurator/planning/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1121,14 +1121,39 @@ impl SystemDescription {
).unwrap();
}

// TODO: We may want to include responses from Boundary NTP
// and CockroachDb zones here too - but neither of those are
// currently part of the example system, so their synthetic
// responses to inventory collection aren't necessary yet.
// Synthesize time-sync responses from NTP zones.
if zone.zone_type.is_ntp() {
builder
.found_ntp_timesync(
nexus_types::inventory::TimeSync {
zone_id: zone.id,
synced: true,
},
)
.unwrap();
}
}
}
}

// Synthesize CockroachDb status: every running CockroachDb zone
// reports healthy metrics. We assign sequential node IDs and report
// the total cluster size as liveness_live_nodes.
let cockroach_zone_count =
builder.ledgered_zones_of_kind(ZoneKind::CockroachDb).count();
let live_nodes = cockroach_zone_count as u64;
for i in 0..cockroach_zone_count {
builder.found_cockroach_status(
cockroach_admin_types::node::InternalNodeId::new(
(i + 1).to_string(),
),
nexus_types::inventory::CockroachStatus {
ranges_underreplicated: Some(0),
liveness_live_nodes: Some(live_nodes),
},
);
}

for membership in &self.clickhouse_keeper_cluster_membership {
builder
.found_clickhouse_keeper_cluster_membership(membership.clone());
Expand Down
Loading