Cleanup config data when draining nodes
authorIustin Pop <iustin@google.com>
Tue, 30 Jun 2009 16:10:16 +0000 (18:10 +0200)
committerIustin Pop <iustin@google.com>
Tue, 30 Jun 2009 16:33:04 +0000 (18:33 +0200)
commitdec0d9da26c6929e9157ec700f1e6dc8ab5a6bed
treec7573737940705265aa14d50c784fe49925a0146
parenta8ae3eb5f744e532fefe58462af783aab7d64f93
Cleanup config data when draining nodes

Currently, when draining nodes we reset their master candidate flag, but
we don't instruct them to demote themselves. This leads to “ERROR: file
'/var/lib/ganeti/config.data' should not exist on non master candidates
(and the file is outdated)”.

This patch simply adds a call to node_demote_from_mc in this case.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/cmdlib.py