mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
onnode: Be defensive when listing IPs of nodes with designated status.
The current version gives the last item left after stripping the known fields. If an insufficent number of status fields is stripped then this would return a residual status field value, which turned out to be a valid IP address for localhost... so no error occurs. This change means that the node number is stripped and any residual status field value will stay appended, causing an error the first time this command is tested. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 74715e6ec7b67c6f0e863aa51c87279758d6bf91)
This commit is contained in:
parent
597083d37a
commit
350f3e5b09
@ -169,7 +169,7 @@ get_nodes_with_status ()
|
||||
# the nth node to get the address. This would make things
|
||||
# more consistent if $ctdb_base/nodes actually contained
|
||||
# hostnames.
|
||||
nodes="${nodes} ${t##*:}"
|
||||
nodes="${nodes} ${t#:*:}"
|
||||
fi
|
||||
done
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user