[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: do not run a hotplug script from qemu on Linux


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Fri, 08 Jun 2012 00:44:09 +0000
  • Delivery-date: Fri, 08 Jun 2012 00:44:19 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1339091122 -3600
# Node ID e41a97112e0cf37ec382fdc02761d0c45984010c
# Parent  6e9552d15118f0d285585d44eab89585d0c35813
xend: do not run a hotplug script from qemu on Linux

The current vif-hotplug-common.sh for renaming the tap device is failing
because it is racing with this script and therefore the device is unexpectedly
up when we come to rename it.

Fix this in the same way as libxl does, by disabling the script (only on
Linux).

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 6e9552d15118 -r e41a97112e0c tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Thu Jun 07 18:34:25 2012 +0100
+++ b/tools/python/xen/xend/image.py    Thu Jun 07 18:45:22 2012 +0100
@@ -919,8 +919,13 @@ class HVMImageHandler(ImageHandler):
                        (nics, mac, model))
             vifname = "vif%d.%d-emu" % (self.vm.getDomid(), nics-1)
             ret.append("-net")
-            ret.append("tap,vlan=%d,ifname=%s,bridge=%s" %
-                       (nics, vifname, bridge))
+            if osdep.tapif_script is not None:
+                script=",script=%s,downscript=%s" % \
+                        (osdep.tapif_script, osdep.tapif_script)
+            else:
+                script=""
+            ret.append("tap,vlan=%d,ifname=%s,bridge=%s%s" %
+                       (nics, vifname, bridge, script))
 
         if nics == 0:
             ret.append("-net")
diff -r 6e9552d15118 -r e41a97112e0c tools/python/xen/xend/osdep.py
--- a/tools/python/xen/xend/osdep.py    Thu Jun 07 18:34:25 2012 +0100
+++ b/tools/python/xen/xend/osdep.py    Thu Jun 07 18:45:22 2012 +0100
@@ -30,6 +30,10 @@ _vif_script = {
     "SunOS": "vif-vnic"
 }
 
+_tapif_script = {
+    "Linux": "no",
+}
+
 PROC_XEN_BALLOON = '/proc/xen/balloon'
 SYSFS_XEN_MEMORY = '/sys/devices/system/xen_memory/xen_memory0'
 
@@ -257,6 +261,7 @@ def _get(var, default=None):
 
 xend_autorestart = _get(_xend_autorestart)
 vif_script = _get(_vif_script, "vif-bridge")
+tapif_script = _get(_tapif_script)
 lookup_balloon_stat = _get(_balloon_stat, _linux_balloon_stat)
 get_cpuinfo = _get(_get_cpuinfo, _linux_get_cpuinfo)
 prefork = _get(_get_prefork, _default_prefork)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.