Watcher: add option for setting RAPI IP
Watcher: add option for setting RAPI IP

Per default, the RAPI daemon binds to 0.0.0.0 when being
started. This means it serves from any IP the machine is
configured for. This works well together with the watcher
which always polls the RAPI daemons on 127.0.0.1 and
restarts it when it is not reachable.

If a user decides to start the RAPI daemon with a particular
IP other than 127.0.0.1 (using the option -b, for example
set in /etc/default/ganeti), RAPI will only serve from that
IP and thus it will not be reachable from 127.0.0.1. Since
the watcher only polls on this IP, it will inevitably fail
to connect to the RAPI daemon and thus restart it every five
minutes.

To solve this, this patch adds an option --rapi-ip to the
watcher. Whenever -b of the RAPI daemon is set, the watcher
needs to be fed the same IP with --rapi-ip (which means
editing /etc/cron.d/ganeti for example). This is not optimal
regarding user experience (as it is easy to forget one of
the two places), but the alternative would be to make this
a ganeti configuration parameter which is fed to both, RAPI
daemon and watcher, but this would be significantly more
effort for this relatively rarely used feature.

Signed-off-by: Helga Velroyen <2d0126b1ec6f9ec5cbec4a7012aa14faeaef10f5@google.com>
Reviewed-by: Petr Pudlak <9d19625f8ee825a2c398462ed335cbcf98f79c32@google.com>

andir/ganeti,ganeti/ganeti,leshchevds/ganeti,bitemyapp/ganeti,ganeti/ganeti,leshchevds/ganeti,onponomarev/ganeti,yiannist/ganeti,bitemyapp/ganeti,yiannist/ganeti,grnet/snf-ganeti,mbakke/ganeti,andir/ganeti,mbakke/ganeti,ganeti/ganeti,andir/ganeti,leshchevds/ganeti,grnet/snf-ganeti,mbakke/ganeti,onponomarev/ganeti,yiannist/ganeti