File 0001-Alwas-set-model-netfront-for-xen-over-libvirt.patch of Package openstack-nova

From 73a12eabc44ba16f804cbfd9e780abfcbb7db486 Mon Sep 17 00:00:00 2001
From: Tomasz Paszkowski <tpaszkowski@suse.com>
Date: Wed, 17 Jul 2013 15:47:46 +0200
Subject: [PATCH] Alwas set model = 'netfront' for xen over libvirt.

This will prevent emulated network driver to be attached to virtual machine.
Emulated network driver is not working for xen over libvirt as tap interface
name is suffixed by xen with '-emu' which makes this interface name to long.

Additionaly security groups will not also work for this interface as openstack
is setting up filters on interface without -emu suffix.

Change-Id: I0907ce148e473edf6b81ea782fac2fa6a1b71a2d
Fixes: bug #1202199
---
 nova/tests/virt/libvirt/test_libvirt_vif.py | 2 +-
 nova/virt/libvirt/vif.py                    | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

Index: nova-2013.2.a71.g4e842e3/nova/virt/libvirt/vif.py
===================================================================
--- nova-2013.2.a71.g4e842e3.orig/nova/virt/libvirt/vif.py
+++ nova-2013.2.a71.g4e842e3/nova/virt/libvirt/vif.py
@@ -119,6 +119,12 @@ class LibvirtBaseVIFDriver(object):
             CONF.libvirt_type in ('kvm', 'qemu') and
                     CONF.libvirt_use_virtio_for_bridges):
             model = "virtio"
+        # For xen over libvirt we need to always use PV network
+        # drives as emulated ones will not work (xen suffixes them
+        # -emu which makes interface name to long). Additionaly
+        # security groups will not also work for -emu suffixed interfaces.
+        elif CONF.libvirt_type == "xen":
+            model = "netfront"
 
         # Workaround libvirt bug, where it mistakenly
         # enables vhost mode, even for non-KVM guests
openSUSE Build Service is sponsored by