ganeti-masterd: Master voting in separate process
ganeti-masterd: Master voting in separate process

One shouldn't fork a Python process after using threads. Master
voting is done before forking (utils.Daemonize), but it also uses
threads. Hence it's now called from a separate process.

This patch also fixes the check function to actually exit if
the current machine is not the master (introduced in 04ccf5e9).

Signed-off-by: Michael Hanselmann <68b67885ff74281219b4a4be33cc20fd45078d7c@google.com>
Reviewed-by: Iustin Pop <acf83a5274f31a43af6b914614365999469c1a31@google.com>

leshchevds/ganeti,ganeti-github-testing/ganeti-test-1,dimara/ganeti,mbakke/ganeti,grnet/snf-ganeti,andir/ganeti,leshchevds/ganeti,mbakke/ganeti,ganeti-github-testing/ganeti-test-1,apyrgio/snf-ganeti,mbakke/ganeti,yiannist/ganeti,ganeti/ganeti,yiannist/ganeti,onponomarev/ganeti,apyrgio/snf-ganeti,grnet/snf-ganeti,onponomarev/ganeti,ganeti/ganeti,bitemyapp/ganeti,bitemyapp/ganeti,yiannist/ganeti,andir/ganeti,ganeti/ganeti,andir/ganeti,dimara/ganeti,leshchevds/ganeti,apyrgio/ganeti,apyrgio/ganeti