recoverd: takeover_run_core() should not use modified node flags
authorMartin Schwenke <martin@meltin.net>
Mon, 13 May 2013 05:27:04 +0000 (15:27 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 23 May 2013 06:18:23 +0000 (16:18 +1000)
commit14bd0b6961ef1294e9cba74ce875386b7dfbf446
tree95cbeaa38702ea2bae984d95d24cce8c43df95ec
parenta8605f7e06076e7edf84e0cc160fd3d9ab5c4b64
recoverd: takeover_run_core() should not use modified node flags

Modifying the node flags with IP-allocation-only flags is not
necessary.  It causes breakage if the flags are not cleared after use.
ctdb_takeover_run() no longer needs the general node flags - it only
needs the IP flags.

Instead of modifying the node flags in nodemap, construct a custom IP
flags list and have takeover_run_core() use that instead of node
flags.  As well as being safer, this makes the IP allocation code more
self contained and a little bit clearer.

Signed-off-by: Martin Schwenke <martin@meltin.net>
server/ctdb_takeover.c
tests/src/ctdb_takeover_tests.c