rpms/xen/FC-6 xen-hotplug-error-reporting.patch, NONE, 1.1 xen-pvfb-no-hvm.patch, NONE, 1.1 xen.spec, 1.164, 1.165

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Feb 15 14:59:02 UTC 2007


Author: berrange

Update of /cvs/dist/rpms/xen/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv23072

Modified Files:
	xen.spec 
Added Files:
	xen-hotplug-error-reporting.patch xen-pvfb-no-hvm.patch 
Log Message:
Improve hotplug error reporting. Don't start PVFB daemon for HVM

xen-hotplug-error-reporting.patch:
 examples/vif-bridge                     |    7 +++++++
 examples/xen-hotplug-common.sh          |    5 +++--
 python/xen/xend/server/DevController.py |   31 ++++++++++++++++---------------
 3 files changed, 26 insertions(+), 17 deletions(-)

--- NEW FILE xen-hotplug-error-reporting.patch ---
diff -ruN xen-3.0.3_0-src.orig/tools/examples/vif-bridge xen-3.0.3_0-src.new/tools/examples/vif-bridge
--- xen-3.0.3_0-src.orig/tools/examples/vif-bridge	2006-10-15 08:22:03.000000000 -0400
+++ xen-3.0.3_0-src.new/tools/examples/vif-bridge	2007-02-15 08:39:04.000000000 -0500
@@ -46,6 +46,13 @@
   fi
 fi
 
+RET=0
+ip link show $bridge 1>/dev/null 2>&1 || RET=1
+if [ "$RET" -eq 1 ]
+then
+    fatal "Could not find bridge device $bridge"
+fi
+
 case "$command" in
     online)
 	setup_bridge_port "$vif"
diff -ruN xen-3.0.3_0-src.orig/tools/examples/xen-hotplug-common.sh xen-3.0.3_0-src.new/tools/examples/xen-hotplug-common.sh
--- xen-3.0.3_0-src.orig/tools/examples/xen-hotplug-common.sh	2006-10-15 08:22:03.000000000 -0400
+++ xen-3.0.3_0-src.new/tools/examples/xen-hotplug-common.sh	2007-02-15 08:39:04.000000000 -0500
@@ -28,14 +28,15 @@
 unset $(set | grep ^LC_ | cut -d= -f1)
 
 fatal() {
-  xenstore_write "$XENBUS_PATH"/hotplug-status error
+  xenstore_write "$XENBUS_PATH/hotplug-error" "$*" \
+                 "$XENBUS_PATH/hotplug-status" error
   log err "$@"
   exit 1
 }
 
 success() {
   # Tell DevController that backend is "connected"
-  xenstore_write "$XENBUS_PATH"/hotplug-status connected
+  xenstore_write "$XENBUS_PATH/hotplug-status" connected
 }
 
 do_or_die() {
diff -ruN xen-3.0.3_0-src.orig/tools/python/xen/xend/server/DevController.py xen-3.0.3_0-src.new/tools/python/xen/xend/server/DevController.py
--- xen-3.0.3_0-src.orig/tools/python/xen/xend/server/DevController.py	2007-02-15 08:38:23.000000000 -0500
+++ xen-3.0.3_0-src.new/tools/python/xen/xend/server/DevController.py	2007-02-15 08:40:36.000000000 -0500
@@ -148,7 +148,7 @@
     def waitForDevice(self, devid):
         log.debug("Waiting for %s.", devid)
         
-        status = self.waitForBackend(devid)
+        (status,err) = self.waitForBackend(devid)
 
         if status == Timeout:
             self.destroyDevice(devid)
@@ -158,24 +158,21 @@
 
         elif status == Error:
             self.destroyDevice(devid)
-            raise VmError("Device %s (%s) could not be connected. "
-                          "Backend device not found." %
-                          (devid, self.deviceClass))
-
+            if err is None:
+                raise VmError("Device %s (%s) could not be connected. "
+                              "Backend device not found." %
+                              (devid, self.deviceClass))
+            else:
+                raise VmError("Device %s (%s) could not be connected. "
+                              "%s" % (devid, self.deviceClass, err))
         elif status == Missing:
             # Don't try to destroy the device; it's already gone away.
             raise VmError("Device %s (%s) could not be connected. "
                           "Device not found." % (devid, self.deviceClass))
 
         elif status == Busy:
-            err = None
-            frontpath = self.frontendPath(devid)
-            backpath = xstransact.Read(frontpath, "backend")
-            if backpath:
-                err = xstransact.Read(backpath, HOTPLUG_ERROR_NODE)
-            if not err:
+            if err is None:
                 err = "Busy."
-                
             self.destroyDevice(devid)
             raise VmError("Device %s (%s) could not be connected.\n%s" %
                           (devid, self.deviceClass, err))
@@ -428,17 +425,21 @@
         frontpath = self.frontendPath(devid)
         backpath = xstransact.Read(frontpath, "backend")
 
+
         if backpath:
             statusPath = backpath + '/' + HOTPLUG_STATUS_NODE
             ev = Event()
             result = { 'status': Timeout }
-            
+
             xswatch(statusPath, hotplugStatusCallback, ev, result)
 
             ev.wait(DEVICE_CREATE_TIMEOUT)
-            return result['status']
+
+            err = xstransact.Read(backpath, HOTPLUG_ERROR_NODE)
+
+            return (result['status'], err)
         else:
-            return Missing
+            return (Missing, None)
 
 
     def backendPath(self, backdom, devid):

xen-pvfb-no-hvm.patch:
 create.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE xen-pvfb-no-hvm.patch ---
diff -ruNp xen-3.0.3_0-src.orig/tools/python/xen/xm/create.py xen-3.0.3_0-src.new/tools/python/xen/xm/create.py
--- xen-3.0.3_0-src.orig/tools/python/xen/xm/create.py	2007-02-15 08:38:23.000000000 -0500
+++ xen-3.0.3_0-src.new/tools/python/xen/xm/create.py	2007-02-15 09:36:51.000000000 -0500
@@ -558,7 +558,7 @@ def configure_usb(config_devs, vals):
 
 def configure_vfbs(config_devs, vals):
     # old config compatibility
-    if vals.vfb == [] and (vals.sdl or vals.vnc):
+    if vals.vfb == [] and (vals.sdl or vals.vnc) and vals.builder != 'hvm':
         if vals.vnc:
             cfg = 'type=vnc'
             if vals.vncdisplay:


Index: xen.spec
===================================================================
RCS file: /cvs/dist/rpms/xen/FC-6/xen.spec,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -r1.164 -r1.165
--- xen.spec	15 Feb 2007 12:09:11 -0000	1.164
+++ xen.spec	15 Feb 2007 14:59:00 -0000	1.165
@@ -3,7 +3,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 3.0.3
-Release: 5%{dist}
+Release: 6%{dist}
 Group:   Development/Libraries
 License: GPL
 URL:     http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
@@ -16,6 +16,7 @@
 Patch8: xen-vmxballoon-hack.patch
 Patch9: xen-logfile-O_APPEND.patch
 Patch10: xen-uptime-device.patch
+
 Patch11: xen-print-fullpath.patch
 Patch12: xen-vmxassist-load16.patch
 Patch13: xen-dumpdir.patch
@@ -26,6 +27,7 @@
 Patch18: xen-qemu-ne2000-buffer.patch
 Patch19: xen-qemu-uppercase.patch
 Patch20: xen-floppy-device.patch
+
 Patch21: xen-blktap-no-aio-epoll.patch
 Patch22: xen-blktap-2tb.patch
 Patch23: xen-qemu-error-reporting.patch
@@ -36,6 +38,7 @@
 Patch28: xen-http-dump.patch
 Patch29: xen-xendomains-clean-restore.patch
 Patch30: xen-xc-loglevel.patch
+
 Patch31: xen-memory-map.patch
 Patch32: xen-qemu-cdrom-dma.patch
 Patch33: xen-xenbus-force-option.patch
@@ -46,7 +49,9 @@
 Patch38: xen-ipv6-xenbr.patch
 Patch39: xen-shadow-enable.patch
 Patch40: xen-man-pages.patch
+
 Patch80: xen-destroydevice-args.patch
+Patch81: xen-hotplug-error-reporting.patch
 
 # Patches to modify the default config of xend
 Patch100: xen-config-dom0-minmem.patch
@@ -58,6 +63,7 @@
 Patch201: xen-pvfb.patch
 Patch202: xen-pvfb-compat.patch
 Patch203: xen-pvfb-fixes.patch
+Patch204: xen-pvfb-no-hvm.patch
 
 # patches to make VNC only listen on localhost by default / use passwords
 Patch220: xen-3.0.4-vncpassword-pvfb-backport.patch
@@ -134,6 +140,7 @@
 #patch8 -p1 # FIXME: need to pull this one back
 %patch9 -p1
 %patch10 -p1
+
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
@@ -147,6 +154,7 @@
 %patch19 -p1
 # virtual floppy could be a device node
 %patch20 -p1
+
 # blktap patches
 %patch21 -p1
 # fix 2TB overflow/wraparound in blktap
@@ -167,6 +175,7 @@
 %patch29 -p1
 # use log level info for messages that are not errors
 %patch30 -p1
+
 # implement memory_map hypercall to determine maximum memory for a guest
 %patch31 -p1
 # enable DMA on virtual cdrom drive
@@ -187,8 +196,11 @@
 %patch39 -p1
 # Sanitize man pages
 %patch40 -p1
+
 # fix HVM cannot allocate memory bug
 %patch80 -p1
+# hotplug script error reporting
+%patch81 -p1
 
 # config patches
 %patch100 -p1
@@ -200,6 +212,7 @@
 %patch201 -p1
 %patch202 -p1
 %patch203 -p1
+%patch204 -p1
 
 # vnclisten/password patches
 %patch220 -p1
@@ -318,7 +331,11 @@
 %{_libdir}/*.a
 
 %changelog
-* Tue Jan 30 2007 Daniel Berrange <berrange at redhat.com> - 3.0.3-5.fc6
+* Thu Feb 15 2007 Daniel P. Berrange <berrange at redhat.com> - 3.0.3-6.fc6
+- Improve hotplug error reporting
+- Don't start PVFB daemon for HVM guests
+
+* Tue Jan 30 2007 Daniel P. Berrange <berrange at redhat.com> - 3.0.3-5.fc6
 - disable ipv6 autoconf on xenbr* devices (rhbz#216504)
 - Fixed destroyDevice callers
 - Workaround 'Cannot allocate memory' HVM bug




More information about the fedora-cvs-commits mailing list