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)
commit5fdf71b8982201de989c6e7ed89782424d13236c
treeff3a49e4a08ca3da97f87d541195c431a58dc79e
parent3f37b4418e92e13527fbf7311a5bd4291aad2342
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>
(This used to be ctdb commit 14bd0b6961ef1294e9cba74ce875386b7dfbf446)
ctdb/server/ctdb_takeover.c
ctdb/tests/src/ctdb_takeover_tests.c