Nishant Puri has uploaded this change for review. (
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1241843?usp=email )
Change subject: log: reset conditional logging state on config reload
......................................................................
log: reset conditional logging state on config reload
On SIGHUP/reload, global_client_ip_list and global_export_id_list were
never cleared before re-parsing the LOG { Conditional {} } block. This
caused two bugs: stale client/export entries persisted if removed from
config, and reloading with unchanged entries triggered duplicate errors
that aborted the entire reload.
Extract reset_conditional_logging_state() to clear both global lists,
reset all conditional component log levels to NIV_FULL_DEBUG, reset
match policy to COND_LOG_MATCH_ANY, and set conditional_logging_configured
to false. Call it at the start of read_log_config() so every reload
starts from a clean slate and applies only what is present in the current
config file. Simplify dbus_conditional_log_reset() to reuse the same helper
instead of duplicating the logic.
Also add missing CONF_INDEX_TOKEN entries for COMPONENT_RDMA and
COMPONENT_GRPC in conditional_params[] to prevent them from being
incorrectly forced to NIV_NULL when not explicitly configured.
Change-Id: I4b1c2ca0cc3cefca556839ead49f03d234725efd
Signed-off-by: Nishant Puri <npuri(a)redhat.com>
---
M src/log/log_functions.c
1 file changed, 64 insertions(+), 36 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/43/1241843/1
--
To view, visit
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1241843?usp=email
To unsubscribe, or for help writing mail filters, visit
https://review.gerrithub.io/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I4b1c2ca0cc3cefca556839ead49f03d234725efd
Gerrit-Change-Number: 1241843
Gerrit-PatchSet: 1
Gerrit-Owner: Nishant Puri <npuri(a)redhat.com>