KVM: configure bridged NICs at migration start
authorApollon Oikonomopoulos <apollon@noc.grnet.gr>
Wed, 22 Jun 2011 09:03:41 +0000 (12:03 +0300)
committerGuido Trotter <ultrotter@google.com>
Mon, 27 Jun 2011 21:56:09 +0000 (17:56 -0400)
commitcc8a8ed759049bdaa32649f0aa20dded6c9eddc9
treef59f70327d4df3255acdc63c440873cc5d45b057
parent96747bdab7813faac622d50a553616981bd6b302
KVM: configure bridged NICs at migration start

Commit 5d9bfd870 moved tap interface handling from KVM to Ganeti, partly
to also solve the problem of routed interfaces getting configured too
early during live migrations, causing network anomalies. In that
direction, configuration of NICs of incoming instances was deferred to
FinalizeMigration time.

However, this causes minor issues with bridged interfaces; KVM sends out
an ARP-like packet upon migration finish, which is lost because the tap
interface is not yet configured. As a consequence, intermediate network
equipment (i.e. switches) does not get notified about the topology
change, until the instance transmits another packet after the bridge has
been configured, or the switch's ARP cache expires.

The proper solution to that is to support different phases in network
configuration (pre/post migration), which also requires separate ifup
scripts. Until then we fall back to configuring bridged interfaces on
incoming instances at migration start, instead of finish.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/hypervisor/hv_kvm.py