SHA256
1
0
forked from pool/libvirt

- spec: Fix installation of default network

- Fix default setting of backend field of libxl_device_disk
  567779e5-libxl-default-disk-backend.patch
  rhb#912488

- Fix build on IA64
  Modified clone.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=249
This commit is contained in:
James Fehlig 2013-02-25 18:49:59 +00:00 committed by Git OBS Bridge
parent b920f5444b
commit 905e8c597f
4 changed files with 95 additions and 5 deletions

View File

@ -0,0 +1,38 @@
commit 567779e51a7727b021dee095c9d75cf0cde0bd43
Author: Jim Fehlig <jfehlig@suse.com>
Date: Wed Feb 20 13:02:28 2013 -0700
libxl: Fix setting of disk backend
The libxl driver was setting the backend field of libxl_device_disk
structure to LIBXL_DISK_BACKEND_TAP when the driver element of disk
configuration was not specified. This needlessly forces the use of
blktap driver, which may not be loaded in dom0
https://bugzilla.redhat.com/show_bug.cgi?id=912488
Ian Campbell suggested that LIBXL_DISK_BACKEND_UNKNOWN is a better
default in this case
https://www.redhat.com/archives/libvir-list/2013-February/msg01126.html
Index: libvirt-1.0.2/src/libxl/libxl_conf.c
===================================================================
--- libvirt-1.0.2.orig/src/libxl/libxl_conf.c
+++ libvirt-1.0.2/src/libxl/libxl_conf.c
@@ -525,9 +525,13 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
return -1;
}
} else {
- /* No driverName - default to raw/tap?? */
+ /*
+ * If driverName is not specified, default to raw as per
+ * xl-disk-configuration.txt in the xen documentation and let
+ * libxl pick a suitable backend.
+ */
x_disk->format = LIBXL_DISK_FORMAT_RAW;
- x_disk->backend = LIBXL_DISK_BACKEND_TAP;
+ x_disk->backend = LIBXL_DISK_BACKEND_UNKNOWN;
}
/* XXX is this right? */

View File

@ -2,7 +2,39 @@ Index: src/lxc/lxc_container.c
===================================================================
--- src/lxc/lxc_container.c.orig
+++ src/lxc/lxc_container.c
@@ -2358,6 +2358,9 @@ int lxcContainerStart(virDomainDefPtr de
@@ -136,6 +136,7 @@ int lxcContainerHasReboot(void)
int cmd, v;
int status;
char *tmp;
+ int stacksize = getpagesize() * 4;
if (virFileReadAll("/proc/sys/kernel/ctrl-alt-del", 10, &buf) < 0)
return -1;
@@ -152,14 +153,21 @@ int lxcContainerHasReboot(void)
VIR_FREE(buf);
cmd = v ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF;
- if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0) {
+#ifdef __ia64__
+ stacksize *= 2;
+#endif
+ if (VIR_ALLOC_N(stack, stacksize) < 0) {
virReportOOMError();
return -1;
}
- childStack = stack + (getpagesize() * 4);
+ childStack = stack + stacksize;
+#ifdef __ia64__
+ cpid = __clone2(lxcContainerRebootChild, stack, stacksize, flags, &cmd);
+#else
cpid = clone(lxcContainerRebootChild, childStack, flags, &cmd);
+#endif
VIR_FREE(stack);
if (cpid < 0) {
virReportSystemError(errno, "%s",
@@ -2358,6 +2366,9 @@ int lxcContainerStart(virDomainDefPtr de
ttyPaths, nttyPaths, handshakefd};
/* allocate a stack for the container */
@ -12,7 +44,7 @@ Index: src/lxc/lxc_container.c
if (VIR_ALLOC_N(stack, stacksize) < 0) {
virReportOOMError();
return -1;
@@ -2377,7 +2380,11 @@ int lxcContainerStart(virDomainDefPtr de
@@ -2377,7 +2388,11 @@ int lxcContainerStart(virDomainDefPtr de
cflags |= CLONE_NEWNET;
}
@ -24,7 +56,7 @@ Index: src/lxc/lxc_container.c
VIR_FREE(stack);
VIR_DEBUG("clone() completed, new container PID is %d", pid);
@@ -2403,6 +2410,7 @@ int lxcContainerAvailable(int features)
@@ -2403,6 +2418,7 @@ int lxcContainerAvailable(int features)
int cpid;
char *childStack;
char *stack;
@ -32,7 +64,7 @@ Index: src/lxc/lxc_container.c
if (features & LXC_CONTAINER_FEATURE_USER)
flags |= CLONE_NEWUSER;
@@ -2410,14 +2418,21 @@ int lxcContainerAvailable(int features)
@@ -2410,14 +2426,21 @@ int lxcContainerAvailable(int features)
if (features & LXC_CONTAINER_FEATURE_NET)
flags |= CLONE_NEWNET;

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Thu Feb 21 15:48:39 MST 2013 - jfehlig@suse.com
- spec: Fix installation of default network
-------------------------------------------------------------------
Wed Feb 20 16:37:03 MST 2013 - jfehlig@suse.com
- Fix default setting of backend field of libxl_device_disk
567779e5-libxl-default-disk-backend.patch
rhb#912488
-------------------------------------------------------------------
Tue Feb 12 16:17:36 MST 2013 - jfehlig@suse.com
- Fix build on IA64
Modified clone.patch
-------------------------------------------------------------------
Thu Feb 7 10:23:10 MST 2013 - jfehlig@suse.com

View File

@ -419,6 +419,7 @@ Source99: baselibs.conf
# Upstream patches
Patch0: a6b8bae5-python-generator-fix1.patch
Patch1: 25ea8e47-python-generator-fix2.patch
Patch2: 567779e5-libxl-default-disk-backend.patch
# Need to go upstream
Patch100: xen-name-for-devid.patch
Patch101: clone.patch
@ -560,6 +561,7 @@ Authors:
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch100 -p1
%patch101
%patch102 -p1
@ -858,7 +860,7 @@ rm -rf $RPM_BUILD_ROOT
%if %{with_libvirtd}
%if %{with_network}
# Install the default network if one doesn't exist
if ! /sbin/chkconfig libvirtd && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
if test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
then
UUID=`/usr/bin/uuidgen`
sed -e "s,</name>,</name>\n <uuid>$UUID</uuid>," \