Add protection against daemons that may already be listening
authorHrvoje Ribicic <riba@google.com>
Mon, 8 Jun 2015 16:35:27 +0000 (16:35 +0000)
committerHrvoje Ribicic <riba@google.com>
Thu, 11 Jun 2015 14:23:19 +0000 (16:23 +0200)
commitd4dc63024b5f60c2415d1b9b6e3758018c6bb410
treef180fddae095a5a8cd361c8b9bbc82295e7bb12d
parentd43c2d309d5d2b9829d2988e9b145be4b8a9de47
Add protection against daemons that may already be listening

Should the migration port already be taken, Ganeti will try and start a
socat daemon that will immediately die, leaving Ganeti to pipe the
migration data into whatever process that happens to be listening. This
patch prevents that from happening by checking if the socat daemon
started by Ganeti is ready to accept the migration data.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
lib/hypervisor/hv_xen.py