Compare commits

..

165 Commits

Author SHA1 Message Date
Cole Robinson 7f92d7afe3 Rebased to version 1.3.3.3
schema: don't validate paths (bz #1353296)
2017-05-10 17:21:12 -04:00
Cole Robinson cbb559fcb0 Rebased to version 1.3.3.2
Fix xen default video device config (bz #1336629)
Don't reject duplicate disk serials (bz #1349895)
Fix LXC cgroup name mismatch (bz #1350139)
Fix managed save/restore with VM USB Keyboard (bz #1353222)
Missing dep on systemd-container (bz #1355784)
CVE-2016-5008: Setting empty VNC password allows access to unauthorized users (bz #1351516)
2016-07-18 20:31:11 -04:00
Daniel P. Berrange 8a27bc6189 Add deps on systemd-container 2016-07-13 17:49:41 +01:00
Cole Robinson 28f4698a20 Don't disable auto_login of non-libvirt-managed iscsi (bz #1331552)
Fix floppy media change (bz #1341998)
2016-06-23 16:47:05 -04:00
Cole Robinson eb5c1154f4 Fix advertising fedora edk2 firmware builds 2016-06-08 19:14:09 -04:00
Cole Robinson f27b21f121 Fix libxl video config via virt-install (bz #1334557)
Advertise fedora edk2 firmware builds to apps (bz #1335395)
2016-05-20 16:39:42 -04:00
Cole Robinson e762942369 Rebased to version 1.3.3.1
Fix default video device primary= setting (bz #1332701)
Drop libvirtd.socket (bz #1279348)
Start network after config-network RPM install (bz #867546)
2016-05-04 19:57:17 -04:00
Cole Robinson caebff8304 Re-run autotools, since patches touch configure 2016-04-15 06:23:13 -04:00
Cole Robinson 8fa41135ca libvirt assigns same address to two PCI devices (bz #1325085)
Fix build with -Werror
2016-04-14 19:46:33 -04:00
Cole Robinson 0debbff964 Rebased to version 1.3.3 2016-04-07 09:55:06 -04:00
Cole Robinson d6cc78be66 Fix qemu:///session disconnect after 30 seconds
Fix 'permission denied' errors trying to unlink disk images (bz #1289327)
Fix qemu:///session connect race failures (bz #1271183)
driver: log missing modules as INFO, not WARN (bz #1274849)
2016-03-17 17:38:30 -04:00
Richard W.M. Jones 8d9645735e Add fix for RHBZ#1315606. 2016-03-09 14:51:59 +00:00
Daniel P. Berrange 4c65f08330 Update to 1.3.2 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-03-01 14:26:53 +00:00
Daniel P. Berrange 2427f8f078 Re-enable wireshark 2016-02-24 22:23:39 +00:00
Dennis Gilmore d168e4f934 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 04:06:44 +00:00
Daniel P. Berrange 4dd365589f Disable wireshark due to https://bugzilla.redhat.com/show_bug.cgi?id=1300002 2016-01-19 17:44:37 +00:00
Daniel P. Berrange 50e253df29 Update to 1.3.1 release 2016-01-19 14:44:36 +00:00
Daniel P. Berrange cb71801a2b Add patch to fix 32-bit test suite check
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-12-11 12:15:31 +00:00
Daniel P. Berrange 4a9c74e91d Update to 1.3.0 release 2015-12-09 20:53:57 +00:00
Daniel P. Berrange 281508ec99 Update to 1.2.21 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-11-11 10:01:32 +00:00
Cole Robinson feb92626e1 Rebuild for xen 4.6 2015-10-11 16:08:21 -04:00
Daniel P. Berrange 93cadb0880 Update to 1.2.20 release 2015-10-02 15:58:35 +01:00
Daniel P. Berrange dd6b57aa60 Update to 1.2.19 release 2015-09-02 12:52:54 +01:00
Daniel P. Berrange b8cb754e9d Add workaround for //bugzilla.redhat.com/show_bug.cgi?id=1250020 2015-08-04 12:29:04 +01:00
Daniel P. Berrange dbe61507bd Update to 1.2.18 release 2015-08-04 09:50:35 +01:00
Richard W.M. Jones ce7b23d9d0 Fix 'Cannot write data: Broken pipe [code=38 domain=7]' (RHBZ#1247746). 2015-07-29 11:35:59 +01:00
Cole Robinson 8ded6ff93e Fix dep for f23 polkit packaging changes 2015-07-14 14:05:12 -04:00
Cole Robinson 1ef96f3488 Disable test suite, currently crashing on i686 2015-07-14 12:42:13 -04:00
Cole Robinson ee3bf37900 Update spec for 1.2.17 2015-07-14 12:23:04 -04:00
Peter Robinson 7452a06938 Rebuild (aarch64) 2015-07-12 22:27:12 +01:00
Daniel Veillard fe8f9ed9c4 Upstream release 1.2.17 2015-07-02 13:40:30 +08:00
Daniel P. Berrange 1b64f74c82 Rebuild for libwsman soname change
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-06-16 14:49:54 +01:00
Daniel P. Berrange c81949046d Update to 1.2.16 release 2015-06-01 10:05:32 +01:00
Daniel Veillard 19dcb913e6 Upstream release 1.2.16 2015-06-01 10:49:59 +08:00
Richard W.M. Jones e4b5ba1a9d Add Cole Robinson's patch to fix arch selection (bz# 1219198, bz#1219191) 2015-05-07 15:08:12 +01:00
Cole Robinson 5f1a422d83 Rebased to version 1.2.15 2015-05-04 13:28:39 -04:00
Cole Robinson c5b0b3ef9d Fix LXC domain startup (bz #1210397)
Fix race starting multiple session daemons (bz #1200149)
Fix change-media success messages
Strip invalid control codes from XML (bz #1066564, bz #1184131)
2015-04-15 14:40:41 -04:00
Cole Robinson c0a04cb876 Rebased to version 1.2.14 2015-04-02 12:44:09 -04:00
Daniel Veillard 3cc7cdf12f Upstream release 1.2.14 2015-04-02 15:56:44 +08:00
Cole Robinson 6b531d9967 Fix connecting to qemu:///session (bz #1198244) 2015-03-10 11:10:16 -04:00
Cole Robinson 4d05ac021c Rebased to version 1.2.13
lot of improvements around NUMA code
a lot of improvement and bug fixes
2015-03-02 11:36:45 -05:00
Daniel Veillard d29aa84b17 upstream release of libvirt-1.2.13 2015-03-02 11:46:49 +08:00
Daniel P. Berrange a075adc818 Rebuild for changed xen soname 2015-02-03 09:21:55 +00:00
Daniel P. Berrange 4d0e63f99c Update to 1.2.12 release 2015-01-27 10:53:52 +00:00
Daniel P. Berrange 9e11936ec5 Disable -Werror 2014-12-15 15:29:30 +00:00
Daniel P. Berrange a4075ec632 Update to 1.2.11 release 2014-12-15 12:01:37 +00:00
Cole Robinson dadb59c95f Allow arm/aarch64 with UEFI 2014-11-21 10:15:51 -05:00
Cole Robinson e73cc6a9d8 Fix caps probing when KVM is disabled (bz #1160318)
ppc64le fixes (bz #1163439)
2014-11-15 18:33:55 -05:00
Cole Robinson 10cd84e37f Remove unused patches 2014-11-15 15:21:48 -05:00
Daniel Veillard e63e2040cd Upstream release of 1.2.10 2014-11-03 15:13:32 +08:00
Cole Robinson 91063332d7 Fix creating i686 guest with x86_64 emulator (bz #1153797)
Fix tests with latest libxml2
2014-10-30 11:01:41 -04:00
Cole Robinson 503330ba5d Fix selinux errors with /dev/net/tun (bz #1147057) 2014-10-09 13:00:53 -04:00
Cole Robinson 0a64085f47 Fix specifying CPU for qemu aarch64 2014-10-03 09:32:42 -04:00
Daniel P. Berrange 1073e2447a Update to 1.2.9 release 2014-10-01 17:09:48 +01:00
Cole Robinson 5b1a906ace Fix labelling host devices (bz #1145968) 2014-09-24 12:15:49 -04:00
Cole Robinson aff97e0146 Fix specifying CPU for qemu aarch64 2014-09-23 17:27:47 -04:00
Cole Robinson a4b41a378b Rerun autotools for new patches 2014-09-18 16:06:49 -04:00
Cole Robinson 3ec523d168 Don't mess up labelling of /dev/net/tun (bz #1141879)
pflash/nvram support for UEFI/OVMF
2014-09-18 15:36:06 -04:00
Cole Robinson 622cf0d642 Fix preun script (bz #1142367) 2014-09-17 10:55:26 -04:00
Cole Robinson a540751e83 Generate non-colliding network IP range at RPM install time (bz #811967)
Fix directory creation at session daemon startup (bz #1139672)
Disable wireshark building, currently broken on f21/rawhide
2014-09-15 14:52:07 -04:00
Daniel P. Berrange 11b596669a Re-disable wireshark 2014-09-05 16:42:57 +01:00
Daniel P. Berrange fefbae879b Update to 1.2.8 release 2014-09-05 16:15:21 +01:00
Peter Robinson 695b281409 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-17 06:38:41 +00:00
Cole Robinson 9f9eae34c1 Rebased to version 1.2.7 2014-08-12 13:58:50 -04:00
Peter Robinson ae37ed3500 Enable kvm on aarch64, Cleanup F-16/18 conditionals 2014-07-15 17:52:18 +01:00
Daniel P. Berrange f7f509999b Update to 1.2.6 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-07-02 17:21:15 +01:00
Daniel Veillard 419bcc4b2f new release 2014-07-02 14:25:52 +08:00
Dennis Gilmore 7b59d4f7eb - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 00:55:30 -05:00
Daniel P. Berrange 03326e9c04 Update to 1.2.5 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-06-02 10:42:59 +01:00
Daniel P. Berrange f40b464d1e Update to 1.2.4 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-05-06 15:54:45 +01:00
Cole Robinson 810ca6c207 Fix LXC from throwing error System lacks NETNS support (bz #1084902) 2014-04-11 15:53:56 -04:00
Cole Robinson 8df3aef6aa Add sources 2014-04-01 18:00:14 -04:00
Cole Robinson 0223d5a656 Rebased to version 1.2.3 2014-04-01 17:50:30 -04:00
Cole Robinson aad810a204 Rebuild for xen 4.4 2014-03-24 08:53:56 -04:00
Daniel P. Berrange 1b8b7567b1 Update to 1.2.2 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-03-03 11:19:24 +00:00
Cole Robinson 442040caac Rebuild for openwsman soname bump 2014-01-27 13:21:35 -05:00
Daniel P. Berrange 65efaafca2 Update to 1.2.1 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-01-21 11:18:53 +00:00
Cole Robinson e87c8ab0c7 Remove unused patch 2014-01-16 20:36:40 -05:00
Daniel Veillard be6bda45b4 Updated to new tarball, but not the spec file 2014-01-16 18:17:37 +08:00
Daniel P. Berrange 8c9e40d383 Update to 1.2.0 release with python binding split off
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-12-03 15:10:43 +00:00
Daniel Veillard 0f6f9b973a New release, but do not build until libvirt-python is in git too 2013-12-02 13:31:49 +08:00
Cole Robinson 3db6039b2b virsh nodedev-detach fails if device has no driver (bz #1028629) 2013-11-12 09:46:29 -05:00
Daniel P. Berrange 4051217c8b Remove obsolete sources files
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-05 12:03:07 +08:00
Daniel Veillard c5c28baba1 Upstream release of libvirt-1.1.4 2013-11-04 14:27:40 +08:00
Cole Robinson 43618df1d4 Allow QoS change with update-device (bz #1014200)
Fix nwfilter crash during firewalld install (bz #1014762)
Fix crash with nographics (bz #1014088)
2013-10-06 15:14:15 -04:00
Daniel Veillard a2951dccb5 Rebase ot upstream 1.1.3 2013-10-01 15:51:28 +08:00
Cole Robinson b884323c03 Fix snapshot restore when VM has disabled usb support (bz #1011520) 2013-09-24 10:27:38 -04:00
Cole Robinson adeaf839fd Sync with v1.1.2-maint
Rebuild for libswan soname bump (bz #1009701)
CVE-2013-4311: Insecure polkit usage (bz #1009539, bz #1005332)
CVE-2013-4296: Invalid free memory stats (bz #1006173, bz #1009667)
CVE-2013-4297: Invalid free in NBDDeviceAssociate (bz #1006505, bz #1006511)
Fix virsh block-commit abort (bz #1010056)
2013-09-23 14:35:01 -04:00
Daniel P. Berrange 40d99010e1 Rebuild for soname break in openswman package 2013-09-18 14:44:25 +01:00
Daniel P. Berrange 11755d8663 Update to 1.1.2 release, rebasing ARM patches
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-09-02 11:48:17 +01:00
Cole Robinson 2daa92daf9 Fix launching ARM guests on x86 (patches posted upstream, F20 feature) 2013-08-20 15:25:47 -04:00
Cole Robinson db2858c661 CVE-2013-4239: xen: memory corruption in legacy driver (bz #996241, bz #996244) 2013-08-14 20:00:13 -04:00
Daniel P. Berrange 53adb9aaba Re-add code to delete python tests
Upstream mistakenly deleted code to remove the python test
files from the docs dir

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-07-30 11:27:28 +01:00
Daniel P. Berrange 168df8b606 Update to 1.1.1 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-07-30 10:59:15 +01:00
Dennis Gilmore f9085f2538 fix doc path in libvirt-python 2013-07-28 22:28:27 -05:00
Cole Robinson b159bbdc98 CVE-2013-4153: Fix double free of returned JSON (bz #986408, bz #986383)
CVE-2013-4154: Crash of libvirtd if guest agent not configured (bz #986386, bz #986406)
2013-07-25 17:53:26 -04:00
Daniel P. Berrange a5af3cf105 Rebuild for change in Xen library ABI/soname 2013-07-17 13:15:58 +01:00
Cole Robinson 27ca069db7 CVE-2013-2230 libvirt: multiple registered events crash 2013-07-11 16:47:16 -04:00
Daniel Veillard 000a3274d2 Release of libvirt-1.1.0 2013-07-01 19:30:25 +08:00
Peter Robinson 19c7799c31 Enable KVM support on ARM 2013-06-14 14:30:53 +01:00
Cole Robinson 198ff818c6 Drop bogus dep on vbox 2013-06-08 18:44:16 -04:00
Daniel P. Berrange e80c83ad06 Update to 1.0.6 release 2013-06-03 16:27:28 +01:00
Cole Robinson 660e0112c6 Rebased to version 1.0.5.1
Follow updated packaging guidelines for user alloc (bz #924501)
CVE-2013-1962 Open files DoS (bz #963789, bz #953107)
2013-05-19 18:33:15 -04:00
Cole Robinson 45c1cabef6 Fix stream operations like screenshot (bz #960879) 2013-05-14 17:32:09 -04:00
Richard W.M. Jones 56be2c5e38 Fix network driver when using qemu:///session (bz #958907). 2013-05-03 15:15:22 +01:00
Daniel Veillard 4aa9c4f1a3 Upstream release of libvirt-1.0.5 2013-05-02 18:39:42 +08:00
Daniel Veillard 7be420ad22 Update to 1.0.4 release 2013-04-01 15:54:31 +08:00
Daniel P. Berrange 40b00623a4 Update to 1.0.3 release 2013-03-05 16:00:44 +00:00
Richard W.M. Jones ce09ec66c7 Fix bogus dates in libvirt.spec by comparing changelog to true dates in git log. 2013-02-28 13:22:28 +00:00
Richard W.M. Jones 97d7c80e2e Disable virnettlscontexttest which apparently fails because of a broken gnutls3.
Note since this patch touches Makefile.am, I have enabled autoreconf
(enable_autotools).
2013-02-28 13:02:27 +00:00
Richard W.M. Jones b856ae03bf Backport "qemu: check backing chains even when cgroup is omitted"
(RHBZ#896685).
2013-02-28 09:58:19 +00:00
Daniel P. Berrange 803b3b891a Fix missing python binding constants 2013-02-05 15:51:47 +00:00
Daniel P. Berrange 350081d1a9 Update to 1.0.2 release 2013-02-01 10:48:53 +00:00
Cole Robinson 1b71b68bb9 Fix network persistence after define (bz #890492) 2013-01-29 20:17:02 -05:00
Cole Robinson 4084288dd5 CVE-2013-0170 libvirt: use-after-free in virNetMessageFree() (bz #893450, bz #905173) 2013-01-28 15:11:38 -05:00
Richard W.M. Jones d1cd1b7ceb Rebuild for libnl soname breakage (RHBZ#901569). 2013-01-20 19:56:14 +00:00
Daniel P. Berrange 5ed69704b9 Work around kernel headers problem 2013-01-18 20:01:53 +00:00
Daniel P. Berrange be6e136cb1 Rebuild for libnl3 soname change 2013-01-18 14:46:40 +00:00
Cole Robinson d3109abfa4 Fix scriplet warning when uninstalling libvirt-client (bz #888071) 2012-12-17 18:48:44 -05:00
Daniel Veillard f5ff4a2393 Update to upstream 1.0.1 release 2012-12-17 14:24:00 +08:00
Daniel P. Berrange 8cc50838dc Update to 1.0.0 release 2012-11-08 22:21:41 +01:00
Cole Robinson 2c2e71c0ce Disable libxl on F18 too 2012-10-30 20:54:40 -04:00
Cole Robinson 96b1b18b42 Rebased to version 0.10.2.1
Fix lvm volume creation when alloc=0 (bz #866481)
Clarify virsh send-keys man page example (bz #860004)
Fix occasional deadlock via virDomainDestroy (bz #859009)
Fix LXC deadlock from ctrl-c (bz #848119)
Fix occasional selinux denials with macvtap (bz #798605)
Fix multilib conflict with systemtap files (bz #831425)
Don't trigger keytab warning in system logs (bz #745203)
Fix qemu domxml-2-native NIC model out (bz #636832)
Fix error message if not enough space for lvm vol (bz #609104)
2012-10-27 17:56:09 -04:00
Cole Robinson f7763bfd17 Disable libxl driver, since it doesn't build with xen 4.2 in rawhide 2012-10-25 17:16:59 -04:00
Richard W.M. Jones 404e58cb18 Add upstream patches: don't duplicate environment variables (RHBZ#859596). 2012-09-24 20:59:05 +01:00
Richard W.M. Jones cd3767e3b9 Re-add 0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch
NB: This patch is Fedora-specific and not upstream.
2012-09-24 18:36:40 +01:00
Daniel Veillard f1867a5ecc Upstream release 0.10.2 2012-09-24 14:22:55 +08:00
Richard W.M. Jones b5548f62cb Add (upstream) patches to label sockets for SELinux (RHBZ#853393). 2012-09-21 18:58:41 +01:00
Richard W.M. Jones 52f3bedee7 Fix for 32 bit qemu renamed to qemu-system-i386 (RHBZ#857026).
The difference in the output of virsh capabilities (non-root)
before and after is:

 <capabilities>

   <host>
-    <uuid>9ecd5b8f-4b44-5dae-f4c6-4b9cf108e47a</uuid>
+    <uuid>4cae6f0f-dd64-8d9a-bc36-b3f2e62844cf</uuid>
     <cpu>
       <arch>i686</arch>
       <model>Westmere</model>
@@ -34,7 +34,7 @@
     <os_type>hvm</os_type>
     <arch name='i686'>
       <wordsize>32</wordsize>
-      <emulator>/bin/qemu-system-x86_64</emulator>
+      <emulator>/bin/qemu-system-i386</emulator>
       <machine>pc-1.2</machine>
       <machine>none</machine>
       <machine canonical='pc-1.2'>pc</machine>
2012-09-13 15:03:19 +01:00
Cole Robinson f87237919c Drop unneeded dnsmasq --filterwin2k
Fix unwanted connection closing, needed for boxes
Fix libvirtd segfault with old netcf-libs (bz 853381)
2012-09-12 08:18:36 -04:00
Daniel P. Berrange e8969fb913 Remove dep on ceph RPM (rhbz #854360) 2012-09-05 11:01:22 +01:00
Daniel Veillard 74d46bc7dd Release of libvirt-0.10.1
Brown paper bag release
2012-08-31 21:52:10 +08:00
Daniel Veillard 4b6ea94306 Upstream release of 0.10.0
- agent: add qemuAgentArbitraryCommand() for general qemu agent command
- Introduce virDomainPinEmulator and virDomainGetEmulatorPinInfo functions
- network: use firewalld instead of iptables, when available
- network: make network driver vlan-aware
- esx: Implement network driver
- driver for parallels hypervisor
- Various LXC improvements
- Add virDomainGetHostname
- a lot of bug fixes, improvements and portability work
2012-08-29 14:32:06 +08:00
Daniel Veillard 963754bc8c Fix a missing build requirement on dbus-devel 2012-08-23 16:14:20 +08:00
Daniel Veillard 7b5483236c release candidate 1 of 0.10.0 2012-08-23 15:53:24 +08:00
Daniel P. Berrange 438006407c Add correct patch for fixing module linkage & enable autotools
Add the correct patch to fix the module linkage problems
and enable autotools, so the Makefile.am changes actually
get applied
2012-08-14 16:21:02 +01:00
Daniel Veillard 76c8282ee2 Fix missing symbols in libvirt daemon in rc0 snapshot 2012-08-14 20:06:04 +08:00
Daniel Veillard f463598b24 Prerelease for libvirt-0.10.0
Snapshot before 0.10.0 expected beginning of september
2012-08-08 22:45:35 +08:00
Richard W.M. Jones f4e752a385 Add upstream patch to fix RHBZ#842114. 2012-07-23 14:09:48 +01:00
Dennis Gilmore c37cb21dea - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-19 16:33:02 -05:00
Cole Robinson e0bfc1f8aa BuildRequires: openssl-devel for rbd 2012-07-15 13:26:31 -04:00
Daniel Veillard 544ad4a787 Release of libvirt-0.9.13
- S390: support for s390(x)
- snapshot: implement new APIs for esx and vbox
- snapshot: new query APIs and many improvements
- virsh: Allow users to reedit rejected XML
- nwfilter: add DHCP snooping
- Enable driver modules in libvirt RPM
- Default to enable driver modules for libvirtd
- storage backend: Add RBD (RADOS Block Device) support
- sVirt support for LXC domains inprovement
- a lot of bug fixes, improvements and portability work
2012-07-02 13:15:52 +08:00
Daniel Veillard 8f163760ed Update to 0.9.12 2012-05-14 22:23:10 +08:00
Cole Robinson 565427cf89 Remove all accidentally added patches 2012-04-27 17:01:40 -04:00
Cole Robinson e10da2f6d4 Rebased to version 0.9.11.3
Abide URI username when connecting to hypervisor (bz 811397)
Fix managed USB mode (bz 814866)
Fix crash connecting to ESX host (bz 811891)
2012-04-27 16:56:05 -04:00
Cole Robinson aa386576d5 Fix python doc filelist 2012-04-26 20:39:12 -04:00
Cole Robinson c73c129b48 Rebased to version 0.9.11.2
Abide URI username when connecting to hypervisor (bz 811397)
Fix managed USB mode (bz 814866)
Fix crash connecting to ESX host (bz 811891)
2012-04-26 20:14:34 -04:00
Daniel P. Berrange afe729ac3c Fix initial hypervisor conditionals 2012-04-04 11:42:12 +01:00
Daniel P. Berrange b6038bae4f Remove bogus xen-devel dep from libvirt-devel RPM 2012-04-04 11:42:00 +01:00
Daniel P. Berrange e6d9787587 Introduce per-hypervisor virtual RPMs 2012-04-04 11:41:48 +01:00
Daniel P. Berrange 44699dc495 Split config files & daemon off from main daemon RPM 2012-04-04 11:41:26 +01:00
Daniel P. Berrange 991d719dde Remove API XML files from libvirt RPM 2012-04-04 11:41:06 +01:00
Daniel P. Berrange 96a520b555 Move all documentation into a -docs sub-RPM 2012-04-04 11:40:53 +01:00
Daniel P. Berrange e31df5e9de Update to 0.9.11 release 2012-04-04 11:40:32 +01:00
Daniel P. Berrange 6763b267b9 Fix client only RPM build & other misc RPM problems 2012-04-04 11:39:42 +01:00
Daniel P. Berrange 24e91208a4 spec: Add missed dependancy for numad 2012-04-04 11:38:11 +01:00
Daniel P. Berrange 15dec999e7 Add qemu support for ppc64 on FC16 or above for rpm packaging 2012-04-04 11:37:55 +01:00
Daniel P. Berrange d6b0635d3d Fixed service handling in specfile 2012-04-04 11:37:36 +01:00
Daniel P. Berrange 336a93264e storage: Allow runtime detection of scrub 2012-04-04 11:36:56 +01:00
Daniel P. Berrange 6398d1cff5 Fix typos in API XML file paths 2012-04-04 11:36:26 +01:00
Daniel P. Berrange 6926ed26ea Install API XML desc to a standard location 2012-04-04 11:36:11 +01:00
Daniel P. Berrange 6253f97a2d Revert previous change 2012-04-03 11:02:04 +01:00
Daniel P. Berrange 37ddbd0eac Refactor RPM spec to allow install without default configs 2012-03-31 12:38:10 +01:00
Daniel P. Berrange 95fe7c8df2 Rebuild for libparted soname break 2012-03-15 15:10:56 +00:00
Peter Robinson 79ae809020 fix ix86 macros 2012-02-17 15:27:03 +00:00
7 changed files with 1933 additions and 1396 deletions
-180
View File
@@ -1,180 +0,0 @@
From f3997733f0bca081d71848e66ca7d728b4c0a864 Mon Sep 17 00:00:00 2001
From: Alon Levy <alevy@redhat.com>
Date: Tue, 8 May 2012 20:42:44 +0300
Subject: [PATCH] domain_conf: add "default" to list of valid spice channels
qemu's behavior in this case is to change the spice server behavior to
require secure connection to any channel not otherwise specified as
being in plaintext mode. libvirt doesn't currently allow requesting this
(via plaintext-channel=<channel name>).
RHBZ: 819499
Signed-off-by: Alon Levy <alevy@redhat.com>
(cherry picked from commit ba97e4edc6aa439a4f1e70855cf4503181efdb7f)
Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
docs/formatdomain.html.in | 7 +++++++
docs/schemas/domaincommon.rng | 9 +++++++++
src/conf/domain_conf.c | 20 ++++++++++++++++++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 13 +++++++++++++
.../qemuxml2argv-graphics-spice.args | 2 +-
.../qemuxml2argv-graphics-spice.xml | 2 +-
7 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index e33913f..4a70b0f 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2913,6 +2913,13 @@ qemu-kvm -net nic,model=? /dev/null
<span class="since">Since 0.9.3</span>
NB, this may not be supported by all hypervisors.
<span class="since">"spice" since 0.8.6</span>.
+ The <code>defaultMode</code> attribute sets the default channel
+ security policy, valid values are <code>secure</code>,
+ <code>insecure</code> and the default <code>any</code>
+ (which is secure if possible, but falls back to insecure
+ rather than erroring out if no secure path is
+ available). <span class="since">"defaultMode" since
+ 0.9.12</span>.
</p>
<p>
When SPICE has both a normal and TLS secured TCP port
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 5bcf1b9..30ab4c6 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1779,6 +1779,15 @@
</choice>
</attribute>
</optional>
+ <optional>
+ <attribute name="defaultMode">
+ <choice>
+ <value>any</value>
+ <value>secure</value>
+ <value>insecure</value>
+ </choice>
+ </attribute>
+ </optional>
<interleave>
<ref name="listenElements"/>
<zeroOrMore>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d017ea4..2b21b11 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6069,6 +6069,8 @@ virDomainGraphicsDefParseXML(xmlNodePtr node,
char *port = virXMLPropString(node, "port");
char *tlsPort;
char *autoport;
+ char *defaultMode;
+ int defaultModeVal;
if (port) {
if (virStrToLong_i(port, NULL, 10, &def->data.spice.port) < 0) {
@@ -6101,6 +6103,20 @@ virDomainGraphicsDefParseXML(xmlNodePtr node,
VIR_FREE(autoport);
}
+ def->data.spice.defaultMode = VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_ANY;
+
+ if ((defaultMode = virXMLPropString(node, "defaultMode")) != NULL) {
+ if ((defaultModeVal = virDomainGraphicsSpiceChannelModeTypeFromString(defaultMode)) < 0) {
+ virDomainReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unknown default spice channel mode %s"),
+ defaultMode);
+ VIR_FREE(defaultMode);
+ goto error;
+ }
+ def->data.spice.defaultMode = defaultModeVal;
+ VIR_FREE(defaultMode);
+ }
+
if (def->data.spice.port == -1 && def->data.spice.tlsPort == -1) {
/* Legacy compat syntax, used -1 for auto-port */
def->data.spice.autoport = 1;
@@ -12111,6 +12127,10 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
virBufferEscapeString(buf, " keymap='%s'",
def->data.spice.keymap);
+ if (def->data.spice.defaultMode != VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_ANY)
+ virBufferAsprintf(buf, " defaultMode='%s'",
+ virDomainGraphicsSpiceChannelModeTypeToString(def->data.spice.defaultMode));
+
virDomainGraphicsAuthDefFormatAttr(buf, &def->data.spice.auth, flags);
break;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index a2fea00..62eaafb 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1233,6 +1233,7 @@ struct _virDomainGraphicsDef {
virDomainGraphicsAuthDef auth;
unsigned int autoport :1;
int channels[VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST];
+ int defaultMode; /* enum virDomainGraphicsSpiceChannelMode */
int image;
int jpeg;
int zlib;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 55e772f..f411712 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5499,6 +5499,7 @@ qemuBuildCommandLine(virConnectPtr conn,
const char *listenAddr = NULL;
char *netAddr = NULL;
int ret;
+ int defaultMode = def->graphics[0]->data.spice.defaultMode;
if (!qemuCapsGet(qemuCaps, QEMU_CAPS_SPICE)) {
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@@ -5582,6 +5583,18 @@ qemuBuildCommandLine(virConnectPtr conn,
virBufferAsprintf(&opt, ",x509-dir=%s",
driver->spiceTLSx509certdir);
+ switch (defaultMode) {
+ case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_SECURE:
+ virBufferAsprintf(&opt, ",tls-channel=default");
+ break;
+ case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_INSECURE:
+ virBufferAsprintf(&opt, ",plaintext-channel=default");
+ break;
+ case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_ANY:
+ /* nothing */
+ break;
+ }
+
for (i = 0 ; i < VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST ; i++) {
int mode = def->graphics[0]->data.spice.channels[i];
switch (mode) {
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
index c9fdb99..698e39c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
@@ -2,7 +2,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \
/usr/bin/qemu -S -M pc -m 214 -smp 1 -nodefaults -monitor \
unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -hda \
/dev/HostVG/QEMUGuest1 -spice port=5903,tls-port=5904,addr=127.0.0.1,\
-x509-dir=/etc/pki/libvirt-spice,tls-channel=main,plaintext-channel=inputs,\
+x509-dir=/etc/pki/libvirt-spice,tls-channel=default,tls-channel=main,plaintext-channel=inputs,\
image-compression=auto_glz,jpeg-wan-compression=auto,zlib-glz-wan-compression=auto,\
playback-compression=on,streaming-video=filter,disable-copy-paste -vga \
qxl -global qxl.vram_size=18874368 -device qxl,id=video1,vram_size=33554432,bus=pci.0,addr=0x4 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
index 8930b60..a3789f2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
@@ -22,7 +22,7 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<input type='mouse' bus='ps2'/>
- <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
+ <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1' defaultMode='secure'>
<listen type='address' address='127.0.0.1'/>
<channel name='main' mode='secure'/>
<channel name='inputs' mode='insecure'/>
--
1.7.7.6
-182
View File
@@ -1,182 +0,0 @@
From 3c3816ed226e766aa76624de7d159cdd1ee67913 Mon Sep 17 00:00:00 2001
From: Alon Levy <alevy@redhat.com>
Date: Tue, 8 May 2012 16:00:28 +0300
Subject: [PATCH] domain_conf: add "usbredir" to list of valid spice channels
Add "usbredir" channel to list of recognized spice channels.
RHBZ: 819498
Signed-off-by: Alon Levy <alevy@redhat.com>
(cherry picked from commit 4e78ffb63489071c4100678ed88d3111284555e8)
Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
docs/formatdomain.html.in | 8 ++-
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 3 +-
src/conf/domain_conf.h | 1 +
.../qemuxml2argv-graphics-spice-usb-redir.args | 16 ++++++
.../qemuxml2argv-graphics-spice-usb-redir.xml | 53 ++++++++++++++++++++
tests/qemuxml2argvtest.c | 6 ++
7 files changed, 84 insertions(+), 4 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 801e1ec..e33913f 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2922,9 +2922,11 @@ qemu-kvm -net nic,model=? /dev/null
main &lt;graphics&gt; element. Valid channel names
include <code>main</code>, <code>display</code>,
<code>inputs</code>, <code>cursor</code>,
- <code>playback</code>, <code>record</code>;
- and <span class="since">since
- 0.8.8</span>: <code>smartcard</code>.
+ <code>playback</code>, <code>record</code>
+ (all <span class="since"> since 0.8.6</span>);
+ <code>smartcard</code> (<span class="since">since
+ 0.8.8</span>); and <code>usbredir</code>
+ (<span class="since">since 0.9.12</span>).
</p>
<pre>
&lt;graphics type='spice' port='-1' tlsPort='-1' autoport='yes'&gt;
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 0cc04af..5bcf1b9 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1792,6 +1792,7 @@
<value>playback</value>
<value>record</value>
<value>smartcard</value>
+ <value>usbredir</value>
</choice>
</attribute>
<attribute name="mode">
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d886b60..d017ea4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -428,7 +428,8 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelName,
"cursor",
"playback",
"record",
- "smartcard");
+ "smartcard",
+ "usbredir");
VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelMode,
VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_LAST,
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 1b8741e..a2fea00 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1097,6 +1097,7 @@ enum virDomainGraphicsSpiceChannelName {
VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_PLAYBACK,
VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_RECORD,
VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_SMARTCARD,
+ VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_USBREDIR,
VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST
};
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args
new file mode 100644
index 0000000..35e51a7
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args
@@ -0,0 +1,16 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice /usr/bin/qemu -S -M pc -m 214 -smp 1 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \
+-device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x4.0x7 \
+-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 \
+-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 \
+-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 \
+-spice port=5903,tls-port=5904,addr=127.0.0.1,\
+x509-dir=/etc/pki/libvirt-spice,tls-channel=main,plaintext-channel=inputs,\
+tls-channel=usbredir,\
+image-compression=auto_glz,jpeg-wan-compression=auto,zlib-glz-wan-compression=auto,\
+playback-compression=on,streaming-video=filter,disable-copy-paste \
+-vga cirrus \
+-chardev socket,id=charredir0,host=localhost,port=4000 \
+-device usb-redir,chardev=charredir0,id=redir0 \
+-chardev spicevmc,id=charredir1,name=usbredir \
+-device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=4 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml
new file mode 100644
index 0000000..1dc23bd
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml
@@ -0,0 +1,53 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
+ <listen type='address' address='127.0.0.1'/>
+ <channel name='main' mode='secure'/>
+ <channel name='inputs' mode='insecure'/>
+ <channel name='usbredir' mode='secure'/>
+ <image compression='auto_glz'/>
+ <jpeg compression='auto'/>
+ <zlib compression='auto'/>
+ <playback compression='on'/>
+ <streaming mode='filter'/>
+ <clipboard copypaste='no'/>
+ </graphics>
+ <controller type='usb' index='0' model='ich9-ehci1'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci1'>
+ <master startport='0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci2'>
+ <master startport='2'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci3'>
+ <master startport='4'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
+ </controller>
+ <redirdev bus='usb' type='tcp'>
+ <source mode='connect' host='localhost' service='4000'/>
+ <protocol type='raw'/>
+ </redirdev>
+ <redirdev bus='usb' type='spicevmc'>
+ <address type='usb' bus='0' port='4'/>
+ </redirdev>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a32d4f8..b128c07 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -540,6 +540,12 @@ mymain(void)
QEMU_CAPS_VGA, QEMU_CAPS_VGA_QXL,
QEMU_CAPS_DEVICE, QEMU_CAPS_SPICE,
QEMU_CAPS_DEVICE_QXL_VGA);
+ DO_TEST("graphics-spice-usb-redir", false,
+ QEMU_CAPS_VGA, QEMU_CAPS_SPICE,
+ QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG,
+ QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_USB_HUB,
+ QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_USB_REDIR,
+ QEMU_CAPS_CHARDEV_SPICEVMC);
DO_TEST("input-usbmouse", false, NONE);
DO_TEST("input-usbtablet", false, NONE);
--
1.7.7.6
-22
View File
@@ -1,22 +0,0 @@
--- libvirt-0.9.11.5.orig/src/lxc/lxc_container.c 2012-08-12 18:03:58.000000000 -0500
+++ libvirt-0.9.11.5.orig/src/lxc/lxc_container.c 2012-09-21 07:38:19.000000000 -0500
@@ -506,7 +506,7 @@
if (pivotRoot) {
#if HAVE_SELINUX
if (getfilecon("/", &con) < 0 &&
- errno != ENOTSUP) {
+ errno != ENOTSUP && errno != ENODATA) {
virReportSystemError(errno, "%s",
_("Failed to query file context on /"));
goto cleanup;
--- libvirt-0.9.11.5.orig/src/lxc/lxc_controller.c 2012-08-12 18:03:58.000000000 -0500
+++ libvirt-0.9.11.5.orig/src/lxc/lxc_controller.c 2012-09-21 07:20:41.000000000 -0500
@@ -1480,7 +1480,7 @@
#if HAVE_SELINUX
if (getfilecon(root->src, &con) < 0 &&
- errno != ENOTSUP) {
+ errno != ENOTSUP && errno != ENODATA) {
virReportSystemError(errno,
_("Failed to query file context on %s"),
root->src);
@@ -1,155 +0,0 @@
From 7c96ce960b84ba19b9cc8e090615f54206e44ff0 Mon Sep 17 00:00:00 2001
From: Laine Stump <laine@laine.org>
Date: Tue, 6 Dec 2011 12:47:28 -0500
Subject: [PATCH] qemu: replace deprecated fedora-13 machine type with pc-0.14
This addresses https://bugzilla.redhat.com/show_bug.cgi?id=754772 .
It should only be applied to Fedora builds of libvirt, F15 and
later, so there is no upstream equivalent patch.
Background:
During the lifetime of Fedora 13, some features were backported into
the F13 build of qemu-kvm from upstream. These features were part of
the functionality of machine type "pc-0.13" in upstream qemu-kvm, so a
special "fedora-13" machine type was created for the F13 qemu-kvm.
Since "fedora-13" became the new "canonical machine type", all new
domains created with F13 libvirt tools by default contained that
machine type in their configuration file.
In Fedora 14, a patch was made to qemu to treat the fedora-13 machine
type as equivalent to "pc-0.13". When Fedora 15 was released, this was
inadvertently changed to make it equivalent to "pc-0.14".
With the release of Fedora 16, qemu-kvm initially removed support for
this machine type, which caused failure of many guest configurations
to start. qemu-kvm subsequently re-added the patch to support
fedora-13 (as equivalent to pc-0.14), but with the promise that they
could remove it with the release of Fedora 17. (see
https://bugzilla.redhat.com/show_bug.cgi?id=748218 ).
Solution:
In order to create a repeat of the recent problems, prior to F17
existing guest configurations need to be updated to change fedora-13
to pc-0.14 (which has been determined to be equivalent for all
practical purposes in both F15 and F16). That's what this patch does:
1) Each time libvirtd is started, it calls virDomainLoadAllConfigs()
which calls virDomainLoadConfig(); this function has been modified to
check for os.machine == "fedora-13", and change it to "pc-0.14" then
write the updated config back to disk.
2) Also, any other time a domain definition is parsed, the parsed
version in memory is changed to turn "fedora-13" into "pc-0.14". This
handles domains that had been saved to disk prior to the upgrade, and
are subsequently restarted.
3) Finally, whenever a domain definition is formatted into a string,
any occurrence of fedora-13 is replaced with pc-0.14 *directly in the
virDomainDef* (to avoid multiple warning messages for the same object
when it's formatted multiple times). This should deal with those cases
where a domain was running at the time of upgrade, and is later
saved/snapshotted.
I had considered doing this with some sed commands in the specfile,
but that wouldn't do anything to help the xml saved in image files.
(Also, one of the xml tests was using the machine type "fedora-13",
and since that machine type is treated specially by the rest of this
patch, it was failing. That has been changed in a separate patch,
which must be applied with this patch, and which *is* also upstream).
---
src/conf/domain_conf.c | 62 +++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 59 insertions(+), 3 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f8d0a4c..c79014b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8394,7 +8394,25 @@ virDomainDefPtr virDomainDefParseString(virCapsPtr caps,
unsigned int expectedVirtTypes,
unsigned int flags)
{
- return virDomainDefParse(xmlStr, NULL, caps, expectedVirtTypes, flags);
+ virDomainDefPtr def
+ = virDomainDefParse(xmlStr, NULL, caps, expectedVirtTypes, flags);
+
+ /* Fedora-specific HACK - treat fedora-13 and pc-0.14 as equivalent.
+ * This handles the case of domains that had been saved to an image file
+ * prior to upgrade (save or snapshot), then restarted/reverted.
+ */
+ if (def && STREQ_NULLABLE(def->os.machine, "fedora-13")) {
+ VIR_FREE(def->os.machine);
+ if (!(def->os.machine = strdup("pc-0.14"))) {
+ virReportOOMError();
+ virDomainDefFree(def);
+ def = NULL;
+ } else {
+ VIR_WARN("Replacing deprecated 'fedora-13' machine type "
+ "with equivalent 'pc-0.14' in domain %s xml", def->name);
+ }
+ }
+ return def;
}
virDomainDefPtr virDomainDefParseFile(virCapsPtr caps,
@@ -11737,8 +11755,30 @@ virDomainDefFormatInternal(virDomainDefPtr def,
virBufferAddLit(buf, " <type");
if (def->os.arch)
virBufferAsprintf(buf, " arch='%s'", def->os.arch);
- if (def->os.machine)
- virBufferAsprintf(buf, " machine='%s'", def->os.machine);
+ if (def->os.machine) {
+ /* Fedora-specific HACK - replace "fedora-13" with "pc-0.14"
+ * (in the original DomainDef as well as in the xml output).
+ * This will catch XML being written to save/migration images
+ * of domains that were running when libvirtd was restarted at
+ * the time of upgrade.
+ */
+ if (STREQ_NULLABLE(def->os.machine, "fedora-13")) {
+ virBufferAddLit(buf, " machine='pc-0.14'");
+ VIR_WARN("substituting machine type 'fedora-13' with 'pc-0.14' "
+ "in domain %s", def->name);
+ /* It's not exactly nice to modify the source object,
+ * but sometimes virDomainFormat is called > 100 times for the
+ * same object, which would result in far too many warning logs.
+ */
+ VIR_FREE(def->os.machine);
+ if (!(def->os.machine = strdup("pc-0.14"))) {
+ virReportOOMError();
+ goto cleanup;
+ }
+ } else {
+ virBufferAsprintf(buf, " machine='%s'", def->os.machine);
+ }
+ }
/*
* HACK: For xen driver we previously used bogus 'linux' as the
* os type for paravirt, whereas capabilities declare it to
@@ -12149,6 +12189,22 @@ static virDomainObjPtr virDomainLoadConfig(virCapsPtr caps,
VIR_DOMAIN_XML_INACTIVE)))
goto error;
+ /* Fedora-specific HACK - replace "fedora-13" with "pc-0.14".
+ * This updates all config files at the first restart of libvirt
+ * after upgrade.
+ */
+ if (STREQ_NULLABLE(def->os.machine, "fedora-13")) {
+ VIR_FREE(def->os.machine);
+ if (!(def->os.machine = strdup("pc-0.14"))) {
+ virReportOOMError();
+ goto error;
+ }
+ VIR_WARN("Replacing deprecated 'fedora-13' machine type "
+ "with equivalent 'pc-0.14' in domain %s configuration file", name);
+ if (virDomainSaveConfig(configDir, def) < 0)
+ goto error;
+ }
+
if ((autostartLink = virDomainConfigFile(autostartDir, name)) == NULL)
goto error;
--
1.7.7.6
-218
View File
@@ -1,218 +0,0 @@
commit b8012ce9312f00947c5ca7250a7a96534c85835f
Author: David Weber <wb@munzinger.de>
Date: Mon May 14 09:53:02 2012 +0000
sanlock: fix locking for readonly devices
Add ignore param for readonly and shared disk in sanlock
diff --git a/src/locking/libvirt_sanlock.aug b/src/locking/libvirt_sanlock.aug
index 5f5f8a1..d65b002 100644
--- a/src/locking/libvirt_sanlock.aug
+++ b/src/locking/libvirt_sanlock.aug
@@ -21,6 +21,7 @@ module Libvirt_sanlock =
| bool_entry "auto_disk_leases"
| int_entry "host_id"
| bool_entry "require_lease_for_disks"
+ | bool_entry "ignore_readonly_and_shared_disks"
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index d344d6a..146aefd 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -1,7 +1,7 @@
/*
* lock_driver_sanlock.c: A lock driver for Sanlock
*
- * Copyright (C) 2010-2011 Red Hat, Inc.
+ * Copyright (C) 2010-2012 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -65,6 +65,7 @@ struct _virLockManagerSanlockDriver {
bool requireLeaseForDisks;
int hostID;
bool autoDiskLease;
+ bool ignoreReadonlyShared;
char *autoDiskLeasePath;
};
@@ -114,6 +115,10 @@ static int virLockManagerSanlockLoadConfig(const char *configFile)
CHECK_TYPE("auto_disk_leases", VIR_CONF_LONG);
if (p) driver->autoDiskLease = p->l;
+ p = virConfGetValue(conf, "ignore_readonly_and_shared_disks");
+ CHECK_TYPE("ignore_readonly_and_shared_disks", VIR_CONF_LONG);
+ if (p) driver->ignoreReadonlyShared = p->l;
+
p = virConfGetValue(conf, "disk_lease_dir");
CHECK_TYPE("disk_lease_dir", VIR_CONF_STRING);
if (p && p->str) {
@@ -625,6 +630,12 @@ static int virLockManagerSanlockAddResource(virLockManagerPtr lock,
return -1;
}
+ if ((flags & (VIR_LOCK_MANAGER_RESOURCE_READONLY |
+ VIR_LOCK_MANAGER_RESOURCE_SHARED)) &&
+ driver->ignoreReadonlyShared) {
+ return 0;
+ }
+
if (flags & VIR_LOCK_MANAGER_RESOURCE_READONLY) {
virLockError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Readonly leases are not supported"));
diff --git a/src/locking/sanlock.conf b/src/locking/sanlock.conf
index efc35ee..19ab2b3 100644
--- a/src/locking/sanlock.conf
+++ b/src/locking/sanlock.conf
@@ -52,3 +52,10 @@
# to enabled, otherwise it defaults to disabled.
#
#require_lease_for_disks = 1
+
+#
+# Enable this flag to have sanlock ignore readonly and shared disks.
+# If disabled, then this rejects attempts to share resources until
+# sanlock gains support for shared locks.
+#
+#ignore_readonly_and_shared_disks = 1
commit acbd4965c44c4dbc676dfe89aff970052e376073
Author: Daniel P. Berrange <berrange@redhat.com>
Date: Thu Jun 21 15:34:46 2012 +0100
Add support for shared sanlock leases
A sanlock lease can be marked as shared (rather
than exclusive) using SANLK_RES_SHARED flag. This
adds support for that flag and ensures that in auto
disk mode, any shared disks use shared leases. This
also makes any read-only disks be completely
ignored.
These changes remove the need for the option
ignore_readonly_and_shared_disks
so that is removed
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index 146aefd..16941c9 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -65,7 +65,6 @@ struct _virLockManagerSanlockDriver {
bool requireLeaseForDisks;
int hostID;
bool autoDiskLease;
- bool ignoreReadonlyShared;
char *autoDiskLeasePath;
};
@@ -115,10 +114,6 @@ static int virLockManagerSanlockLoadConfig(const char *configFile)
CHECK_TYPE("auto_disk_leases", VIR_CONF_LONG);
if (p) driver->autoDiskLease = p->l;
- p = virConfGetValue(conf, "ignore_readonly_and_shared_disks");
- CHECK_TYPE("ignore_readonly_and_shared_disks", VIR_CONF_LONG);
- if (p) driver->ignoreReadonlyShared = p->l;
-
p = virConfGetValue(conf, "disk_lease_dir");
CHECK_TYPE("disk_lease_dir", VIR_CONF_STRING);
if (p && p->str) {
@@ -428,7 +423,8 @@ static int virLockManagerSanlockDiskLeaseName(const char *path,
static int virLockManagerSanlockAddLease(virLockManagerPtr lock,
const char *name,
size_t nparams,
- virLockManagerParamPtr params)
+ virLockManagerParamPtr params,
+ bool shared)
{
virLockManagerSanlockPrivatePtr priv = lock->privateData;
int ret = -1;
@@ -440,6 +436,7 @@ static int virLockManagerSanlockAddLease(virLockManagerPtr lock,
goto cleanup;
}
+ res->flags = shared ? SANLK_RES_SHARED : 0;
res->num_disks = 1;
if (!virStrcpy(res->name, name, SANLK_NAME_LEN)) {
virLockError(VIR_ERR_INTERNAL_ERROR,
@@ -485,7 +482,8 @@ cleanup:
static int virLockManagerSanlockAddDisk(virLockManagerPtr lock,
const char *name,
size_t nparams,
- virLockManagerParamPtr params ATTRIBUTE_UNUSED)
+ virLockManagerParamPtr params ATTRIBUTE_UNUSED,
+ bool shared)
{
virLockManagerSanlockPrivatePtr priv = lock->privateData;
int ret = -1;
@@ -503,6 +501,7 @@ static int virLockManagerSanlockAddDisk(virLockManagerPtr lock,
goto cleanup;
}
+ res->flags = shared ? SANLK_RES_SHARED : 0;
res->num_disks = 1;
if (virLockManagerSanlockDiskLeaseName(name, res->name, SANLK_NAME_LEN) < 0)
goto cleanup;
@@ -630,27 +629,15 @@ static int virLockManagerSanlockAddResource(virLockManagerPtr lock,
return -1;
}
- if ((flags & (VIR_LOCK_MANAGER_RESOURCE_READONLY |
- VIR_LOCK_MANAGER_RESOURCE_SHARED)) &&
- driver->ignoreReadonlyShared) {
- return 0;
- }
-
- if (flags & VIR_LOCK_MANAGER_RESOURCE_READONLY) {
- virLockError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Readonly leases are not supported"));
- return -1;
- }
- if (flags & VIR_LOCK_MANAGER_RESOURCE_SHARED) {
- virLockError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Shareable leases are not supported"));
- return -1;
- }
+ /* Treat R/O resources as a no-op lock request */
+ if (flags & VIR_LOCK_MANAGER_RESOURCE_READONLY)
+ return 0;
switch (type) {
case VIR_LOCK_MANAGER_RESOURCE_TYPE_DISK:
if (driver->autoDiskLease) {
- if (virLockManagerSanlockAddDisk(lock, name, nparams, params) < 0)
+ if (virLockManagerSanlockAddDisk(lock, name, nparams, params,
+ !!(flags & VIR_LOCK_MANAGER_RESOURCE_SHARED)) < 0)
return -1;
if (virLockManagerSanlockCreateLease(priv->res_args[priv->res_count-1]) < 0)
@@ -664,7 +651,8 @@ static int virLockManagerSanlockAddResource(virLockManagerPtr lock,
break;
case VIR_LOCK_MANAGER_RESOURCE_TYPE_LEASE:
- if (virLockManagerSanlockAddLease(lock, name, nparams, params) < 0)
+ if (virLockManagerSanlockAddLease(lock, name, nparams, params,
+ !!(flags & VIR_LOCK_MANAGER_RESOURCE_SHARED)) < 0)
return -1;
break;
diff --git a/src/locking/sanlock.conf b/src/locking/sanlock.conf
index 19ab2b3..efc35ee 100644
--- a/src/locking/sanlock.conf
+++ b/src/locking/sanlock.conf
@@ -52,10 +52,3 @@
# to enabled, otherwise it defaults to disabled.
#
#require_lease_for_disks = 1
-
-#
-# Enable this flag to have sanlock ignore readonly and shared disks.
-# If disabled, then this rejects attempts to share resources until
-# sanlock gains support for shared locks.
-#
-#ignore_readonly_and_shared_disks = 1
+1932 -638
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1 +1 @@
2d4eafc04fe52a8503acb6d42888a618 libvirt-0.9.11.10.tar.gz
SHA512 (libvirt-1.3.3.3.tar.gz) = 63f68b100ee73cd44ec983c24cc441f6b0361ebbf0c05b8ab4638f4819d6ec372823e5b66c65ddfac0539717a202253d9ee23456235aff963acb83d2e64f8ae2