Nishant Puri has uploaded this change for review.
ganeshactl/log: add composite conditional logging management commands
Add three new commands to ganesha_mgr for managing conditional logging
configuration in a single operation:
ganesha_mgr set log conditional_config [OPTIONS]
Configure multiple aspects of conditional logging in one call.
Supports repeatable --components/--level pairs to set different log
levels per component group, --clients (IP/CIDR), --export-ids, and
--policy (ANY|ALL|MATCH_ANY|MATCH_ALL). All flags are optional but
at least one must be provided. Processing order is fixed regardless
of flag order on the command line: component levels, then clients,
then exports, then policy. Errors are collected and reported at the
end (continue-and-collect semantics).
ganesha_mgr show log conditional_config
Display the full conditional logging configuration in a single view:
client list, export list, match policy, and all component log levels.
ganesha_mgr reset log conditional_config [OPTIONS]
With no options, atomically resets all conditional logging state to
defaults via a new ResetConditionalLogging D-Bus method: client and
export lists are cleared, all component log levels are reset to
NIV_FULL_DEBUG, and the match policy is reset to MATCH_ANY.
With options (--clients, --export-ids, --components, --policy),
selectively removes or resets only the specified items using the
existing individual D-Bus methods.
Add ResetConditionalLogging D-Bus method to log_conditional_interface
to support the atomic full-reset path.
Add validation to ChangeMatchPolicy: setting MATCH_ALL is rejected when
either the client list or the export list is empty, since the AND
condition can never be satisfied in that state and conditional logging
would silently never fire. The rejection is reported back to the caller
via the reply status and logged at EVENT level.
All existing commands are preserved unchanged.
Fix cond_log_props[] and HANDLE_COND_LOG_PROP to include COMPONENT_QOS,
COMPONENT_RECOVERY, and COMPONENT_RDMA, which were missing from the
conditional logging property table while present in the normal log
component table.
Change-Id: Ie8ccda20d85fa58dfe41ab835e8c66579cf71be5
Signed-off-by: Nishant Puri <npuri@redhat.com>
---
M src/log/log_functions.c
M src/scripts/ganeshactl/Ganesha/ganesha_mgr_utils.py
M src/scripts/ganeshactl/ganesha_mgr.py
3 files changed, 484 insertions(+), 2 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/47/1238847/1
To view, visit change 1238847. To unsubscribe, or for help writing mail filters, visit settings.