Add warning for --dry-run when not effective

This commit is contained in:
Ian Barwick
2017-08-28 15:10:57 +09:00
parent b900f9996f
commit 0b7dbb845c

View File

@@ -1514,6 +1514,24 @@ check_cli_parameters(const int action)
}
}
if (runtime_options.dry_run == true)
{
switch (action)
{
case PRIMARY_REGISTER:
case PRIMARY_UNREGISTER:
case STANDBY_CLONE:
case STANDBY_SWITCHOVER:
case NODE_SERVICE:
break;
default:
item_list_append_format(
&cli_warnings,
_("--dry-run is not effective when executing %s"),
action_name(action));
}
}
/* check only one of --csv, --nagios and --optformat used */
{
int used_options = 0;