Conversation
67caea8 to
5689ef1
Compare
5689ef1 to
603dbf3
Compare
f45acb7 to
17e4b0e
Compare
|
|
I have put a comment in #8517 (comment) It would be nice if the thresholds can be set by absolute free space (eg. 0.1 TB) and by fraction (free/total, eg. 5%) I was trying to compare this PR and our code, but decided to comment now, before spending too much time and coming too late. |
17e4b0e to
28a1265
Compare
@iueda I have added the "fraction", as IUUC should be in the BelleDIRAC implementation. Please review. |
iueda
left a comment
There was a problem hiding this comment.
The code looks good (better than I was preparing).
Only minor suggestions on the comments and the tests.
There may be some remnants of my previous comments, which were in preparation and now obsolete (I tried to delete them, but somehow appears in the list of pending comments...)
0998326 to
fd47b7f
Compare
…ully configurable
- 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
fd47b7f to
0a20133
Compare
…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.
- 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)
Add Banned_fraction and Degraded_fraction config options to the FreeDiskSpace policy so SEs can be flagged based on the fraction of total free space in addition to absolute thresholds. - FreeDiskSpaceCommand: pass fractions through _prepareCommand, doNew, doCache - FreeDiskSpacePolicy: evaluate fraction thresholds alongside absolute ones - Configurations.py: add default fraction values (1% Banned, 5% Degraded) - Tests: update existing tests and add new fraction threshold test cases - Docs: update admin and developer guides with new config options
f0482d2 to
fadf015
Compare
fadf015 to
672252d
Compare
…WMSAdministrator methods PropagationCommand now returns Unknown status instead of S_ERROR when site elements are missing or DB queries fail, preventing the Error status from overriding other policies in PDP decisions. Removed 9 deprecated no-op RPC methods from WMSAdministratorHandler (setSiteMask, getSiteMask, getSiteMaskStatus, getAllSiteMaskStatus, banSite, allowSite, clearMask, getSiteMaskLogging, getSiteMaskSummary) that only returned S_OK().
DowntimeCommand now returns S_OK(None) or S_OK() instead of S_ERROR when GOCDB queries fail, the downtime cache is unavailable, or command preparation fails (e.g. missing elementType). This prevents the Error status from overriding other policies in PDP decisions in test environments without GOCDB access.
40acb5a to
aac5874
Compare
DowntimeCommand.doNew() now returns S_OK(None) instead of S_ERROR when _prepareCommand() fails, matching the integration test fix.
aac5874 to
ed1f231
Compare
closes #8517
BEGINRELEASENOTES
*RSS
CHANGE: Added configurable thresholds and fractions for FreeDiskSpace policy evaluation
*Deployment
ENDRELEASENOTES