Skip to content

[for minor release] RSS configurable thresholds#8520

Open
fstagni wants to merge 8 commits into
DIRACGrid:integrationfrom
fstagni:rss_configurable_thresholds
Open

[for minor release] RSS configurable thresholds#8520
fstagni wants to merge 8 commits into
DIRACGrid:integrationfrom
fstagni:rss_configurable_thresholds

Conversation

@fstagni

@fstagni fstagni commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

closes #8517

  • test in certification

BEGINRELEASENOTES

*RSS
CHANGE: explanation

*Deployment

  • CHANGE: for users of advanced RSS policies: check for adjusting DT and FreeDiskSpace policies

ENDRELEASENOTES

@chrisburr chrisburr marked this pull request as draft April 20, 2026 13:35
@fstagni fstagni force-pushed the rss_configurable_thresholds branch 2 times, most recently from 67caea8 to 5689ef1 Compare April 20, 2026 15:48
@fstagni fstagni marked this pull request as ready for review April 20, 2026 15:49
@fstagni fstagni force-pushed the rss_configurable_thresholds branch from 5689ef1 to 603dbf3 Compare April 20, 2026 16:10
@fstagni fstagni force-pushed the rss_configurable_thresholds branch 2 times, most recently from dea1b8e to 31b12cf Compare June 8, 2026 08:36
@fstagni fstagni force-pushed the rss_configurable_thresholds branch from 31b12cf to f07d56a Compare June 9, 2026 12:32
fstagni added 4 commits June 9, 2026 14:48
- AlwaysBannedForSite2: tests domain-based matching specificity
- AlwaysDegradedForResource: tests AlwaysDegraded policy type
- SpecificFreeDiskSpace: tests per-policy arg overrides (Unit=GB,
  custom thresholds) and specificity dedup against generic FreeDiskSpace
- PropagationForSite: tests Propagation policy type
- PolicyActions sections: LogStatusAction and LogPolicyResultAction
- Integration test cases for LogSE WriteAccess (Degraded via specific
  FreeDiskSpace), LogSE ReadAccess (Active via AlwaysActive), and
  Site with None status
…es and generic specificity deduplication

- Configurations.py: POLICIESMETA now holds plain code-level defaults only;
  Operations() calls removed (CS is read at runtime by InfoGetter instead)
- InfoGetter.getPoliciesThatApply: CS entries without policyType are skipped
  (they are command-args defaults sections, not policy definitions); non-reserved
  keys in a CS policy entry are collected as arg overrides, merged into the policy
  args with case-insensitive key normalisation and type casting
- InfoGetter.postProcessingPolicyList: replaces the old FreeDiskSpaceMB/GB/TB
  hack with a generic rule — when multiple policies of the same policyType match,
  keep the most specific one (name-match presence > number of matchParams keys)
- dirac.cfg: add SpecificFreeDiskSpace example (Unit=GB, Banned_threshold=15,
  Degraded_threshold falls back to default); fix missing closing brace in Policies
- docs: note that command-args sections have no policyType and are not policy definitions
- test: new Test_InfoGetter.py with 15 unit tests covering all the above
…d defaults

FreeDiskSpaceCommand and DowntimeCommand no longer duplicate default values
in .get() fallbacks — defaults live exclusively in POLICIESMETA and are
guaranteed to be present in self.args by the time the command runs.
@fstagni fstagni force-pushed the rss_configurable_thresholds branch from f07d56a to f45acb7 Compare June 9, 2026 12:48
fstagni added 2 commits June 9, 2026 17:28
- StateMachine.setState: guard against self.state being None before
  accessing self.states[self.state], preventing KeyError when the
  machine transitions from a valid state to None and back.

- DowntimeCommand._prepareCommand: change key-existence checks to
  value checks (if not self.args.get("name")) so that None values
  from decisionParams defaults are also caught.

- Add unit tests for both fixes and a new StateMachine test suite.
- AlwaysBannedForSite2: tests domain-based matching specificity
- SpecificFreeDiskSpace: tests per-policy arg overrides (Unit=GB,
  custom thresholds) and specificity dedup against generic FreeDiskSpace
- PropagationForSite: tests Propagation policy type
- PolicyActions sections: LogStatusAction and LogPolicyResultAction
- Integration test case for LogSE WriteAccess (Error via FreeDiskSpace
  command when no occupancy data exists in test DB)
@fstagni fstagni force-pushed the rss_configurable_thresholds branch from f45acb7 to 17e4b0e Compare June 9, 2026 15:40
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.

[Feature]: Make RSS FreeDiskSpacePolicy actually configurable

1 participant