1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-09 09:57:48 +03:00

ctdb-tool: Print a warning when setting an obsolete tunable variable

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2015-02-09 10:33:35 +11:00 committed by Amitay Isaacs
parent 54f0c39e5a
commit c3706e7fb0
3 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,7 @@ CTDB_SET_EventScriptUnhealthyOnTimeout=0
EOF EOF
required_result 0 <<EOF required_result 0 <<EOF
Setting obsolete tunable variable 'EventScriptUnhealthyOnTimeout'
Set EventScriptUnhealthyOnTimeout to 0 Set EventScriptUnhealthyOnTimeout to 0
Set MonitorInterval to 5 Set MonitorInterval to 5
EOF EOF

View File

@ -317,6 +317,7 @@ ctdb_setvar ()
for _i in $FAKE_CTDB_TUNABLES_OBSOLETE ; do for _i in $FAKE_CTDB_TUNABLES_OBSOLETE ; do
if [ "$_var" = "$_i" ] ; then if [ "$_var" = "$_i" ] ; then
echo "Setting obsolete tunable variable '${_var}'"
return 0 return 0
fi fi
done done

View File

@ -4839,6 +4839,11 @@ static int control_setvar(struct ctdb_context *ctdb, int argc, const char **argv
DEBUG(DEBUG_ERR, ("Unable to set tunable variable '%s'\n", name)); DEBUG(DEBUG_ERR, ("Unable to set tunable variable '%s'\n", name));
return -1; return -1;
} }
if (ret == 1) {
DEBUG(DEBUG_WARNING,
("Setting obsolete tunable variable '%s'\n",
name));
}
return 0; return 0;
} }