summaryrefslogtreecommitdiffstats
path: root/ctdb/tools
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2009-09-15 13:35:58 +1000
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2009-09-15 13:35:58 +1000
commit59cacded72dc83d8cc81f840abf1801dcd361401 (patch)
treecb046bcee36be1a0b85e9859f93a209cd40bbe26 /ctdb/tools
parentc3556c3d88207e558484ddb5a9139c2b6e705d53 (diff)
downloadsamba-59cacded72dc83d8cc81f840abf1801dcd361401.tar.gz
samba-59cacded72dc83d8cc81f840abf1801dcd361401.tar.xz
samba-59cacded72dc83d8cc81f840abf1801dcd361401.zip
try to restart statd everytime it fails, not just the first time
(This used to be ctdb commit 4f7b39a4871af28df1c4545ec37db179fa47a7da)
Diffstat (limited to 'ctdb/tools')
-rwxr-xr-xctdb/tools/onnode25
1 files changed, 2 insertions, 23 deletions
diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode
index 79623a4a3c..e00cd2b1d9 100755
--- a/ctdb/tools/onnode
+++ b/ctdb/tools/onnode
@@ -35,7 +35,7 @@ Usage: onnode [OPTION] ... <NODES> <COMMAND> ...
-p Run command in parallel on specified nodes.
-q Do not print node addresses (overrides -v).
-v Print node address even for a single node.
- <NODES> "all", "any", "ok" (or "healthy"), "con" (or "connected"),
+ <NODES> "all", "ok" (or "healthy"), "con" (or "connected"),
"rm" (or "recmaster"), "lvs" (or "lvsmaster"),
"natgw" (or "natgwlist");
or a node number (0 base); or
@@ -112,7 +112,7 @@ parse_nodespec ()
case "$i" in
*-*) seq "${i%-*}" "${i#*-}" 2>/dev/null || invalid_nodespec ;;
# Separate lines for readability.
- all|any|ok|healthy|con|connected) echo "$i" ;;
+ all|ok|healthy|con|connected) echo "$i" ;;
rm|recmaster|lvs|lvsmaster|natgw|natgwlist) echo "$i" ;;
*)
[ $i -gt -1 ] 2>/dev/null || invalid_nodespec
@@ -198,24 +198,6 @@ get_node_with_property ()
fi
}
-get_any_available_node ()
-{
- local all_nodes="$1"
-
- # We do a recursive onnode to find which nodes are up and running.
- local out=$($0 -pq all ctdb pnn 2>&1)
- local line
- while read line ; do
- local pnn="${line#PNN:}"
- if [ "$pnn" != "$line" ] ; then
- echo_nth "$pnn" $all_nodes
- return 0
- fi
- # Else must be an error message from a down node.
- done <<<"$out"
- return 1
-}
-
get_nodes ()
{
local all_nodes
@@ -235,9 +217,6 @@ get_nodes ()
all)
echo "${all_nodes//#DEAD/}"
;;
- any)
- get_any_available_node "$all_nodes" || exit 1
- ;;
ok|healthy)
get_nodes_with_status "$all_nodes" "healthy" || exit 1
;;