Skip to content

Commit

Permalink
Merge branch 'main' into dap/planner-inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco committed Feb 1, 2024
2 parents bb38674 + 8189a8e commit 6237e15
Show file tree
Hide file tree
Showing 136 changed files with 3,811 additions and 1,094 deletions.
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ PATH_add out/cockroachdb/bin
PATH_add out/clickhouse
PATH_add out/dendrite-stub/bin
PATH_add out/mgd/root/opt/oxide/mgd/bin

if nix flake show &> /dev/null
then
use flake;
fi
6 changes: 3 additions & 3 deletions .github/buildomat/jobs/tuf-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ set -o errexit
set -o pipefail
set -o xtrace

ALL_BOARDS=(gimlet-{c..e} psc-{b..c} sidecar-{b..c})
ALL_BOARDS=(gimlet-{c..f} psc-{b..c} sidecar-{b..c})

TOP=$PWD
VERSION=$(< /input/package/work/version.txt)
Expand Down Expand Up @@ -278,8 +278,8 @@ EOF
done
}
# usage: SERIES ROT_DIR ROT_VERSION BOARDS...
add_hubris_artifacts rot-staging-dev staging/dev cert-staging-dev-v1.0.4 "${ALL_BOARDS[@]}"
add_hubris_artifacts rot-prod-rel prod/rel cert-prod-rel-v1.0.4 "${ALL_BOARDS[@]}"
add_hubris_artifacts rot-staging-dev staging/dev cert-staging-dev-v1.0.5 "${ALL_BOARDS[@]}"
add_hubris_artifacts rot-prod-rel prod/rel cert-prod-rel-v1.0.5 "${ALL_BOARDS[@]}"

for series in "${SERIES_LIST[@]}"; do
/work/tufaceous assemble --no-generate-key /work/manifest-"$series".toml /work/repo-"$series".zip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hakari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
toolchain: stable
- name: Install cargo-hakari
uses: taiki-e/install-action@bee85d7ea77c01f7a403c22ac2c802b431b093df # v2
uses: taiki-e/install-action@7dcb31b8033f96afe112f0df83dcb01f9969d23b # v2
with:
tool: cargo-hakari
- name: Check workspace-hack Cargo.toml is up-to-date
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ debug.out
rusty-tags.vi
*.sw*
tags
.direnv
47 changes: 29 additions & 18 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ gateway-client = { path = "clients/gateway-client" }
gateway-messages = { git = "https://github.com/oxidecomputer/management-gateway-service", rev = "2739c18e80697aa6bc235c935176d14b4d757ee9", default-features = false, features = ["std"] }
gateway-sp-comms = { git = "https://github.com/oxidecomputer/management-gateway-service", rev = "2739c18e80697aa6bc235c935176d14b4d757ee9" }
gateway-test-utils = { path = "gateway-test-utils" }
gethostname = "0.4.3"
glob = "0.3.1"
guppy = "0.17.4"
headers = "0.3.9"
Expand All @@ -224,7 +225,7 @@ hyper = "0.14"
hyper-rustls = "0.26.0"
hyper-staticfile = "0.9.5"
illumos-utils = { path = "illumos-utils" }
indexmap = "2.1.0"
indexmap = "2.2.2"
indicatif = { version = "0.17.7", features = ["rayon"] }
installinator = { path = "installinator" }
installinator-artifactd = { path = "installinator-artifactd" }
Expand Down Expand Up @@ -408,7 +409,7 @@ wicket-common = { path = "wicket-common" }
wicketd-client = { path = "clients/wicketd-client" }
zeroize = { version = "1.7.0", features = ["zeroize_derive", "std"] }
zip = { version = "0.6.6", default-features = false, features = ["deflate","bzip2"] }
zone = { version = "0.3", default-features = false, features = ["async"] }
zone = { version = "0.3", default-features = false, features = ["async", "sync"] }

# NOTE: The test profile inherits from the dev profile, so settings under
# profile.dev get inherited. AVOID setting anything under profile.test: that
Expand Down
17 changes: 16 additions & 1 deletion common/src/nexus_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ pub struct BackgroundTaskConfig {
pub phantom_disks: PhantomDiskConfig,
/// configuration for service zone nat sync task
pub sync_service_zone_nat: SyncServiceZoneNatConfig,
/// configuration for the bfd manager task
pub bfd_manager: BfdManagerConfig,
}

#[serde_as]
Expand Down Expand Up @@ -378,6 +380,14 @@ pub struct NatCleanupConfig {
pub period_secs: Duration,
}

#[serde_as]
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct BfdManagerConfig {
/// period (in seconds) for periodic activations of this background task
#[serde_as(as = "DurationSeconds<u64>")]
pub period_secs: Duration,
}

#[serde_as]
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct SyncServiceZoneNatConfig {
Expand Down Expand Up @@ -527,7 +537,7 @@ mod test {
};
use crate::address::{Ipv6Subnet, RACK_PREFIX};
use crate::api::internal::shared::SwitchLocation;
use crate::nexus_config::SyncServiceZoneNatConfig;
use crate::nexus_config::{BfdManagerConfig, SyncServiceZoneNatConfig};
use camino::{Utf8Path, Utf8PathBuf};
use dropshot::ConfigDropshot;
use dropshot::ConfigLogging;
Expand Down Expand Up @@ -672,6 +682,7 @@ mod test {
dns_external.max_concurrent_server_updates = 8
external_endpoints.period_secs = 9
nat_cleanup.period_secs = 30
bfd_manager.period_secs = 30
inventory.period_secs = 10
inventory.nkeep = 11
inventory.disable = false
Expand Down Expand Up @@ -773,6 +784,9 @@ mod test {
nat_cleanup: NatCleanupConfig {
period_secs: Duration::from_secs(30),
},
bfd_manager: BfdManagerConfig {
period_secs: Duration::from_secs(30),
},
inventory: InventoryConfig {
period_secs: Duration::from_secs(10),
nkeep: 11,
Expand Down Expand Up @@ -838,6 +852,7 @@ mod test {
dns_external.max_concurrent_server_updates = 8
external_endpoints.period_secs = 9
nat_cleanup.period_secs = 30
bfd_manager.period_secs = 30
inventory.period_secs = 10
inventory.nkeep = 3
inventory.disable = false
Expand Down
9 changes: 2 additions & 7 deletions dev-tools/omdb/src/bin/omdb/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,6 @@ async fn cmd_db_inventory(
opctx,
datastore,
id,
limit,
long_string_formatter,
)
.await
Expand Down Expand Up @@ -2496,16 +2495,12 @@ async fn cmd_db_inventory_collections_show(
opctx: &OpContext,
datastore: &DataStore,
id: Uuid,
limit: NonZeroU32,
long_string_formatter: LongStringFormatter,
) -> Result<(), anyhow::Error> {
let (collection, incomplete) = datastore
.inventory_collection_read_best_effort(opctx, id, limit)
let collection = datastore
.inventory_collection_read(opctx, id)
.await
.context("reading collection")?;
if incomplete {
limit_error(limit, || "loading collection");
}

inv_collection_print(&collection).await?;
let nerrors = inv_collection_print_errors(&collection).await?;
Expand Down
15 changes: 15 additions & 0 deletions dev-tools/omdb/tests/env.out
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ EXECUTING COMMAND: omdb ["nexus", "--nexus-internal-url", "http://127.0.0.1:REDA
termination: Exited(0)
---------------------------------------------
stdout:
task: "bfd_manager"
Manages bidirectional fowarding detection (BFD) configuration on rack
switches


task: "dns_config_external"
watches external DNS data stored in CockroachDB

Expand Down Expand Up @@ -96,6 +101,11 @@ EXECUTING COMMAND: omdb ["nexus", "background-tasks", "doc"]
termination: Exited(0)
---------------------------------------------
stdout:
task: "bfd_manager"
Manages bidirectional fowarding detection (BFD) configuration on rack
switches


task: "dns_config_external"
watches external DNS data stored in CockroachDB

Expand Down Expand Up @@ -156,6 +166,11 @@ EXECUTING COMMAND: omdb ["--dns-server", "[::1]:REDACTED_PORT", "nexus", "backgr
termination: Exited(0)
---------------------------------------------
stdout:
task: "bfd_manager"
Manages bidirectional fowarding detection (BFD) configuration on rack
switches


task: "dns_config_external"
watches external DNS data stored in CockroachDB

Expand Down
12 changes: 12 additions & 0 deletions dev-tools/omdb/tests/successes.out
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ EXECUTING COMMAND: omdb ["nexus", "background-tasks", "doc"]
termination: Exited(0)
---------------------------------------------
stdout:
task: "bfd_manager"
Manages bidirectional fowarding detection (BFD) configuration on rack
switches


task: "dns_config_external"
watches external DNS data stored in CockroachDB

Expand Down Expand Up @@ -339,6 +344,13 @@ task: "nat_v4_garbage_collector"
started at <REDACTED TIMESTAMP> (<REDACTED DURATION>s ago) and ran for <REDACTED DURATION>ms
warning: unknown background task: "nat_v4_garbage_collector" (don't know how to interpret details: Null)

task: "bfd_manager"
configured period: every 30s
currently executing: no
last completed activation: iter 2, triggered by an explicit signal
started at <REDACTED TIMESTAMP> (<REDACTED DURATION>s ago) and ran for <REDACTED DURATION>ms
warning: unknown background task: "bfd_manager" (don't know how to interpret details: Object {})

task: "external_endpoints"
configured period: every 1m
currently executing: no
Expand Down
Loading

0 comments on commit 6237e15

Please sign in to comment.