Skip to content
Closed
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
12 changes: 0 additions & 12 deletions dev-tools/omdb/tests/env.out
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ task: "external_endpoints"
on each one


task: "fm_analysis"
performs fault management analysis and updates the sitrep


task: "fm_rendezvous"
updates externally visible database tables to match the current fault
management sitrep
Expand Down Expand Up @@ -375,10 +371,6 @@ task: "external_endpoints"
on each one


task: "fm_analysis"
performs fault management analysis and updates the sitrep


task: "fm_rendezvous"
updates externally visible database tables to match the current fault
management sitrep
Expand Down Expand Up @@ -625,10 +617,6 @@ task: "external_endpoints"
on each one


task: "fm_analysis"
performs fault management analysis and updates the sitrep


task: "fm_rendezvous"
updates externally visible database tables to match the current fault
management sitrep
Expand Down
50 changes: 0 additions & 50 deletions dev-tools/omdb/tests/successes.out
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,6 @@ task: "external_endpoints"
on each one


task: "fm_analysis"
performs fault management analysis and updates the sitrep


task: "fm_rendezvous"
updates externally visible database tables to match the current fault
management sitrep
Expand Down Expand Up @@ -691,29 +687,6 @@ task: "external_endpoints"

TLS certificates: 0

task: "fm_analysis"
configured period: every <REDACTED_DURATION>m
last completed activation: <REDACTED ITERATIONS>, triggered by <TRIGGERED_BY_REDACTED>
started at <REDACTED_TIMESTAMP> (<REDACTED DURATION>s ago) and ran for <REDACTED DURATION>ms
parent sitrep ID: None
current inventory collection ID: Some(..........<REDACTED_UUID>........... (collection))
FAULT MANAGEMENT ANALYSIS SUMMARY
=================================
/!\ analysis failed: FM analysis is not yet implemented

fault management analysis inputs
--------------------------------
parent sitrep: <none>
inventory collection: ..........<REDACTED_UUID>...........
no new ereports since the parent sitrep
no cases copied forward

fault management analysis report
--------------------------------
sitrep ID: ..........<REDACTED_UUID>...........
no cases changed in this analysis step
started at <REDACTED_TIMESTAMP> (<REDACTED DURATION>s ago) and ran for <REDACTED DURATION>ms

task: "fm_rendezvous"
configured period: every <REDACTED_DURATION>m
last completed activation: <REDACTED ITERATIONS>, triggered by <TRIGGERED_BY_REDACTED>
Expand Down Expand Up @@ -1372,29 +1345,6 @@ task: "external_endpoints"

TLS certificates: 0

task: "fm_analysis"
configured period: every <REDACTED_DURATION>m
last completed activation: <REDACTED ITERATIONS>, triggered by <TRIGGERED_BY_REDACTED>
started at <REDACTED_TIMESTAMP> (<REDACTED DURATION>s ago) and ran for <REDACTED DURATION>ms
parent sitrep ID: None
current inventory collection ID: Some(..........<REDACTED_UUID>........... (collection))
FAULT MANAGEMENT ANALYSIS SUMMARY
=================================
/!\ analysis failed: FM analysis is not yet implemented

fault management analysis inputs
--------------------------------
parent sitrep: <none>
inventory collection: ..........<REDACTED_UUID>...........
no new ereports since the parent sitrep
no cases copied forward

fault management analysis report
--------------------------------
sitrep ID: ..........<REDACTED_UUID>...........
no cases changed in this analysis step
started at <REDACTED_TIMESTAMP> (<REDACTED DURATION>s ago) and ran for <REDACTED DURATION>ms

task: "fm_rendezvous"
configured period: every <REDACTED_DURATION>m
last completed activation: <REDACTED ITERATIONS>, triggered by <TRIGGERED_BY_REDACTED>
Expand Down
55 changes: 30 additions & 25 deletions nexus/src/app/background/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ use super::tasks::dns_propagation;
use super::tasks::dns_servers;
use super::tasks::ereport_ingester;
use super::tasks::external_endpoints;
use super::tasks::fm_analysis::{self, FmAnalysis};
// TODO(#10348): re-enable when fm_analysis is re-registered below.
// use super::tasks::fm_analysis::{self, FmAnalysis};
use super::tasks::fm_rendezvous::FmRendezvous;
use super::tasks::fm_sitrep_gc;
use super::tasks::fm_sitrep_load;
Expand Down Expand Up @@ -1140,30 +1141,34 @@ impl BackgroundTasksInitializer {
activator: task_fm_sitrep_loader,
});

let fm_analysis = FmAnalysis::new(
datastore.clone(),
sitrep_watcher.clone(),
inventory_load_watcher.clone(),
fm_analysis::Activators {
inventory_loader: task_inventory_loader.clone(),
sitrep_loader: task_fm_sitrep_loader.clone(),
sitrep_gc: task_fm_sitrep_gc.clone(),
},
nexus_id,
);
driver.register(TaskDefinition {
name: "fm_analysis",
description:
"performs fault management analysis and updates the sitrep",
period: config.fm.analysis_period_secs,
task_impl: Box::new(fm_analysis),
opctx: opctx.child(BTreeMap::new()),
watchers: vec![
Box::new(sitrep_watcher.clone()),
Box::new(inventory_load_watcher.clone()),
],
activator: task_fm_analysis,
});
// TODO(#10348): fm_analysis is temporarily disabled. Re-enable
// by uncommenting this block and the `use` at the top of this
// file.
//
// let fm_analysis = FmAnalysis::new(
// datastore.clone(),
// sitrep_watcher.clone(),
// inventory_load_watcher.clone(),
// fm_analysis::Activators {
// inventory_loader: task_inventory_loader.clone(),
// sitrep_loader: task_fm_sitrep_loader.clone(),
// sitrep_gc: task_fm_sitrep_gc.clone(),
// },
// nexus_id,
// );
// driver.register(TaskDefinition {
// name: "fm_analysis",
// description:
// "performs fault management analysis and updates the sitrep",
// period: config.fm.analysis_period_secs,
// task_impl: Box::new(fm_analysis),
// opctx: opctx.child(BTreeMap::new()),
// watchers: vec![
// Box::new(sitrep_watcher.clone()),
// Box::new(inventory_load_watcher.clone()),
// ],
// activator: task_fm_analysis,
// });

driver.register(TaskDefinition {
name: "fm_rendezvous",
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/app/background/tasks/fm_analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use slog_error_chain::InlineErrorChain;
use std::sync::Arc;
use tokio::sync::watch;

#[allow(dead_code)] // TODO(#10348)
#[derive(Clone)]
pub struct FmAnalysis {
datastore: Arc<DataStore>,
Expand All @@ -35,6 +36,7 @@ pub struct FmAnalysis {

/// This is just because I don't like it when a constructor takes multiple
/// positional arguments of the same type...
#[allow(dead_code)] // TODO(#10348)
#[derive(Clone)]
pub struct Activators {
pub inventory_loader: Activator,
Expand Down Expand Up @@ -63,6 +65,7 @@ impl BackgroundTask for FmAnalysis {
}
}

#[allow(dead_code)] // TODO(#10348)
impl FmAnalysis {
pub fn new(
datastore: Arc<DataStore>,
Expand Down Expand Up @@ -330,6 +333,7 @@ impl FmAnalysis {
}
}

#[allow(dead_code)] // TODO(#10348)
#[derive(Debug, thiserror::Error)]
enum PreparationError {
#[error(transparent)]
Expand Down
Loading