@@ -759,7 +759,7 @@ int delegate_to_multipathd(enum mpath_cmds cmd,
return NOT_DELEGATED;
if (cmd == CMD_CREATE && conf->force_reload == FORCE_RELOAD_YES) {
- p += snprintf(p, n, "reconfigure");
+ p += snprintf(p, n, "reconfigure all");
}
else if (cmd == CMD_FLUSH_ONE && dev && dev_type == DEV_DEVMAP) {
p += snprintf(p, n, "del map %s", dev);
@@ -212,6 +212,7 @@ load_keys (void)
r += add_key(keys, "local", LOCAL, 0);
r += add_key(keys, "setmarginal", SETMARGINAL, 0);
r += add_key(keys, "unsetmarginal", UNSETMARGINAL, 0);
+ r += add_key(keys, "all", ALL, 0);
if (r) {
@@ -47,6 +47,7 @@ enum {
__LOCAL, /* 40 */
__SETMARGINAL,
__UNSETMARGINAL,
+ __ALL,
};
#define LIST (1ULL << __LIST)
@@ -93,6 +94,7 @@ enum {
#define LOCAL (1ULL << __LOCAL)
#define SETMARGINAL (1ULL << __SETMARGINAL)
#define UNSETMARGINAL (1ULL << __UNSETMARGINAL)
+#define ALL (1ULL << __ALL)
#define INITIAL_REPLY_LEN 1200
@@ -1012,6 +1012,15 @@ cli_reconfigure(void * v, struct strbuf *reply, void * data)
{
condlog(2, "reconfigure (operator)");
+ schedule_reconfigure(FORCE_RELOAD_WEAK);
+ return 0;
+}
+
+int
+cli_reconfigure_all(void * v, struct strbuf *reply, void * data)
+{
+ condlog(2, "reconfigure all (operator)");
+
schedule_reconfigure(FORCE_RELOAD_YES);
return 0;
}
@@ -1497,6 +1506,7 @@ void init_handler_callbacks(void)
set_handler_callback(DEL+MAPS, cli_del_maps);
set_handler_callback(SWITCH+MAP+GROUP, cli_switch_group);
set_unlocked_handler_callback(RECONFIGURE, cli_reconfigure);
+ set_unlocked_handler_callback(RECONFIGURE+ALL, cli_reconfigure_all);
set_handler_callback(SUSPEND+MAP, cli_suspend);
set_handler_callback(RESUME+MAP, cli_resume);
set_handler_callback(RESIZE+MAP, cli_resize);
@@ -2818,7 +2818,7 @@ handle_signals(bool nonfatal)
return;
if (reconfig_sig) {
condlog(2, "reconfigure (signal)");
- schedule_reconfigure(FORCE_RELOAD_YES);
+ schedule_reconfigure(FORCE_RELOAD_WEAK);
}
if (log_reset_sig) {
condlog(2, "reset log (signal)");
@@ -195,10 +195,16 @@ group index, starting with 1.
.
.TP
.B reconfigure
-Reconfigures the multipaths. This should be triggered automatically after anyi
-hotplug event.
+Rereads the configuration, and reloads all changed multipath devices. This
+also happens at startup, when the service is reload, or when a SIGHUP is
+received.
.
.TP
+.B reconfigure all
+Rereads the configuration, and reloads all multipath devices regardless of
+whether or not they have changed. This also happens when \fImultipath -r\fR is
+run.
+.TP
.B suspend map|multipath $map
Sets map $map into suspend state.
.
With this commit, multipathd no longer defaults to full reconfigures for the "reconfigure" command and the HUP signal. The default is a weak reconfigure. A new command, "reconfigure all", has been added to do a full reconfigure. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> --- multipath/main.c | 2 +- multipathd/cli.c | 1 + multipathd/cli.h | 2 ++ multipathd/cli_handlers.c | 10 ++++++++++ multipathd/main.c | 2 +- multipathd/multipathd.8 | 10 ++++++++-- 6 files changed, 23 insertions(+), 4 deletions(-)