rpms/xen/devel xen-pvfb-terminate.patch, NONE, 1.1 xen-start-fail-cleanup.patch, NONE, 1.1 xen.spec, 1.176, 1.177

Daniel P. Berrange (berrange) fedora-extras-commits at redhat.com
Thu May 17 23:10:05 UTC 2007


Author: berrange

Update of /cvs/pkgs/rpms/xen/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19655

Modified Files:
	xen.spec 
Added Files:
	xen-pvfb-terminate.patch xen-start-fail-cleanup.patch 
Log Message:
Fixed VNC process cleanup & tear down guest on device failure

xen-pvfb-terminate.patch:

--- NEW FILE xen-pvfb-terminate.patch ---
diff -rup xen-3.1.0-testing.hg-rc7.orig/tools/xenfb/xenfb.c xen-3.1.0-testing.hg-rc7.new/tools/xenfb/xenfb.c
--- xen-3.1.0-testing.hg-rc7.orig/tools/xenfb/xenfb.c	2007-05-17 17:38:22.000000000 -0400
+++ xen-3.1.0-testing.hg-rc7.new/tools/xenfb/xenfb.c	2007-05-17 18:33:25.000000000 -0400
@@ -318,6 +318,10 @@ static int xenfb_using_old_protocol(stru
 
 	for (;;) {
 		state = xenfb_read_state(xsh, xenfb->fb.otherend);
+		if (state == XenbusStateUnknown) {
+			ret = -1;
+			break;
+		}
 		if (state > XenbusStateInitialising) {
 			ret = 0; /* frontend talks xenbus protocol */
 			break;
@@ -570,7 +574,7 @@ int xenfb_attach_dom(struct xenfb *xenfb
 {
 	struct xenfb_private *xenfb = (struct xenfb_private *)xenfb_pub;
 	struct xs_handle *xsh = xenfb->xsh;
-	int val, serrno;
+	int ret, val, serrno;
 	struct xenfb_page *fb_page;
 
 	xenfb_detach_dom(xenfb);
@@ -600,8 +604,9 @@ int xenfb_attach_dom(struct xenfb *xenfb
 	if (!xs_watch(xsh, xenfb->kbd.otherend, ""))
 		goto error;
 
-	if (xenfb_using_old_protocol(xenfb))
-		return 1;
+	ret = xenfb_using_old_protocol(xenfb);
+	if (ret)
+		return ret;
 
 	if (xenfb_wait_for_frontend_initialised(&xenfb->fb) < 0)
 		goto error;

xen-start-fail-cleanup.patch:

--- NEW FILE xen-start-fail-cleanup.patch ---
diff -rup xen-3.1.0-testing.hg-rc7.orig/tools/python/xen/xend/XendDomain.py xen-3.1.0-testing.hg-rc7.new/tools/python/xen/xend/XendDomain.py
--- xen-3.1.0-testing.hg-rc7.orig/tools/python/xen/xend/XendDomain.py	2007-05-17 17:38:22.000000000 -0400
+++ xen-3.1.0-testing.hg-rc7.new/tools/python/xen/xend/XendDomain.py	2007-05-17 17:43:40.000000000 -0400
@@ -994,10 +994,16 @@ class XendDomain:
             dominfo.start(is_managed = True)
         finally:
             self.domains_lock.release()
-        dominfo.waitForDevices()
+
+        try:
+            dominfo.waitForDevices()
+        except Exception, ex:
+            log.warn("Failed to setup devices for " + str(dominfo) + ": " + str(ex))
+            dominfo.destroy()
+            raise
+
         if not start_paused:
             dominfo.unpause()
-        
 
     def domain_delete(self, domid):
         """Remove a managed domain from database
Only in xen-3.1.0-testing.hg-rc7.new/tools/python/xen/xend: XendDomain.py~


Index: xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xen/devel/xen.spec,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -r1.176 -r1.177
--- xen.spec	4 May 2007 14:14:50 -0000	1.176
+++ xen.spec	17 May 2007 23:09:31 -0000	1.177
@@ -3,7 +3,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 3.1.0
-Release: 0.rc7.1%{dist}
+Release: 0.rc7.2%{dist}
 Group:   Development/Libraries
 License: GPL
 URL:     http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
@@ -15,6 +15,7 @@
 Patch6: xen-net-bridge.patch
 Patch13: xen-dumpdir.patch
 Patch18: xen-block-readonly.patch
+Patch19: xen-start-fail-cleanup.patch
 
 Patch20: xen-blktap-no-aio-epoll.patch
 Patch21: xen-blktap-error-returns.patch
@@ -28,6 +29,7 @@
 # Hack to support guest kernels using old PVFB protocol
 # from FC5/6 days. Can kill off once FC6 is EOL'd
 Patch150: xen-pvfb-compat.patch
+Patch151: xen-pvfb-terminate.patch
 
 Patch251: pygrub-manykernels.patch
 
@@ -100,6 +102,7 @@
 %patch6 -p1
 %patch13 -p1
 %patch18 -p1
+%patch19 -p1
 
 # blktap patches
 %patch20 -p1
@@ -113,6 +116,7 @@
 
 # pvfb compat
 %patch150 -p1
+%patch151 -p1
 
 # upstream patches
 %patch251 -p1
@@ -243,6 +247,10 @@
 %{_libdir}/*.a
 
 %changelog
+* Thu May 17 2007 Daniel P. Berrange <berrange at redhat.com> - 3.1.0-0.rc7.2.fc7
+- Ensure xen-vncfb processes are cleanedup if guest quits (bz 240406)
+- Tear down guest if device hotplug fails
+
 * Thu May  3 2007 Daniel P. Berrange <berrange at redhat.com> - 3.1.0-0.rc7.1.fc7
 - Updated to 3.1.0 rc7, changeset  15021 (upstream renumbered from 3.0.5)
 




More information about the fedora-extras-commits mailing list