Skip to content

Commit eb0a843

Browse files
[post-merge, multicast] test + doc cleaup
Includes: - Move omdb multicast tests to dev-tools/omdb/tests/ using env!("CARGO_BIN_EXE_omdb") for reliable binary discovery - Add object_put_upsert to nexus_test_utils, replace ad-hoc helpers - Fix SOURCES semantics: show effective filter state ("-" = any member accepts any source whatsoever, else union of allowlists) - Clarify docs: "Source allowlist, or '-' (any)" - Fix authz test to use SiloUser for list (not PrivilegedUser) [cross zl/mcast-test-perf]
1 parent 4d4e5ef commit eb0a843

17 files changed

Lines changed: 517 additions & 29235 deletions

File tree

dev-tools/omdb/src/bin/omdb/db.rs

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ use nexus_db_queries::db::pagination::paginated;
131131
use nexus_db_queries::db::queries::ALLOW_FULL_TABLE_SCAN_SQL;
132132
use nexus_db_queries::db::queries::region_allocation;
133133
use nexus_types::deployment::Blueprint;
134+
use nexus_types::deployment::BlueprintExpungedZoneAccessReason;
134135
use nexus_types::deployment::BlueprintZoneDisposition;
135136
use nexus_types::deployment::BlueprintZoneType;
136137
use nexus_types::deployment::DiskFilter;
@@ -1374,7 +1375,7 @@ impl DbArgs {
13741375
command: multicast::MulticastCommands::Groups(args),
13751376
}) => {
13761377
multicast::cmd_db_multicast_groups(
1377-
&opctx, &datastore, &fetch_opts, &args,
1378+
&datastore, &fetch_opts, &args,
13781379
)
13791380
.await
13801381
}
@@ -1393,7 +1394,7 @@ impl DbArgs {
13931394
command: multicast::MulticastCommands::Info(args),
13941395
}) => {
13951396
multicast::cmd_db_multicast_info(
1396-
&opctx, &datastore, &fetch_opts, &args,
1397+
&datastore, &fetch_opts, &args,
13971398
)
13981399
.await
13991400
}
@@ -1652,16 +1653,19 @@ async fn lookup_service_info(
16521653
service_id: Uuid,
16531654
blueprint: &Blueprint,
16541655
) -> anyhow::Result<Option<ServiceInfo>> {
1655-
let Some(zone_config) = blueprint
1656-
.all_omicron_zones(BlueprintZoneDisposition::any)
1657-
.find_map(|(_sled_id, zone_config)| {
1658-
if zone_config.id.into_untyped_uuid() == service_id {
1659-
Some(zone_config)
1660-
} else {
1661-
None
1662-
}
1663-
})
1664-
else {
1656+
// We don't know anything about `service_id`; it may be in-service or it may
1657+
// be expunged. Check all the zone states.
1658+
let mut all_zones = blueprint.all_in_service_and_expunged_zones(
1659+
BlueprintExpungedZoneAccessReason::Omdb,
1660+
);
1661+
1662+
let Some(zone_config) = all_zones.find_map(|(_sled_id, zone_config)| {
1663+
if zone_config.id.into_untyped_uuid() == service_id {
1664+
Some(zone_config)
1665+
} else {
1666+
None
1667+
}
1668+
}) else {
16651669
return Ok(None);
16661670
};
16671671

0 commit comments

Comments
 (0)