From: Heming Zhao Date: Sat, 25 Sep 2021 22:21:37 +0800 Subject: [Cluster-devel] [RFC PATCH 0/5] add new command reload_config set_config Message-ID: <20210925142142.1821-1-heming.zhao@suse.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This serial patches gives dlm ability to change config settings on the fly. It's very useful for debugging, and also useful for adjusting HA behaviours while running. This feature gives more power function to advanced users. And HA Resource-Agent (RA) could also benefit from this feature. There are two ways to do the dynamic changing job: - by modification dlm.conf - by dlm_tool command The man page of dlm_tool.8 and dlm.conf.5 show examples of this feature. Original code has bug for those no_arg type options. Whatever use 0 or 1 to set no_arg type option, the option value always 1. To fix this bug, the 03/05 patch changes some options type from no_arg to req_arg_bool: daemon_debug, foreground, log_debug, debug_logfile, plock_debug. Only keeps help & version with no_arg type. For daemon_debug option, the 03/05 patch changes dlm_controld behavior. Before this patch, when the value is 1, dlm_controld won't become a daemon. With 03/05 patch, daemon_debug only means dlm_controld enter debug mode. the foreground option totally controls whether the program becomes a daemon. Heming Zhao (5): dlm_tool man: add command "joinleave", add "USAGE" section man: add reload_config in dlm_tool & dlm.conf dlm_controld: add reload_config feature dlm_tool man: add new command set_config dlm_controld: add new feature set_config dlm_controld/action.c | 5 + dlm_controld/config.c | 288 +++++++++++++++++++++++++++++++++-- dlm_controld/dlm.conf.5 | 42 +++-- dlm_controld/dlm_controld.h | 2 + dlm_controld/dlm_daemon.h | 15 ++ dlm_controld/helper.c | 4 - dlm_controld/lib.c | 55 +++++++ dlm_controld/libdlmcontrol.h | 2 + dlm_controld/logging.c | 18 ++- dlm_controld/main.c | 146 +++++++++++------- dlm_tool/dlm_tool.8 | 179 ++++++++++++++++++++++ dlm_tool/main.c | 48 +++++- 12 files changed, 715 insertions(+), 89 deletions(-) -- 2.32.0