MXS-1446: Add passive parameter

The `passive` parameter can be given in the configuration file or on the
command line. It is displayed in the diagnostic output and changes to it
are persisted.

The variable itself does nothing.
This commit is contained in:
Markus Mäkelä
2017-09-25 12:47:46 +03:00
parent bc510a1ad9
commit 1d2ba10a68
4 changed files with 34 additions and 1 deletions

View File

@ -749,6 +749,23 @@ bool runtime_alter_maxscale(const char* name, const char* value)
runtime_error("Invalid boolean value for '%s': %s", CN_ADMIN_LOG_AUTH_FAILURES, value);
}
}
else if (key == CN_PASSIVE)
{
int boolval = config_truth_value(value);
if (boolval != -1)
{
MXS_NOTICE("Updated '%s' from '%s' to '%s'", CN_PASSIVE,
cnf.passive ? "true" : "false",
boolval ? "true" : "false");
cnf.passive = boolval;
rval = true;
}
else
{
runtime_error("Invalid boolean value for '%s': %s", CN_PASSIVE, value);
}
}
else
{
runtime_error("Unknown global parameter: %s=%s", name, value);