1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

ctdb-tests: LVS support for ctdb tool stub

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2016-04-07 13:54:37 +10:00 committed by Amitay Isaacs
parent e2ecdd2401
commit 89dc86e0fd

View File

@ -358,6 +358,28 @@ EOF
###################################################################### ######################################################################
ctdb_lvs_master ()
{
if [ -n "$FAKE_CTDB_LVS_MASTER" ] ; then
echo "Node ${FAKE_CTDB_LVS_MASTER} is LVS master"
return 0
else
echo "This is no LVS master"
return 255
fi
}
ctdb_lvs ()
{
_pnn=0
while read _ip _opts ; do
echo "${_pnn}:${_ip}"
_pnn=$(($_pnn + 1))
done <"$CTDB_LVS_NODES"
}
######################################################################
case "$1" in case "$1" in
gettickles) gettickles)
setup_tickles setup_tickles
@ -455,5 +477,7 @@ case "$1" in
shutdown) ctdb_shutdown "$@";; shutdown) ctdb_shutdown "$@";;
setvar) ctdb_setvar "$@" ;; setvar) ctdb_setvar "$@" ;;
nodestatus) ctdb_nodestatus "$@" ;; nodestatus) ctdb_nodestatus "$@" ;;
lvsmaster) ctdb_lvs_master "$@" ;;
lvs) ctdb_lvs "$@" ;;
*) not_implemented "$1" ;; *) not_implemented "$1" ;;
esac esac