onnode: fix get_nodes_with_status()
authorMartin Schwenke <martin@meltin.net>
Mon, 23 May 2011 05:24:52 +0000 (15:24 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 8 Jun 2011 04:23:36 +0000 (14:23 +1000)
commitd7ab0958609264df36b7db5591d7013c0d9f95d2
tree2ae429504811e9b5cbd0ef94afb8c5388038b7be
parent8f75f620f97672ad9ee65cb8d9c10d1916413ffb
onnode: fix get_nodes_with_status()

Setting IFS and looping though items with colons in them doesn't work.
Change this to read through the output line by line.  The header line
needs to be thrown away by throwing away everything up to the 1st
newline.

Keep stderr from the "ctdb status" command, otherwise debugging is
impossible.

On error, append any output from ctdb to onnode's error message.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tools/onnode