Skip to content

[fm] Toggle to disable fm_analysis background task#10360

Merged
smklein merged 4 commits intomainfrom
fm-disable-analysis-cleaner-i-guess
May 4, 2026
Merged

[fm] Toggle to disable fm_analysis background task#10360
smklein merged 4 commits intomainfrom
fm-disable-analysis-cleaner-i-guess

Conversation

@smklein
Copy link
Copy Markdown
Collaborator

@smklein smklein commented May 1, 2026

Alternative to #10358

Adds an opt-in fm.analysis_enabled flag which defaults to false.

Yet another possible fix for #10348

To re-enable: toggle default_fm_analysis_enabled to return true instead of false.

Alternative to #10358 (the comment-out approach).  Adds an opt-in
`fm.analysis_enabled` flag (default false, via #[serde(default)]) to
FmTasksConfig, threaded through FmAnalysis::new and short-circuited in
activate() with a 'disabled' marker on the status — matching the
existing convention used by support_bundle_collector, instance_updater,
sp_ereport_ingester, and friends.

Customer-shipped smf/nexus/{single-sled,multi-sled}/config-partial.toml
inherit the default (off); test/example configs explicitly set true so
omdb golden output and dev/CI behavior are unchanged.  No
#[allow(dead_code)] warts and no golden-file churn.

Re-enable in production: flip analysis_enabled = true in the
config-partial.toml files (or change the default).  Closes #10348 once
the analysis subsystem is ready.
smklein added 2 commits May 1, 2026 14:56
CI flagged five FmAnalysis::new() calls in fm_analysis.rs's tests
module that hadn't been updated for the new analysis_enabled
parameter.  cargo check (without --tests) and cargo nextest -p
nexus-config didn't catch them; cargo clippy --all-targets did.

Threads a const ANALYSIS_ENABLED = true through each call site so the
intent ('these tests exercise the analysis path') is named at the
call site rather than a bare `true`.
@smklein smklein marked this pull request as ready for review May 4, 2026 16:38
Copy link
Copy Markdown
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, I think this is the nicest solution for now, and I agree that the default value makes this safe to do in a patch release.

Comment thread nexus-config/src/nexus_config.rs Outdated

/// Default for [`FmTasksConfig::analysis_enabled`].
fn default_fm_analysis_enabled() -> bool {
// TODO(10349): Flip to true
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turbo nitpick: maybe this should be

Suggested change
// TODO(10349): Flip to true
// TODO(#10349): Flip to true

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlejandroME AlejandroME added this to the 19 milestone May 4, 2026
@smklein smklein enabled auto-merge (squash) May 4, 2026 17:18
@smklein smklein merged commit bfb4f76 into main May 4, 2026
16 checks passed
@smklein smklein deleted the fm-disable-analysis-cleaner-i-guess branch May 4, 2026 20:14
iliana pushed a commit that referenced this pull request May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants