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
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.

20 changes: 2 additions & 18 deletions crates/agent/src/health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ use std::path::Path;
use std::str::FromStr;
use std::time::Duration;

use health_report::{HealthProbeId, HealthReport};
use nvue_client::NvueClient;
use health_report::HealthProbeId;
use tokio::process::Command as TokioCommand;
use tokio::time::timeout;

use crate::{HBNDeviceNames, hbn};
mod bgp;
pub(crate) mod nvue;
pub mod probe_ids;

const HBN_DAEMONS_FILE: &str = "etc/frr/daemons";
Expand Down Expand Up @@ -722,22 +722,6 @@ enum SctlState {
Fatal,
}

pub async fn nvue_api_health(nvue_client: &NvueClient) -> HealthReport {
// All we can really do here is check that the API is alive. The HBN flavor of NVUE
// doesn't seem to expose much of anything that we can look at for node health.
let mut report = HealthReport::empty("forge-dpu-agent".into());
match nvue_client.system_info().await {
Ok(_) => passed(&mut report, probe_ids::NvueApiRunning.clone(), None),
Err(e) => failed(
&mut report,
probe_ids::NvueApiRunning.clone(),
None,
format!("Error communicating with NVUE API: {e}"),
),
}
report
}

#[cfg(test)]
mod tests {
use carbide_test_support::Outcome::*;
Expand Down
Loading
Loading