Compare commits

..

409 Commits

Author SHA1 Message Date
Cole Robinson 5a42f1fcdc Fix potential dataloss on snapshot deletion
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2025-03-05 11:27:07 -05:00
Cole Robinson b14bf469da libvirt-10.6.0-6.fc41
Fix DHCP response checksum when using nftables firewall
Permit forward mode=open when network has no IP (bz 2255266)

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-12-14 13:48:38 -05:00
Laine Stump f2e51513a0 Fix DHCP response checksum when using nftables firewall backend for virtual networks 2024-12-11 15:58:43 -05:00
Cole Robinson 4f3b8e6a17 libvirt-10.6.0-5
Rebuild for new wireshark
2024-09-24 05:18:59 -04:00
David Abdurachmanov 985e71cf0c Add riscv64 to arches_qemu_kvm
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-09-18 15:07:58 +02:00
Dennis Gilmore c1a7e5f39b rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark
rebuild for updated wireshark

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2024-09-12 08:59:02 -05:00
Lumir Balhar 77b02695ab Add new systemtap-sdt-dtrace to build deps
This is a part of approved Fedora change:
https://fedoraproject.org/wiki/Changes/Separate_dtrace_package

systemtap-sdt-devel will stop requiring systemtap-sdt-dtrace
and that would break the build of this package.
2024-08-27 09:09:52 -04:00
Cole Robinson 50057212b3 libvirt-10.6.0-2
Fix  on kernel 6.10 (bz #2302245)
2024-08-27 08:54:25 -04:00
Cole Robinson c61c2c83ef libvirt-10.6.0-1
Update to version 10.6.0
2024-08-06 08:57:52 -04:00
Richard W.M. Jones e3e721c529 Rebuild for Xen 4.19.0 2024-08-05 11:11:49 +01:00
Fedora Release Engineering 7bf08eb7cb Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 15:26:05 +00:00
Daniel P. Berrangé 0862e2b778 Rebase to 10.5.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-07-04 10:31:26 +01:00
Daniel P. Berrangé 9ae002fc72 Fix GSource leak & udev leak
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-06-05 12:55:10 +01:00
Daniel P. Berrangé 7749fc4a26 Update to 10.4.0 release
This switches the virtual network backend from iptables to nftables
and introduces an SSH VSOCK proxy by default for QEMU.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-06-05 10:09:34 +01:00
Daniel P. Berrangé 5b0f05f970 Update to 10.3.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-05-02 14:38:32 +01:00
Cole Robinson 36079ddefa Rebuild for new libiscsi
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-04-06 15:04:19 -04:00
Cole Robinson 9abc69f078 libvirt-10.2.0-1
Update to version 10.2.0
2024-04-05 19:16:45 -04:00
Cole Robinson f4d251ad6e Add sources
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-03-01 13:00:28 -05:00
Cole Robinson b0d2e09842 Update to version 10.1.0
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-03-01 12:47:39 -05:00
Cole Robinson b0dd011728 spec: Handle bash-completion .pc file move
it's in bash-completion-devel now, but pkgconfig() will handle
that for us.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-02-19 11:35:24 -05:00
Cole Robinson 2513c9ff81 libvirt-10.0.0-4
Rebuild for wireshark soname bump
2024-02-19 10:44:48 -05:00
Fedora Release Engineering 9ef5501a94 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 03:55:08 +00:00
Fedora Release Engineering 659f2f0b36 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 05:41:08 +00:00
Cole Robinson f3cac3532b libvirt-10.0.0-1
Update to version 10.0.0
2024-01-16 11:11:03 -05:00
jonathanspw 6eb56c2e71 fix regression for default input bus in libvirt >= 9.3
(cherry picked from commit dfeabf11e5)
2024-01-03 22:27:00 +00:00
Richard W.M. Jones 93a549eb1a Bump and rebuild for xen 4.18.0, third attempt 2023-12-08 10:02:08 +00:00
Adam Williamson f2a998ce76 Rebuild for xen 4.18.0 again 2023-12-05 10:41:25 -08:00
Cole Robinson 8556d44e84 libvirt-9.10.0-1
Update to version 9.10.0
2023-12-02 12:22:48 -05:00
Richard W.M. Jones f8539fae13 Backport upstream cfcbba4c2b8a
commit cfcbba4c2b8a2062dec36072a34209229b6c3277
  Author: Michal Prívozník <mprivozn@redhat.com>
  Date:   Wed Nov 22 14:58:49 2023 +0100

    lib: Replace qsort() with g_qsort_with_data()
2023-11-30 10:40:30 +00:00
Richard W.M. Jones 80a3188a20 Fix libxml2 API changes 2023-11-30 09:02:20 +00:00
Richard W.M. Jones 56d89b1d61 Bump and rebuild for xen 4.18.0 2023-11-30 08:35:47 +00:00
Cole Robinson 2a7828bae8 libvirt-9.9.0-2
Fix crash with snapshot restore (bz #2247754)
2023-11-06 09:53:21 -05:00
Cole Robinson c879325741 spec: Fix mingw build
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-11-01 17:06:43 -04:00
Cole Robinson edf6aa6cd7 libvirt-9.9.0-1
Update to version 9.9.0
2023-11-01 10:17:27 -04:00
Cole Robinson 163b87484b libvirt-9.8.0-1
Update to version 9.8.0
2023-10-05 20:59:33 -04:00
Daniel P. Berrangé 5828ec5da6 Update to 9.7.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-09-01 12:27:57 +01:00
Cole Robinson adaeee1c2c libvirt-9.6.0-1
Update to version 9.6.0
2023-08-01 08:10:39 -04:00
Fedora Release Engineering 200f2942a9 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 12:28:15 +00:00
Cole Robinson cbf07f0551 libvirt-9.5.0-1
Update to version 9.5.0
2023-07-05 10:24:18 -04:00
Cole Robinson eb9ceebe38 spec: re-enable numad for fedora and eln
numad was added back to the distro

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-07-05 10:23:08 -04:00
Cole Robinson 507eb37491 libvirt-9.4.0-1
Update to version 9.4.0
2023-06-28 14:14:37 -04:00
Yaakov Selkowitz 3e211fa0f6 Disable numad also in RHEL 10+ builds
As a result of numad being retired in F39+, it is also removed from ELN,
and hence would be dropped from RHEL 10.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2023-05-25 01:23:45 -04:00
Cole Robinson d4bb64489a Bump release
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-23 12:55:49 -04:00
Cole Robinson 6d908194bf Drop numad usage, it is removed from f39
https://src.fedoraproject.org/rpms/numad/c/a6bb891e8447e3b2a4c63774da94ad0d9b4ee50a?branch=rawhide
https://pagure.io/releng/failed-composes/issue/4990#comment-857670

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-23 12:53:06 -04:00
Cole Robinson 2333a80c1a libvirt-9.3.0-1
Update to version 9.3.0
2023-05-02 09:47:09 -04:00
Cole Robinson f4fd6d7df6 libvirt-9.2.0-1
Update to version 9.2.0
2023-04-05 15:26:13 -04:00
Cole Robinson c1a3411c3b libvirt-9.1.0-1
Update to version 9.1.0
2023-03-01 12:55:47 -05:00
Fedora Release Engineering 619904f37a Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 17:46:01 +00:00
Cole Robinson 044c5b0665 libvirt-9.0.0-1
Update to version 9.0.0
2023-01-16 13:21:37 -05:00
Daniel P. Berrangé 50aba9b5a0 Trim changelogs older than 2 years
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-01-09 10:44:05 +00:00
Richard W.M. Jones c98b586e70 Rebuild for xen-4.17.0 2023-01-03 08:24:40 +00:00
Cole Robinson 987430ba8b libvirt-8.10.0-1
Update to version 8.10.0
2022-12-03 18:45:22 -05:00
Cole Robinson 58043b20fb libvirt-8.9.0-1
Update to version 8.9.0
2022-11-03 05:21:34 -04:00
Cole Robinson f1888958a6 Fix tests on aarch64
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-10-27 10:14:05 -04:00
Cole Robinson 6c3d79e65d libvirt-8.8.0-2
Rebuild for wireshark soname bump
2022-10-24 11:02:56 -04:00
Cole Robinson dc9be9b9a7 Add missing sources
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-10-04 10:27:49 -04:00
Cole Robinson 5e0d67787a libvirt-8.8.0-1
Update to version 8.8.0

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-10-04 10:22:03 -04:00
Jens Petersen 662f0e2ba4 change gettext requires to gettext-runtime for F37 (#2117209)
See https://fedoraproject.org/wiki/Changes/GettextRuntimeSubpackage
2022-09-09 17:13:27 +08:00
Cole Robinson 66060fa395 libvirt-8.7.0-1
Update to version 8.7.0
2022-09-06 10:25:54 -04:00
Daniel P. Berrangé 83def04a25 pull in mingw sub-packages
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-08-09 09:18:37 -04:00
Cole Robinson 535bbcdd91 Use upstreamed 'glibc fix' commits
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-04 15:58:25 -04:00
Cole Robinson 417e4c9cf7 Fix build with glibc 2.36
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-01 15:35:19 -04:00
Cole Robinson 24d349fa37 libvirt-8.6.0-1
Update to version 8.6.0
2022-08-01 11:03:07 -04:00
Cole Robinson 9f3b22fec4 libvirt-8.5.0-1
Update to version 8.5.0
2022-07-21 06:30:56 -04:00
Cole Robinson 7285a57f5c Adjust for Xen dropping 32bit arches
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-11 16:22:33 -04:00
Cole Robinson 9944fa190c libvirt-8.4.0-1
Update to version 8.4.0
2022-06-02 09:00:40 -04:00
Cole Robinson 1a44dca7d4 libvirt-8.3.0-1
Update to version 8.3.0
2022-05-02 12:22:09 -04:00
Cole Robinson 0c2262d602 libvirt-8.2.0-1
Update to version 8.2.0
2022-04-01 12:08:23 -04:00
Daniel P. Berrangé da598118cf Fix crash undefining VM without loader (rhbz#2060412)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-03-03 17:54:17 +00:00
Cole Robinson da34e517db libvirt-8.1.0-1
Update to version 8.1.0
2022-03-01 08:50:53 -05:00
Richard W.M. Jones 7b17ccd035 Additional fix for building with new libxslt 2022-02-22 19:20:58 +00:00
Richard W.M. Jones 908a2f2a46 Include upstream patch which fixes virt-install bug. 2022-02-22 18:56:30 +00:00
Fedora Release Engineering acf19787de - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 17:34:26 +00:00
Cole Robinson c269619b9a libvirt-8.0.0-1
Update to version 8.0.0
2022-01-14 09:47:22 -05:00
Richard W.M. Jones 3f6336f446 Bump release and rebuild for new xen 2022-01-11 15:09:05 +00:00
Daniel P. Berrangé a552a10ec8 Update to 7.10.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-12-01 11:17:47 +00:00
Daniel P. Berrangé bfb8157052 Update to 7.9.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-11-02 11:01:17 +00:00
Richard W.M. Jones edb5200d83 Bump and rebuild for fixed glusterfs on arm (RHBZ#2018182) 2021-10-28 16:52:27 +01:00
Daniel P. Berrangé fe3f90dedd Update to 7.8.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-10-01 13:15:51 +01:00
Daniel P. Berrangé 437df85540 Update to 7.7.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-09-02 16:51:33 +01:00
Daniel P. Berrangé 2d6cbe6672 Fix unit file deps and qemu-img test compat
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-31 16:18:29 +01:00
Daniel P. Berrangé 97a323d7c2 Fix repeated word in scriptlet name
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-31 12:36:11 +01:00
Daniel P. Berrangé cb839d3dfc Fix conditionals for %post scripts
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-05 10:16:12 +01:00
Daniel P. Berrangé dc6b512f3c switch to use modular daemons by default
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-04 18:01:17 +01:00
Daniel P. Berrangé ac122f4525 Update to 7.6.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-02 11:51:56 +01:00
Richard W.M. Jones 7744acbb6b Fix -Dwerror=false
Libvirt builds were failing because of:

../src/util/virconf.c: In function ‘virConfGetValueStringList’:
../src/util/virconf.c:950:13: error: Not available before 2.60 [-Werror]
  950 |         G_GNUC_FALLTHROUGH;
      |             ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

-Werror was being passed to GCC.

meson -Dwerror=false was being used which is supposed to disable
-Werror, but did not do so.

Apparently because of git being used to manage patches, libvirt thinks
it is being built from git so we need to use:

 -Dwerror=false -Dgit_werror=disabled

to really kill off -Werror.
2021-07-28 11:39:57 +01:00
Richard W.M. Jones 3807f07c15 Add fix for discard + copy-on-read affecting virt-v2v (RHBZ#1986509) 2021-07-28 10:38:30 +01:00
Fedora Release Engineering e484fdc92b - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 12:41:24 +00:00
Cole Robinson 6752fe8c9e libvirt-7.5.0-1
Update to version 7.5.0
2021-07-01 11:49:25 -04:00
Cole Robinson 15f52369ae libvirt-7.4.0-2
Rebuild for xen 4.14
2021-06-07 20:09:26 -04:00
Cole Robinson 65a0e26138 libvirt-7.4.0-1
Update to version 7.4.0
2021-06-01 09:41:31 -04:00
Daniel P. Berrangé 497e096592 Updatet to 7.3.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-04 11:54:16 +01:00
Cole Robinson 03a98aaf59 libvirt-7.2.0-1
Update to version 7.2.0
2021-04-05 12:51:44 -04:00
Richard W.M. Jones 5845f1efec Fix previous commit message, no change. 2021-03-09 13:37:30 +00:00
Richard W.M. Jones a8d01eb9d7 Bump and rebuild for libwsman_client.so.4 2021-03-09 13:26:35 +00:00
Cole Robinson 6d76ba5956 Fix 32bit compilation
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-03-01 13:16:14 -05:00
Cole Robinson a11202d9e2 libvirt-7.1.0-1
Update to version 7.1.0
2021-03-01 10:11:49 -05:00
Cole Robinson bbfa59c8da Increase meson test timeout to fix builds on s390x copr
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-02-03 14:23:33 -05:00
Laine Stump b97ad8956c Disable netcf backend for interface driver
Signed-off-by: Laine Stump <laine@redhat.com>
2021-02-02 12:47:35 -05:00
Fedora Release Engineering f9639a0012 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 18:16:33 +00:00
Daniel P. Berrangé c71e60c76c Rebase to 7.0.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 17:44:42 +00:00
Daniel P. Berrangé 9764121247 Cull 2019 vintage changelogs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-05 18:12:21 +00:00
Cole Robinson a18ed3c492 Rebuild for wireshark soname bump
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-12-04 10:25:53 -05:00
Richard W.M. Jones 9e2eeb32e3 Build libvirt-daemon-kvm for riscv64. 2020-12-04 11:38:09 +00:00
Cole Robinson 8bf91f5d22 libvirt-6.10.0-1
Update to version 6.10.0
2020-12-01 10:16:26 -05:00
Daniel P. Berrangé 91d8eff569 Re-apply reverted fix for disabling glusterfs, curl, openswman and libiscsi
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-04 09:13:29 +00:00
Cole Robinson a761ea338f libvirt-6.9.0-1
Update to version 6.9.0
2020-11-03 11:22:45 -05:00
Daniel P. Berrangé 7eef88add4 Really fix disabling glusterfs, curl, openwsman and libiscsi
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-02 12:50:07 +00:00
Daniel P. Berrangé 0c88a64234 Fix name of meson option for disabling glusterfs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-02 11:09:26 +00:00
Daniel P. Berrangé c2f3be1f4d Fix stat() mocking for new glibc
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-30 15:36:08 +00:00
Daniel P. Berrangé 18b1c9d77e Fix disablement of libssh/libssh2 & remove obsolete conditions
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-28 14:52:45 +00:00
Cole Robinson 4528832026 Fix glib errors in virsystemdtest
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-10-02 16:34:07 -04:00
Cole Robinson 037cd36ba2 libvirt-6.8.0-1
Update to version 6.8.0
2020-10-01 13:08:10 -04:00
Daniel P. Berrangé b94fb6a393 Fix QEMU start when KVM is not loaded (rhbz#1875327)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-04 14:05:21 +01:00
Cole Robinson b0c05ac2ae libvirt-6.7.0-1
Update to version 6.7.0
2020-09-01 10:36:57 -04:00
Merlin Mathesius 15c305caf3 Fix so no platforms depend upon ceph for 32-bit architectures
Include upstream patches to fix GCC 10 warnings

Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2020-08-21 11:28:09 -05:00
Daniel P. Berrangé bc1b3e59a7 Fix creation of pools on non-btrfs (rhbz#1870197)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-08-21 11:47:16 +01:00
Daniel P. Berrangé 3c4492c415 Add a reminder to re-enable LTO in next release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-08-07 17:30:14 +01:00
Cole Robinson fecc0295a2 libvirt-6.6.0-1
Update to version 6.6.0
2020-08-04 10:35:23 -04:00
Daniel P. Berrangé 325dc837c6 Disable LTO to avoid LD_PRELOAD breakage
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-08-03 15:31:10 +01:00
Fedora Release Engineering 5a45cb7f0d - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 05:51:41 +00:00
Cole Robinson 21269530e8 libvirt-6.5.0-1
Update to version 6.5.0
2020-07-03 10:01:57 -04:00
Cole Robinson fc18e983e7 libvirt-6.4.0-1
Update to version 6.4.0
2020-06-02 13:43:43 -04:00
Cole Robinson 4a7cc743a9 libvirt-6.3.0-1
Update to version 6.3.0
2020-05-05 19:33:44 -04:00
Cole Robinson 4398397311 libvirt-6.2.0-1
Update to version 6.2.0
2020-04-02 16:10:01 -04:00
Felipe Borges 401f9087bc libvirt-6.1.0-2.fc32
Check for disk type correctly in virDomainDiskTranslateSourcePool

Signed-off-by: Felipe Borges <feborges@redhat.com>
2020-03-24 11:34:46 +01:00
Cole Robinson dd3698988e libvirt-6.1.0-1.fc33
Update to version 6.1.0
2020-03-04 08:25:20 -05:00
Cole Robinson 3df49002c2 libvirt-6.0.0-3.fc33
Rebuild for libiscsi soname bump
2020-02-25 14:47:54 -05:00
Fedora Release Engineering 1bf0aedb9f - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 10:43:22 +00:00
Cole Robinson 79accd5a6e libvirt-6.0.0-1.fc32
Update to version 6.0.0
2020-01-15 11:17:10 -05:00
Adam Williamson 422d548fce Rebuild for new xen-libs 2019-12-19 09:02:02 -08:00
Daniel P. Berrangé 20ec6e955c Add abigail suppressions list
Stop abigail complaining about libvirt private symbols or any of the
loadable driver modules.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-03 18:01:54 +00:00
Cole Robinson 406a235cbc Fix test suite
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-12-03 10:22:18 -05:00
Cole Robinson 4d15e56a38 libvirt-5.10.0-1.fc32
Update to version 5.10.0
2019-12-03 09:54:02 -05:00
Cole Robinson 8693111790 libvirt-5.9.0-1.fc32
Update to version 5.9.0
2019-11-11 13:36:07 -05:00
Cole Robinson 8461a521f2 libvirt-5.8.0-1.fc32
Update to version 5.8.0
2019-10-07 16:35:23 -04:00
Cole Robinson 511e2c5124 libvirt-5.7.0-3.fc32
Fix VM startup when legacy cgroups are defined (bz #1612383)
2019-09-26 15:47:05 -04:00
Daniel P. Berrangé 749dc3d3cb Fix systemd socket activation with TLS socket 2019-09-20 10:14:22 +01:00
Cole Robinson 73c9e38f2c Remove old Makefile
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-09-17 10:54:06 -04:00
Cole Robinson afe8184d3f libvirt-5.7.0-1.fc32
Update to version 5.7.0
2019-09-03 12:35:57 -04:00
Cole Robinson 7d77bf76aa libvirt-5.6.0-1.fc31
Update to version 5.6.0
2019-08-06 13:23:41 -04:00
Fedora Release Engineering 7f0f1b831e - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 14:40:37 +00:00
Cole Robinson d964be0097 libvirt-5.5.0-1.fc31
Rebased to version 5.5.0
2019-07-03 11:25:28 -04:00
Cole Robinson a2479f539e libvirt-5.4.0-2.fc31
CVE-2019-10161: arbitrary file read/exec via virDomainSaveImageGetXMLDesc API (bz #1722463, bz #1720115)
CVE-2019-10166: virDomainManagedSaveDefineXML API exposed to readonly clients (bz #1722462, bz #1720114)
CVE-2019-10167: arbitrary command execution via virConnectGetDomainCapabilities API (bz #1722464, bz #1720117)
CVE-2019-10168: arbitrary command execution via virConnectBaselineHypervisorCPU and virConnectCompareHypervisorCPU APIs (bz #1722466, bz #1720118)
2019-06-20 12:30:57 -04:00
Daniel P. Berrangé c2c89ec6a3 Update to 5.4.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-12 11:29:13 +02:00
Daniel P. Berrangé d61e2404ba Fix systemd socket permissions (CVE-2019-10132)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-05-21 16:58:15 +01:00
Daniel P. Berrangé a2be167dfe Define md-clear CPUID bit
CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-05-14 19:17:13 +01:00
Daniel P. Berrangé 15ca09e1da Update to 5.3.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-05-07 14:50:34 +01:00
Cole Robinson 2cc07e6366 libvirt-5.2.0-2.fc31
Rebuild for xen 4.12 soname bump
2019-04-08 10:24:27 -04:00
Daniel P. Berrangé 4dd4fe78a4 Remove patch chunk touching Makefile.am
We don't need to run make dist from a build and the filename is broken
and would require re-running autotools anyway.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-03 13:59:48 +01:00
Daniel P. Berrangé 0bc22fb6f7 Remove patching on mock-noinline.pl which is missing in dist
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-03 11:47:23 +01:00
Daniel P. Berrangé 76097a6961 Add fix for mocking tests on 32-bit
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-03 11:35:55 +01:00
Daniel P. Berrangé 98cbf39fd3 Update to 5.2.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-03 11:06:44 +01:00
Daniel P. Berrangé d670e246d0 Fix rbd upgrade compat & deprecations and networking
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-20 17:42:59 +00:00
Igor Gnatenko 50e7b9a91d Remove obsolete scriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-03-06 09:47:43 +01:00
Daniel P. Berrangé 5cbc0451ce Update to 5.1.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-04 10:57:08 +00:00
Igor Gnatenko b420054636 Rebuild for readline 8.0 2019-02-17 09:30:51 +01:00
Fedora Release Engineering 143fedee46 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 08:30:03 +00:00
Daniel P. Berrangé 88887cac0f Update to 5.0.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-21 12:19:06 +00:00
Daniel P. Berrangé 579afc99f2 Disable RBD on 32-bit arches
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-12-10 18:33:58 +00:00
Daniel P. Berrangé 7f5808b9d0 Update to 4.10.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-12-03 13:55:36 +00:00
Daniel P. Berrangé 4df5f77071 Update to 4.9.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-11-12 14:53:44 +00:00
Daniel P. Berrangé 1bdd527daf Update to 4.8.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-10-05 14:25:26 +01:00
Daniel P. Berrangé e5fa1c00d2 Update to 4.7.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-09-04 10:43:47 +01:00
David Abdurachmanov 18f7b8c79c Add support for RISC-V (riscv64) 2018-08-19 19:41:56 +01:00
Daniel P. Berrangé 782468f8e9 Update to 4.6.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-08-06 14:07:24 +01:00
Fedora Release Engineering 202e7d9569 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 09:01:16 +00:00
Daniel P. Berrangé 0676a07265 Fix regressions in chardev handling
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-06 11:30:44 +01:00
Daniel P. Berrangé f57ce74947 Update to 4.5.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-03 11:00:57 +01:00
Daniel P. Berrangé 851cfde15b Fix typo in date
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-06-05 12:49:52 +01:00
Daniel P. Berrangé 06123137eb Update to 4.4.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-06-05 12:30:16 +01:00
Igor Gnatenko 6ccf3cb58c Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-05-07 09:38:07 +02:00
Igor Gnatenko 030ddaa4ef Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-05-07 09:38:07 +02:00
Daniel P. Berrangé a8886736c4 Set wireshark plugin dir dynamically
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-05-03 12:26:11 +01:00
Daniel P. Berrangé 4fd635e537 Update to 4.3.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-05-03 10:55:46 +01:00
Daniel P. Berrangé 6210c457fc Update to 4.2.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-03 13:42:58 +01:00
Iryna Shcherbina 82926cfdf0 Update Python 2 dependency declarations to new packaging standards 2018-03-23 23:29:56 +01:00
Daniel P. Berrangé e7a3ca6f6b Fix systemd macro argument with line continuations (rhbz#1558648)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-21 09:38:28 +00:00
Daniel P. Berrangé 1ae6f647b7 Upload 4.1.0 sources
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 13:36:35 +00:00
Daniel P. Berrangé 48941c011f Rebase to version 4.1.0
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 13:31:54 +00:00
Igor Gnatenko a3c4cc6f3d Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 09:28:07 +01:00
Igor Gnatenko 90fbcbd48f Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-13 23:44:12 +01:00
Fedora Release Engineering 6efd96d995 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 23:38:57 +00:00
Daniel P. Berrange 21316e7a45 Avoid undefined symbols from new linker flags
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-23 13:01:06 +00:00
Daniel P. Berrange 8adbb7a402 Cull changelog before 2017
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-19 17:34:53 +00:00
Daniel P. Berrange 3f19d41908 Fix rpc package name
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-19 16:37:43 +00:00
Daniel P. Berrange 34da93e0c9 Fix typos
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-19 16:30:19 +00:00
Daniel P. Berrange 208f506190 Add rpcgen + tirpc-devel dependancies
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-19 16:28:25 +00:00
Daniel P. Berrange 0ca715cad9 Update to version 4.0.0
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-19 16:14:30 +00:00
Cole Robinson 0f5d8c1c22 Rebuild for xen 4.10 2017-12-20 07:05:15 -05:00
Daniel P. Berrange a56bcbd063 Update to 3.10.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-12-05 11:11:01 +00:00
Daniel P. Berrange 89c3fa751c Update to 3.9.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-11-03 11:14:48 +00:00
Daniel P. Berrange 051644ffcb Update to 3.8.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-10-04 14:46:26 +01:00
Daniel P. Berrange 2a9c282548 Update to 3.7.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-09-04 11:33:13 +01:00
Daniel P. Berrange 2ae80af461 Disable qemumonitorjsontest temporarily
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-04 10:30:58 +01:00
Daniel P. Berrange 7335ede0e1 Rebase to 3.6.0
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-02 10:47:35 +01:00
Florian Weimer 6c92ba3805 Rebuild with fixed binutils for ppc64le (#1475636) 2017-07-30 19:09:40 +02:00
Daniel P. Berrange 446f680673 Disabled RBD on i386, arm, ppc64 (rhbz #1474743)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-25 11:11:19 +01:00
Daniel P. Berrange 3f56aa2870 Rebuild for changed rbd soname
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-25 09:14:27 +01:00
Cole Robinson 3cec91694f Remove unused patch 2017-07-17 09:01:37 -04:00
Cole Robinson cb0cfa566f Rebuild for xen 4.9 2017-07-17 09:00:52 -04:00
Petr Písař a27acebf66 perl dependency renamed to perl-interpreter <https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules> 2017-07-12 15:20:34 +02:00
Daniel P. Berrange 99d3a0ca1a Update to 3.5.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-06 15:32:03 +01:00
Daniel P. Berrange 9c962ebc4f Add patch to fix gnulib build
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-06-05 11:13:10 +01:00
Daniel P. Berrange 99cbbf6606 Fix clash between gnulib and glibc system headers
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-06-05 11:11:32 +01:00
Daniel P. Berrange b73e509648 Update to 3.4.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-06-02 12:08:34 +01:00
Daniel P. Berrange b23ff9c0f7 Update to 3.3.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-05-08 10:45:19 +01:00
Cole Robinson 20f9ed9c4c Remove unused patch 2017-05-04 20:10:10 -04:00
Daniel P. Berrange 04cb28c315 Update to 3.2.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-04-03 14:30:13 +01:00
Daniel P. Berrange a74ea318d1 Update to 3.1.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-03-03 16:48:12 +00:00
Fedora Release Engineering 98ed6b4e36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 19:39:29 +00:00
Daniel P. Berrange 2c49d1fd11 Update to 3.0.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-01-19 10:16:16 +00:00
Igor Gnatenko 6e7bca6631 Rebuild for readline 7.x
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-01-12 17:30:33 +01:00
Daniel P. Berrange 2fe145bb02 Rebuild to pick up new libxen* soname
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-08 18:31:20 +00:00
Daniel P. Berrange 10b7d235e3 Temp hack for gnutls 3.5.6 regression
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-05 12:06:04 +00:00
Daniel P. Berrange 232e2e7de2 Add workaround for wireshark-devel brokeness yet again
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-05 11:21:03 +00:00
Daniel P. Berrange fb1e4b061e Kill changeog entries prior to 2015
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-05 10:07:41 +00:00
Daniel P. Berrange 0b1a013081 Update to 2.5.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-05 10:06:54 +00:00
Daniel P. Berrange a972457f43 Update to 2.4.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-11-02 09:20:09 +00:00
Daniel P. Berrange 67cfa34a05 Update to 2.3.0 release 2016-10-06 11:42:08 +01:00
Daniel P. Berrange fc2ebb7646 Update to 2.2.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-09-05 12:42:42 +01:00
Daniel P. Berrange e92b461b4f Upload 2.1.0 tar
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-08-02 15:12:35 +01:00
Daniel P. Berrange b1ac7b5791 Rebase to 2.1.0
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-08-02 15:11:55 +01:00
Richard W.M. Jones 88424efe85 Rebuild to attempt to fix 'nothing provides libxenctrl.so.4.6()(64bit) needed
by libvirt-daemon-2.0.0-1.fc25.x86_64'
2016-07-23 16:35:53 +01:00
Daniel P. Berrange 4e2aab98a2 Add deps on systemd-container 2016-07-13 17:50:00 +01:00
Daniel P. Berrange f4bc1a2fe2 Disable wireshark 2016-07-01 11:21:55 +01:00
Daniel P. Berrange a4bf2768b8 Update to 2.0.0 release 2016-07-01 10:43:53 +01:00
Richard W.M. Jones 47cd44e9da Rebuild against new glibc
(see https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/VUOTESHSWFRCYPXIVG6BSMAUITS7QCK2/).
2016-06-13 14:29:22 +01:00
Daniel P. Berrange 731c6b90ff Add patch to avoid building against libsystemd-daemon.so
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-06-07 09:48:24 +01:00
Daniel P. Berrange 47ca46905d Rebase to 1.3.5
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-06-06 11:46:44 +01:00
Cole Robinson 860ffc5b13 Fix libxl video config via virt-install (bz #1334557)
Advertise fedora edk2 firmware builds to apps (bz #1335395)
2016-05-20 16:37:26 -04:00
Cole Robinson 611b2ee520 Rebased to version 1.3.4 2016-05-02 20:22:05 -04:00
Richard W.M. Jones edcb926f9d Fix 200ms performance problem when waiting for monitor socket of new domains. 2016-04-19 11:53:54 +01: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
Daniel P. Berrange f19e302ba9 Update to 0.9.10 2012-02-13 16:10:28 +00:00
Daniel P. Berrange e9c1d3f4b0 Update to 0.9.10-rc2 release 2012-02-08 11:34:10 +00:00
Daniel P. Berrange 0f577d932b Fix LXC I/O handling 2012-01-12 21:07:02 +00:00
Daniel P. Berrange 21a02c2e90 Fix LXC I/O handling 2012-01-12 21:04:43 +00:00
Daniel Veillard 4e460d5f09 Upstream release of 0.9.9 2012-01-07 21:53:09 +08:00
Peter Robinson f9de2f6bc6 update util-linux-ng -> util-linux 2011-12-29 16:21:18 +00:00
Daniel P. Berrange 2daa1b7814 Add BR on gettext-devel when autotools is enabled 2011-12-08 14:39:53 +00:00
Daniel P. Berrange f99eeb8567 Fix install of libvirt-guests.service and libvirtd.service 2011-12-08 13:50:55 +00:00
Daniel Veillard 7069f75cb8 update to libvirt-0.9.8
cleanup of old patches, of spec too
2011-12-08 17:03:16 +08:00
Justin M. Forbes 2cac7dac46 Remove versioning on yajl buildreq 2011-11-14 17:54:13 -06:00
Daniel P. Berrange 913c3c6554 Rebuild for yajl 2.0.1 release 2011-11-10 16:24:26 +00:00
Daniel P. Berrange a5a4c0c89b Another attempt to disable shunloadtest 2011-11-08 20:18:01 +00:00
Daniel P. Berrange 8c8aca2fab Update to 0.9.7 release 2011-11-08 19:52:05 +00:00
Dan Horák daf8e124ca xenlight available only on Xen arches (#745020) 2011-10-11 10:29:54 +02:00
Laine Stump 38c4b724fe release 0.9.6-2
* Make PCI multifunction support more manual - Bug 742836
* Builds on F15 should still use cgconfig - Bug 738725
2011-10-03 00:27:06 -04:00
Daniel Veillard 4d00487275 Upstream release of 0.9.6
Fix the qemu reboot bug from 0.9.5 and a few others bug fixes
2011-09-22 16:33:16 +08:00
Daniel Veillard a6831c26c1 Upstream release of libvirt-0.9.5 2011-09-20 14:51:18 +08:00
Daniel Veillard c363c7ebdb Upstream release of 0.9.4 2011-08-03 13:19:23 +08:00
20 changed files with 4440 additions and 2312 deletions
+31
View File
@@ -0,0 +1,31 @@
[suppress_function]
symbol_version_regexp = LIBVIRT_PRIVATE.*
soname_regexp = libvirt\\.so.*
[suppress_function]
symbol_version_regexp = LIBVIRT_ADMIN_PRIVATE.*
soname_regexp = libvirt-admin\\.so.*
[suppress_variable]
symbol_version_regexp = LIBVIRT_PRIVATE.*
soname_regexp = libvirt\\.so.*
[suppress_variable]
symbol_version_regexp = LIBVIRT_ADMIN_PRIVATE.*
soname_regexp = libvirt-admin\\.so.*
[suppress_function]
symbol_version_regexp = .*
soname_regexp = libvirt_storage_.*\\.so.*
[suppress_variable]
symbol_version_regexp = .*
soname_regexp = libvirt_storage_.*\\.so.*
[suppress_function]
symbol_version_regexp = .*
soname_regexp = libvirt_driver_.*\\.so.*
[suppress_variable]
symbol_version_regexp = .*
soname_regexp = libvirt_driver_.*\\.so.*
+1 -4
View File
@@ -2,7 +2,4 @@
*.rpm
i686
x86_64
libvirt-*.tar.gz
/libvirt-0.8.4.tar.gz
/libvirt-0.8.5.tar.gz
/libvirt-0.8.7.tar.gz
libvirt-*.tar.xz
@@ -0,0 +1,29 @@
From: Martin Kletzander <mkletzan@redhat.com>
Date: Fri, 16 Aug 2024 13:56:51 +0200
Subject: [PATCH] virarptable: Properly calculate rtattr length
Content-type: text/plain
Use convenience macro which does almost the same thing we were doing,
but also pads out the payload length to a multiple of NLMSG_ALIGNTO (4)
bytes.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
---
src/util/virarptable.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/util/virarptable.c b/src/util/virarptable.c
index 299dddd664..d8e41c5a86 100644
--- a/src/util/virarptable.c
+++ b/src/util/virarptable.c
@@ -102,8 +102,7 @@ virArpTableGet(void)
return table;
VIR_WARNINGS_NO_CAST_ALIGN
- parse_rtattr(tb, NDA_MAX, NDA_RTA(r),
- nh->nlmsg_len - NLMSG_LENGTH(sizeof(*r)));
+ parse_rtattr(tb, NDA_MAX, NDA_RTA(r), NLMSG_PAYLOAD(nh, sizeof(*r)));
VIR_WARNINGS_RESET
if (tb[NDA_DST] == NULL || tb[NDA_LLADDR] == NULL)
@@ -0,0 +1,34 @@
From: Martin Kletzander <mkletzan@redhat.com>
Date: Fri, 16 Aug 2024 13:59:15 +0200
Subject: [PATCH] virarptable: Fix check for message length
Content-type: text/plain
The previous check was all wrong since it calculated the how long would
the netlink message be if the netlink header was the payload and then
subtracted that from the whole message length, a variable that was not
used later in the code. This check can fail if there are no additional
payloads, struct rtattr in particular, which we are parsing later,
however the RTA_OK macro would've caught that anyway.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
---
src/util/virarptable.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/util/virarptable.c b/src/util/virarptable.c
index d8e41c5a86..45ee76766f 100644
--- a/src/util/virarptable.c
+++ b/src/util/virarptable.c
@@ -81,10 +81,9 @@ virArpTableGet(void)
for (; NLMSG_OK(nh, msglen); nh = NLMSG_NEXT(nh, msglen)) {
VIR_WARNINGS_RESET
struct ndmsg *r = NLMSG_DATA(nh);
- int len = nh->nlmsg_len;
void *addr;
- if ((len -= NLMSG_LENGTH(sizeof(*nh))) < 0) {
+ if (nh->nlmsg_len < NLMSG_SPACE(sizeof(*r))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("wrong nlmsg len"));
goto cleanup;
@@ -0,0 +1,46 @@
From: Martin Kletzander <mkletzan@redhat.com>
Date: Fri, 16 Aug 2024 14:02:48 +0200
Subject: [PATCH] virarptable: End parsing earlier in case of NLMSG_DONE
Content-type: text/plain
Check for the last multipart message right as the first thing. The
presumption probably was that the last message might still contain a
payload we want to parse. However that cannot be true since that would
have to be a type RTM_NEWNEIGH. This was not caught because older
kernels were note sending NLMSG_DONE and probably relied on the fact
that the parsing just stops after all the messages are walked through,
which the NLMSG_OK macro successfully did.
Resolves: https://issues.redhat.com/browse/RHEL-52449
Resolves: https://bugzilla.redhat.com/2302245
Fixes: a176d67cdfaf5b8237a7e3a80d8be0e6bdf2d8fd
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
---
src/util/virarptable.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/virarptable.c b/src/util/virarptable.c
index 45ee76766f..20d11f97b0 100644
--- a/src/util/virarptable.c
+++ b/src/util/virarptable.c
@@ -83,6 +83,9 @@ virArpTableGet(void)
struct ndmsg *r = NLMSG_DATA(nh);
void *addr;
+ if (nh->nlmsg_type == NLMSG_DONE)
+ break;
+
if (nh->nlmsg_len < NLMSG_SPACE(sizeof(*r))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("wrong nlmsg len"));
@@ -97,9 +100,6 @@ virArpTableGet(void)
(!(r->ndm_state == NUD_STALE || r->ndm_state == NUD_REACHABLE)))
continue;
- if (nh->nlmsg_type == NLMSG_DONE)
- return table;
-
VIR_WARNINGS_NO_CAST_ALIGN
parse_rtattr(tb, NDA_MAX, NDA_RTA(r), NLMSG_PAYLOAD(nh, sizeof(*r)));
VIR_WARNINGS_RESET
@@ -0,0 +1,315 @@
From 807e2670f2704c41f0a1dca81a5d2f2f9336137c Mon Sep 17 00:00:00 2001
From: Laine Stump <laine@redhat.com>
Date: Mon, 25 Nov 2024 22:24:44 -0500
Subject: [PATCH 4/9] util: use a single flags arg for virNetDevBandwidthSet(),
not multiple bools
Having two bools in the arg list is on the borderline of being
confusing to anyone trying to read the code, but we're about to add a
3rd. This patch replaces the two bools with a single flags argument
which will instead have one or more bits from virNetDevBandwidthFlags
set.
Signed-off-by: Laine Stump <laine@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
src/lxc/lxc_driver.c | 8 ++++++--
src/lxc/lxc_process.c | 8 ++++++--
src/network/bridge_driver.c | 10 ++++++++--
src/qemu/qemu_command.c | 11 ++++++++---
src/qemu/qemu_driver.c | 29 ++++++++++++++-------------
src/qemu/qemu_hotplug.c | 22 +++++++++++++++------
src/util/virnetdevbandwidth.c | 36 ++++++++++++++++++++--------------
src/util/virnetdevbandwidth.h | 9 +++++++--
tests/virnetdevbandwidthtest.c | 8 +++++++-
9 files changed, 94 insertions(+), 47 deletions(-)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 534e257f30..b693980dbb 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -3570,8 +3570,12 @@ lxcDomainAttachDeviceNetLive(virLXCDriver *driver,
actualBandwidth = virDomainNetGetActualBandwidth(net);
if (actualBandwidth) {
if (virNetDevSupportsBandwidth(actualType)) {
- if (virNetDevBandwidthSet(net->ifname, actualBandwidth, false,
- !virDomainNetTypeSharesHostView(net)) < 0)
+ unsigned int flags = 0;
+
+ if (!virDomainNetTypeSharesHostView(net))
+ flags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
+
+ if (virNetDevBandwidthSet(net->ifname, actualBandwidth, flags) < 0)
goto cleanup;
} else {
VIR_WARN("setting bandwidth on interfaces of "
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index f5eb5383ec..0e689fbb70 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -605,8 +605,12 @@ virLXCProcessSetupInterfaces(virLXCDriver *driver,
actualBandwidth = virDomainNetGetActualBandwidth(net);
if (actualBandwidth) {
if (virNetDevSupportsBandwidth(type)) {
- if (virNetDevBandwidthSet(net->ifname, actualBandwidth, false,
- !virDomainNetTypeSharesHostView(net)) < 0)
+ unsigned int flags = 0;
+
+ if (!virDomainNetTypeSharesHostView(net))
+ flags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
+
+ if (virNetDevBandwidthSet(net->ifname, actualBandwidth, flags) < 0)
goto cleanup;
} else {
VIR_WARN("setting bandwidth on interfaces of "
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 32572c755f..1c53636450 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -2058,8 +2058,11 @@ networkStartNetworkVirtual(virNetworkDriverState *driver,
}
}
- if (virNetDevBandwidthSet(def->bridge, def->bandwidth, true, true) < 0)
+ if (virNetDevBandwidthSet(def->bridge, def->bandwidth,
+ VIR_NETDEV_BANDWIDTH_SET_HIERARCHICAL_CLASS
+ | VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED) < 0) {
goto error;
+ }
return 0;
@@ -2141,8 +2144,11 @@ networkStartNetworkBridge(virNetworkObj *obj)
* type BRIDGE, is started. On failure, undo anything you've done,
* and return -1. On success return 0.
*/
- if (virNetDevBandwidthSet(def->bridge, def->bandwidth, true, true) < 0)
+ if (virNetDevBandwidthSet(def->bridge, def->bandwidth,
+ VIR_NETDEV_BANDWIDTH_SET_HIERARCHICAL_CLASS
+ | VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED) < 0) {
goto error;
+ }
if (networkStartHandleMACTableManagerMode(obj) < 0)
goto error;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f15e6bda1e..b4815e5e71 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -8840,9 +8840,14 @@ qemuBuildInterfaceCommandLine(virQEMUDriver *driver,
def->uuid,
!virDomainNetTypeSharesHostView(net)) < 0)
goto cleanup;
- } else if (virNetDevBandwidthSet(net->ifname, actualBandwidth, false,
- !virDomainNetTypeSharesHostView(net)) < 0) {
- goto cleanup;
+ } else {
+ unsigned int flags = 0;
+
+ if (!virDomainNetTypeSharesHostView(net))
+ flags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
+
+ if (virNetDevBandwidthSet(net->ifname, actualBandwidth, flags) < 0)
+ goto cleanup;
}
} else {
VIR_WARN("setting bandwidth on interfaces of "
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 736602333e..14929616e5 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9941,21 +9941,22 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
virErrorRestore(&orig_err);
goto endjob;
}
- } else if (virNetDevBandwidthSet(net->ifname, newBandwidth, false,
- !virDomainNetTypeSharesHostView(net)) < 0) {
- virErrorPtr orig_err;
-
- virErrorPreserveLast(&orig_err);
- ignore_value(virNetDevBandwidthSet(net->ifname,
- net->bandwidth,
- false,
- !virDomainNetTypeSharesHostView(net)));
- if (net->bandwidth) {
- ignore_value(virDomainNetBandwidthUpdate(net,
- net->bandwidth));
+ } else {
+ unsigned int bwflags = 0;
+
+ if (!virDomainNetTypeSharesHostView(net))
+ bwflags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
+
+ if (virNetDevBandwidthSet(net->ifname, newBandwidth, bwflags) < 0) {
+ virErrorPtr orig_err;
+
+ virErrorPreserveLast(&orig_err);
+ ignore_value(virNetDevBandwidthSet(net->ifname, net->bandwidth, bwflags));
+ if (net->bandwidth)
+ ignore_value(virDomainNetBandwidthUpdate(net, net->bandwidth));
+ virErrorRestore(&orig_err);
+ goto endjob;
}
- virErrorRestore(&orig_err);
- goto endjob;
}
/* If the old bandwidth was cleared out, restore qdisc. */
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 7cb1800504..d5e7e99359 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1279,9 +1279,14 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
vm->def->uuid,
!virDomainNetTypeSharesHostView(net)) < 0)
goto cleanup;
- } else if (virNetDevBandwidthSet(net->ifname, actualBandwidth, false,
- !virDomainNetTypeSharesHostView(net)) < 0) {
- goto cleanup;
+ } else {
+ int flags = 0;
+
+ if (!virDomainNetTypeSharesHostView(net))
+ flags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
+
+ if (virNetDevBandwidthSet(net->ifname, actualBandwidth, flags) < 0)
+ goto cleanup;
}
} else {
VIR_WARN("setting bandwidth on interfaces of "
@@ -4082,9 +4087,14 @@ qemuDomainChangeNet(virQEMUDriver *driver,
vm->def->uuid,
!virDomainNetTypeSharesHostView(newdev)) < 0)
goto cleanup;
- } else if (virNetDevBandwidthSet(newdev->ifname, newb, false,
- !virDomainNetTypeSharesHostView(newdev)) < 0) {
- goto cleanup;
+ } else {
+ int flags = 0;
+
+ if (!virDomainNetTypeSharesHostView(newdev))
+ flags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
+
+ if (virNetDevBandwidthSet(newdev->ifname, newb, flags) < 0)
+ goto cleanup;
}
} else {
if (virDomainInterfaceClearQoS(vm->def, olddev) < 0)
diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c
index 2b58c58d3e..1baad849c6 100644
--- a/src/util/virnetdevbandwidth.c
+++ b/src/util/virnetdevbandwidth.c
@@ -173,30 +173,35 @@ virNetDevBandwidthManipulateFilter(const char *ifname,
* virNetDevBandwidthSet:
* @ifname: on which interface
* @bandwidth: rates to set (may be NULL)
- * @hierarchical_class: whether to create hierarchical class
- * @swapped: true if IN/OUT should be set contrariwise
+ * @flags: bits indicating certain optional actions
*
+
* This function enables QoS on specified interface
* and set given traffic limits for both, incoming
- * and outgoing traffic. Any previous setting get
- * overwritten. If @hierarchical_class is TRUE, create
- * hierarchical class. It is used to guarantee minimal
- * throughput ('floor' attribute in NIC).
+ * and outgoing traffic.
+ *
+ * @flags bits and their meanings:
+ *
+ * VIR_NETDEV_BANDWIDTH_SET_HIERARCHICAL_CLASS
+ * whether to create a hierarchical class
+ * A hiearchical class structure is used to implement a minimal
+ * throughput guarantee ('floor' attribute in NIC).
*
- * If @swapped is set, the IN part of @bandwidth is set on
- * @ifname's TX, and vice versa. If it is not set, IN is set on
- * RX and OUT on TX. This is because for some types of interfaces
- * domain and the host live on the same side of the interface (so
- * domain's RX/TX is host's RX/TX), and for some it's swapped
- * (domain's RX/TX is hosts's TX/RX).
+ * VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED
+ * set if IN/OUT should be set backwards from what's indicated in
+ * the bandwidth, i.e. the IN part of @bandwidth is set on
+ * @ifname's TX, and the OUT part of @bandwidth is set on
+ * @ifname's RX. This is needed because for some types of
+ * interfaces the domain and the host live on the same side of the
+ * interface (so domain's RX/TX is host's RX/TX), and for some
+ * it's swapped (domain's RX/TX is hosts's TX/RX).
*
* Return 0 on success, -1 otherwise.
*/
int
virNetDevBandwidthSet(const char *ifname,
const virNetDevBandwidth *bandwidth,
- bool hierarchical_class,
- bool swapped)
+ unsigned int flags)
{
int ret = -1;
virNetDevBandwidthRate *rx = NULL; /* From domain POV */
@@ -205,6 +210,7 @@ virNetDevBandwidthSet(const char *ifname,
char *average = NULL;
char *peak = NULL;
char *burst = NULL;
+ bool hierarchical_class = flags & VIR_NETDEV_BANDWIDTH_SET_HIERARCHICAL_CLASS;
if (!bandwidth) {
/* nothing to be enabled */
@@ -224,7 +230,7 @@ virNetDevBandwidthSet(const char *ifname,
return -1;
}
- if (swapped) {
+ if (flags & VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED) {
rx = bandwidth->out;
tx = bandwidth->in;
} else {
diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h
index 6d268fb119..80dc654486 100644
--- a/src/util/virnetdevbandwidth.h
+++ b/src/util/virnetdevbandwidth.h
@@ -39,11 +39,16 @@ void virNetDevBandwidthFree(virNetDevBandwidth *def);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevBandwidth, virNetDevBandwidthFree);
+typedef enum {
+ VIR_NETDEV_BANDWIDTH_SET_HIERARCHICAL_CLASS = (1 << 0),
+ VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED = (1 << 1),
+} virNetDevBandwidthSetFlags;
+
int virNetDevBandwidthSet(const char *ifname,
const virNetDevBandwidth *bandwidth,
- bool hierarchical_class,
- bool swapped)
+ unsigned int flags)
G_GNUC_WARN_UNUSED_RESULT;
+
int virNetDevBandwidthClear(const char *ifname);
int virNetDevBandwidthCopy(virNetDevBandwidth **dest,
const virNetDevBandwidth *src)
diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c
index f7c38faa2e..6529ff4026 100644
--- a/tests/virnetdevbandwidthtest.c
+++ b/tests/virnetdevbandwidthtest.c
@@ -82,8 +82,14 @@ testVirNetDevBandwidthSet(const void *data)
if (virNetDevOpenvswitchInterfaceSetQos(iface, band, info->uuid, true) < 0)
return -1;
} else {
+ unsigned int flags = VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
+
+ if (info->hierarchical_class)
+ flags |= VIR_NETDEV_BANDWIDTH_SET_HIERARCHICAL_CLASS;
+
exp_cmd = info->exp_cmd_tc;
- if (virNetDevBandwidthSet(iface, band, info->hierarchical_class, true) < 0)
+
+ if (virNetDevBandwidthSet(iface, band, flags) < 0)
return -1;
}
--
2.47.1
@@ -0,0 +1,185 @@
From 490f58382dca2a415a5f16b6133f298d853bb379 Mon Sep 17 00:00:00 2001
From: Laine Stump <laine@redhat.com>
Date: Mon, 25 Nov 2024 22:24:45 -0500
Subject: [PATCH 5/9] util: make it optional to clear existing tc
qdiscs/filters in virNetDevBandwidthSet()
virNetDevBandwidthSet() always clears all existing qdiscs and their
subordinate filters before adding all the new qdiscs/filters. This is
normally exactly what we want, but there is one case (the network
driver) where the Qdisc added by virNetDevBandwidthSet() may already
be in use by the nftables backend (which will add a rule to fix the
checksum of dhcp packets); in that case, we *don't* want
virNetDevBandwidthSet() to clear out the qdisc that was already added
for nftables, and none of the bandwidth filters have been added yet,
so there already aren't any "old" filters that need to be removed
either - it is safe to just skip virNetDevBandwidthClear() in this
case.
To allow the network driver to set bandwidth without first clearing
it, this patch adds the flag VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL to the
virNetDevBandwidthSetFlags enum, and recognizes it in
virNetDevBandwidthSet() - if the flag is set, then
virNetDevBandwidth() will call virNetDevBandwidthClear() just as it
always has. But if the flag isn't set it *won't* call
virNetDevBandwidthClear().
As suggested above, VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL is set for all
calls to virNetdevBandwidthSet() except for two places in the network
driver.
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
src/lxc/lxc_driver.c | 2 +-
src/lxc/lxc_process.c | 2 +-
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_hotplug.c | 4 ++--
src/util/virnetdevbandwidth.c | 21 ++++++++++++++++++++-
src/util/virnetdevbandwidth.h | 1 +
tests/virnetdevbandwidthtest.c | 3 ++-
8 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index b693980dbb..81581c74df 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -3570,7 +3570,7 @@ lxcDomainAttachDeviceNetLive(virLXCDriver *driver,
actualBandwidth = virDomainNetGetActualBandwidth(net);
if (actualBandwidth) {
if (virNetDevSupportsBandwidth(actualType)) {
- unsigned int flags = 0;
+ unsigned int flags = VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL;
if (!virDomainNetTypeSharesHostView(net))
flags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 0e689fbb70..081ce03a57 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -605,7 +605,7 @@ virLXCProcessSetupInterfaces(virLXCDriver *driver,
actualBandwidth = virDomainNetGetActualBandwidth(net);
if (actualBandwidth) {
if (virNetDevSupportsBandwidth(type)) {
- unsigned int flags = 0;
+ unsigned int flags = VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL;
if (!virDomainNetTypeSharesHostView(net))
flags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b4815e5e71..ed54fd4c5b 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -8841,7 +8841,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriver *driver,
!virDomainNetTypeSharesHostView(net)) < 0)
goto cleanup;
} else {
- unsigned int flags = 0;
+ unsigned int flags = VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL;
if (!virDomainNetTypeSharesHostView(net))
flags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 14929616e5..9549065b1f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9942,7 +9942,7 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
goto endjob;
}
} else {
- unsigned int bwflags = 0;
+ unsigned int bwflags = VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL;
if (!virDomainNetTypeSharesHostView(net))
bwflags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index d5e7e99359..ceda4119cd 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1280,7 +1280,7 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
!virDomainNetTypeSharesHostView(net)) < 0)
goto cleanup;
} else {
- int flags = 0;
+ int flags = VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL;
if (!virDomainNetTypeSharesHostView(net))
flags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
@@ -4088,7 +4088,7 @@ qemuDomainChangeNet(virQEMUDriver *driver,
!virDomainNetTypeSharesHostView(newdev)) < 0)
goto cleanup;
} else {
- int flags = 0;
+ int flags = VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL;
if (!virDomainNetTypeSharesHostView(newdev))
flags |= VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c
index 1baad849c6..9c48844c5d 100644
--- a/src/util/virnetdevbandwidth.c
+++ b/src/util/virnetdevbandwidth.c
@@ -196,6 +196,21 @@ virNetDevBandwidthManipulateFilter(const char *ifname,
* interface (so domain's RX/TX is host's RX/TX), and for some
* it's swapped (domain's RX/TX is hosts's TX/RX).
*
+ * VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL
+ * If VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL is set, then the root
+ * qdisc is deleted before adding any new qdisc/class/filter,
+ * which causes any pre-existing filters to also be deleted. If
+ * not set, then it's assumed that there are no existing rules (or
+ * that those already there need to be kept). The caller should
+ * set this flag for an existing interface that is having its
+ * bandwidth settings modified, but can leave it unset if the
+ * interface was newly created and this is the first time
+ * bandwidth has been set, but someone else might have already
+ * added the qdisc (e.g. this is the case when the network driver
+ * is setting bandwidth for a virtual network bridge device - the
+ * nftables backend may have already added qdisc handle 1:0 and a
+ * filter, and we don't want to delete them)
+ *
* Return 0 on success, -1 otherwise.
*/
int
@@ -238,7 +253,11 @@ virNetDevBandwidthSet(const char *ifname,
tx = bandwidth->out;
}
- virNetDevBandwidthClear(ifname);
+ /* Only if the caller requests, clear everything including root
+ * qdisc and all filters before adding everything.
+ */
+ if (flags & VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL)
+ virNetDevBandwidthClear(ifname);
if (tx && tx->average) {
average = g_strdup_printf("%llukbps", tx->average);
diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h
index 80dc654486..744aa4c826 100644
--- a/src/util/virnetdevbandwidth.h
+++ b/src/util/virnetdevbandwidth.h
@@ -42,6 +42,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevBandwidth, virNetDevBandwidthFree);
typedef enum {
VIR_NETDEV_BANDWIDTH_SET_HIERARCHICAL_CLASS = (1 << 0),
VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED = (1 << 1),
+ VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL = (1 << 2),
} virNetDevBandwidthSetFlags;
int virNetDevBandwidthSet(const char *ifname,
diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c
index 6529ff4026..6d5c847ad7 100644
--- a/tests/virnetdevbandwidthtest.c
+++ b/tests/virnetdevbandwidthtest.c
@@ -82,7 +82,8 @@ testVirNetDevBandwidthSet(const void *data)
if (virNetDevOpenvswitchInterfaceSetQos(iface, band, info->uuid, true) < 0)
return -1;
} else {
- unsigned int flags = VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED;
+ unsigned int flags = VIR_NETDEV_BANDWIDTH_SET_DIR_SWAPPED |
+ VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL;
if (info->hierarchical_class)
flags |= VIR_NETDEV_BANDWIDTH_SET_HIERARCHICAL_CLASS;
--
2.47.1
@@ -0,0 +1,98 @@
From faebbbbfa3b1bd4120852b3f416c8073ab82d5c5 Mon Sep 17 00:00:00 2001
From: Laine Stump <laine@redhat.com>
Date: Mon, 25 Nov 2024 22:24:46 -0500
Subject: [PATCH 6/9] util: put the command that adds a tx filter qdisc into a
separate function
virNetDevBandwidthSet() adds a queue discipline (qdisc) for each
interface that it will need to add tc transmit filters to, and the
filters are then attached to the qdisc.
There are other circumstances where some other function will need to
add tc transmit filters to an interface (in particular an upcoming
patch to the network driver nftables backend that will use a tc tx
filter to fix the checksum of dhcp packets), so that function will
also need a qdisc for the tx filter. To assure both always use exactly
the same qdisc, this patch puts the command that adds the tx filter
qdisc into a separate helper function that can (and will) be called
from either place
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
src/libvirt_private.syms | 1 +
src/util/virnetdevbandwidth.c | 30 +++++++++++++++++++++++++-----
src/util/virnetdevbandwidth.h | 3 +++
3 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index d15d6a6a9d..0211cee967 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2859,6 +2859,7 @@ virNetDevVFInterfaceStats;
# util/virnetdevbandwidth.h
+virNetDevBandWidthAddTxFilterParentQdisc;
virNetDevBandwidthClear;
virNetDevBandwidthCopy;
virNetDevBandwidthEqual;
diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c
index 9c48844c5d..90eebe6576 100644
--- a/src/util/virnetdevbandwidth.c
+++ b/src/util/virnetdevbandwidth.c
@@ -266,11 +266,7 @@ virNetDevBandwidthSet(const char *ifname,
if (tx->burst)
burst = g_strdup_printf("%llukb", tx->burst);
- cmd = virCommandNew(TC);
- virCommandAddArgList(cmd, "qdisc", "add", "dev", ifname, "root",
- "handle", "1:", "htb", "default",
- hierarchical_class ? "2" : "1", NULL);
- if (virCommandRun(cmd, NULL) < 0)
+ if (virNetDevBandWidthAddTxFilterParentQdisc(ifname, hierarchical_class) < 0)
goto cleanup;
/* If we are creating a hierarchical class, all non guaranteed traffic
@@ -794,3 +790,27 @@ virNetDevBandwidthSetRootQDisc(const char *ifname,
return 0;
}
+
+/**
+ * virNetDevBandwidthAddTxFilterParentQdisc:
+ * @ifname: name of interface that needs a qdisc to attach tx filters to
+ * @hierarchical_class: true if hierarchical classes will be used on this interface
+ *
+ * Add a root Qdisc (Queueing Discipline) for attaching Tx filters to
+ * @ifname.
+ *
+ * returns 0 on success, -1 on failure
+ */
+int
+virNetDevBandWidthAddTxFilterParentQdisc(const char *ifname,
+ bool hierarchical_class)
+{
+ g_autoptr(virCommand) cmd = NULL;
+
+ cmd = virCommandNew(TC);
+ virCommandAddArgList(cmd, "qdisc", "add", "dev", ifname, "root",
+ "handle", "1:", "htb", "default",
+ hierarchical_class ? "2" : "1", NULL);
+
+ return virCommandRun(cmd, NULL);
+}
diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h
index 744aa4c826..65c1500637 100644
--- a/src/util/virnetdevbandwidth.h
+++ b/src/util/virnetdevbandwidth.h
@@ -84,3 +84,6 @@ int virNetDevBandwidthUpdateFilter(const char *ifname,
int virNetDevBandwidthSetRootQDisc(const char *ifname,
const char *qdisc)
G_NO_INLINE;
+
+int virNetDevBandWidthAddTxFilterParentQdisc(const char *ifname,
+ bool hierarchical_class);
--
2.47.1
@@ -0,0 +1,107 @@
From 73c0fb19ce5b816ee81ede691252855c75391c9a Mon Sep 17 00:00:00 2001
From: Laine Stump <laine@redhat.com>
Date: Mon, 25 Nov 2024 22:24:47 -0500
Subject: [PATCH 7/9] util: don't re-add the qdisc used for tx filters if it
already exists
There will soon be two separate users of tc on virtual networks, and
both will use the "qdisc root handle 1: htb" to add tx filters. One or the
other could get the first chance to add the qdisc, and then if at a
later time the other decides to use it, we need to prevent the 2nd
user from attempting to re-add the qdisc (because that just generates
an error).
We do this by running "tc qdisc show dev $bridge handle 1:" then
checking if the output of that command contains both "qdisc" and " 1:
".[*] If it does then the qdisc has already been added. If not then we
need to add it now.
[*]As of this writing, the output more exactly starts with "qdisc
htb 1: root", but our comparison is made purposefully generous to
increase the chances that it will continue to work properly if tc
modifies the format of its output.
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
src/util/virnetdevbandwidth.c | 35 ++++++++++++++++++++++++++++------
tests/virnetdevbandwidthtest.c | 3 +++
2 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c
index 90eebe6576..5c6a65528c 100644
--- a/src/util/virnetdevbandwidth.c
+++ b/src/util/virnetdevbandwidth.c
@@ -805,12 +805,35 @@ int
virNetDevBandWidthAddTxFilterParentQdisc(const char *ifname,
bool hierarchical_class)
{
- g_autoptr(virCommand) cmd = NULL;
+ g_autoptr(virCommand) testCmd = NULL;
+ g_autofree char *testResult = NULL;
- cmd = virCommandNew(TC);
- virCommandAddArgList(cmd, "qdisc", "add", "dev", ifname, "root",
- "handle", "1:", "htb", "default",
- hierarchical_class ? "2" : "1", NULL);
+ /* first check it the qdisc with handle 1: was already added for
+ * this interface by someone else
+ */
+ testCmd = virCommandNew(TC);
+ virCommandAddArgList(testCmd, "qdisc", "show", "dev", ifname,
+ "handle", "1:", NULL);
+ virCommandSetOutputBuffer(testCmd, &testResult);
- return virCommandRun(cmd, NULL);
+ if (virCommandRun(testCmd, NULL) < 0)
+ return -1;
+
+ /* output will be something like: "qdisc htb 1: root refcnt ..."
+ * if the qdisc was already added. We just search for "qdisc" and
+ * " 1: " anywhere in the output to allow for tc changing its
+ * output format.
+ */
+ if (!(testResult && strstr(testResult, "qdisc") && strstr(testResult, " 1: "))) {
+ /* didn't find qdisc in output, so we need to add one */
+ g_autoptr(virCommand) addCmd = virCommandNew(TC);
+
+ virCommandAddArgList(addCmd, "qdisc", "add", "dev", ifname, "root",
+ "handle", "1:", "htb", "default",
+ hierarchical_class ? "2" : "1", NULL);
+
+ return virCommandRun(addCmd, NULL);
+ }
+
+ return 0;
}
diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c
index 6d5c847ad7..31aa7f469d 100644
--- a/tests/virnetdevbandwidthtest.c
+++ b/tests/virnetdevbandwidthtest.c
@@ -147,6 +147,7 @@ mymain(void)
"</bandwidth>",
TC " qdisc del dev eth0 root\n"
TC " qdisc del dev eth0 ingress\n"
+ TC " qdisc show dev eth0 handle 1:\n"
TC " qdisc add dev eth0 root handle 1: htb default 1\n"
TC " class add dev eth0 parent 1: classid 1:1 htb rate 1024kbps quantum 87\n"
TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10\n"
@@ -177,6 +178,7 @@ mymain(void)
"</bandwidth>",
TC " qdisc del dev eth0 root\n"
TC " qdisc del dev eth0 ingress\n"
+ TC " qdisc show dev eth0 handle 1:\n"
TC " qdisc add dev eth0 root handle 1: htb default 1\n"
TC " class add dev eth0 parent 1: classid 1:1 htb rate 1kbps ceil 2kbps burst 4kb quantum 1\n"
TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10\n"
@@ -199,6 +201,7 @@ mymain(void)
"</bandwidth>",
TC " qdisc del dev eth0 root\n"
TC " qdisc del dev eth0 ingress\n"
+ TC " qdisc show dev eth0 handle 1:\n"
TC " qdisc add dev eth0 root handle 1: htb default 1\n"
TC " class add dev eth0 parent 1: classid 1:1 htb rate 4294967295kbps quantum 366503875\n"
TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10\n"
--
2.47.1
@@ -0,0 +1,171 @@
From dac9cb9030ac03d18f59884864a0a253e3c9f8f1 Mon Sep 17 00:00:00 2001
From: Laine Stump <laine@redhat.com>
Date: Mon, 25 Nov 2024 22:24:48 -0500
Subject: [PATCH 8/9] util: add new "tc" layer for virFirewallCmd objects
If the layer of a virFirewallCmd is "tc", then the "tc" utility will
be executed using the arguments that had been added to the
virFirewallCmd
tc layer doesn't support auto-rollback command creation (any rollback
needs to be added manually with virFirewallAddRollbackCmd()), and also
tc layer isn't supported by the iptables backend (it would have been
straightforward to add, but the iptables backend doesn't need it, and
I didn't want to take the chance of causing a regression in that
code for no good reason).
Signed-off-by: Laine Stump <laine@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
src/network/network_nftables.c | 1 +
src/util/virfirewall.c | 66 +++++++++++++++++++++-------------
src/util/virfirewall.h | 1 +
src/util/virfirewalld.c | 1 +
4 files changed, 44 insertions(+), 25 deletions(-)
diff --git a/src/network/network_nftables.c b/src/network/network_nftables.c
index 268d1f12ca..cc184105c3 100644
--- a/src/network/network_nftables.c
+++ b/src/network/network_nftables.c
@@ -73,6 +73,7 @@ VIR_ENUM_IMPL(nftablesLayer,
"",
"ip",
"ip6",
+ "",
);
diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c
index 811b787ecc..9389bcf541 100644
--- a/src/util/virfirewall.c
+++ b/src/util/virfirewall.c
@@ -47,6 +47,7 @@ VIR_ENUM_IMPL(virFirewallLayer,
"ethernet",
"ipv4",
"ipv6",
+ "tc",
);
typedef struct _virFirewallGroup virFirewallGroup;
@@ -57,6 +58,7 @@ VIR_ENUM_IMPL(virFirewallLayerCommand,
EBTABLES,
IPTABLES,
IP6TABLES,
+ TC,
);
struct _virFirewallCmd {
@@ -591,6 +593,7 @@ virFirewallCmdIptablesApply(virFirewall *firewall,
case VIR_FIREWALL_LAYER_IPV6:
virCommandAddArg(cmd, "-w");
break;
+ case VIR_FIREWALL_LAYER_TC:
case VIR_FIREWALL_LAYER_LAST:
break;
}
@@ -672,39 +675,52 @@ virFirewallCmdNftablesApply(virFirewall *firewall G_GNUC_UNUSED,
size_t i;
int status;
- cmd = virCommandNew(NFT);
+ if (fwCmd->layer == VIR_FIREWALL_LAYER_TC) {
- if ((virFirewallTransactionGetFlags(firewall) & VIR_FIREWALL_TRANSACTION_AUTO_ROLLBACK) &&
- fwCmd->argsLen > 1) {
- /* skip any leading options to get to command verb */
- for (i = 0; i < fwCmd->argsLen - 1; i++) {
- if (fwCmd->args[i][0] != '-')
- break;
- }
+ /* for VIR_FIREWALL_LAYER_TC, we run the 'tc' (traffic control) command with
+ * the supplied args.
+ */
+ cmd = virCommandNew(TC);
- if (i + 1 < fwCmd->argsLen &&
- VIR_NFTABLES_ARG_IS_CREATE(fwCmd->args[i])) {
+ /* NB: RAW commands don't support auto-rollback command creation */
- cmdIdx = i;
- objectType = fwCmd->args[i + 1];
+ } else {
- /* we currently only handle auto-rollback for rules,
- * chains, and tables, and those all can be "rolled
- * back" by a delete command using the handle that is
- * returned when "-ae" is added to the add/insert
- * command.
- */
- if (STREQ_NULLABLE(objectType, "rule") ||
- STREQ_NULLABLE(objectType, "chain") ||
- STREQ_NULLABLE(objectType, "table")) {
+ cmd = virCommandNew(NFT);
- needRollback = true;
- /* this option to nft instructs it to add the
- * "handle" of the created object to stdout
+ if ((virFirewallTransactionGetFlags(firewall) & VIR_FIREWALL_TRANSACTION_AUTO_ROLLBACK) &&
+ fwCmd->argsLen > 1) {
+ /* skip any leading options to get to command verb */
+ for (i = 0; i < fwCmd->argsLen - 1; i++) {
+ if (fwCmd->args[i][0] != '-')
+ break;
+ }
+
+ if (i + 1 < fwCmd->argsLen &&
+ VIR_NFTABLES_ARG_IS_CREATE(fwCmd->args[i])) {
+
+ cmdIdx = i;
+ objectType = fwCmd->args[i + 1];
+
+ /* we currently only handle auto-rollback for rules,
+ * chains, and tables, and those all can be "rolled
+ * back" by a delete command using the handle that is
+ * returned when "-ae" is added to the add/insert
+ * command.
*/
- virCommandAddArg(cmd, "-ae");
+ if (STREQ_NULLABLE(objectType, "rule") ||
+ STREQ_NULLABLE(objectType, "chain") ||
+ STREQ_NULLABLE(objectType, "table")) {
+
+ needRollback = true;
+ /* this option to nft instructs it to add the
+ * "handle" of the created object to stdout
+ */
+ virCommandAddArg(cmd, "-ae");
+ }
}
}
+
}
for (i = 0; i < fwCmd->argsLen; i++)
diff --git a/src/util/virfirewall.h b/src/util/virfirewall.h
index bce51259d2..d42e60884b 100644
--- a/src/util/virfirewall.h
+++ b/src/util/virfirewall.h
@@ -39,6 +39,7 @@ typedef enum {
VIR_FIREWALL_LAYER_ETHERNET,
VIR_FIREWALL_LAYER_IPV4,
VIR_FIREWALL_LAYER_IPV6,
+ VIR_FIREWALL_LAYER_TC,
VIR_FIREWALL_LAYER_LAST,
} virFirewallLayer;
diff --git a/src/util/virfirewalld.c b/src/util/virfirewalld.c
index 827e201dbb..124523c420 100644
--- a/src/util/virfirewalld.c
+++ b/src/util/virfirewalld.c
@@ -43,6 +43,7 @@ VIR_LOG_INIT("util.firewalld");
VIR_ENUM_DECL(virFirewallLayerFirewallD);
VIR_ENUM_IMPL(virFirewallLayerFirewallD,
VIR_FIREWALL_LAYER_LAST,
+ "",
"eb",
"ipv4",
"ipv6",
--
2.47.1
@@ -0,0 +1,687 @@
From b1e2318a0d609fcdff04fcf88953ea87cdd02b95 Mon Sep 17 00:00:00 2001
From: Laine Stump <laine@redhat.com>
Date: Mon, 25 Nov 2024 22:24:49 -0500
Subject: [PATCH 9/9] network: add tc filter rule to nftables backend to fix
checksum of DHCP responses
Please see the commit log for commit v10.9.0-rc1-1-g42ab0148dd for the
history and explanation of the problem that this patch is fixing.
A shorter explanation is that when a guest is connected to a libvirt
virtual network using a virtio-net adapter with in-kernel "vhost-net"
packet processing enabled, it will fail to acquire an IP address from
a DHCP seever running on the host.
In commit v10.9.0-rc1-1-g42ab0148dd we tried fixing this by *zeroing
out* the checksums of these packets with an nftables rule (nftables
can't recompute the checksum, but it can set it to 0) . This
*appeared* to work initially, but it turned out that zeroing the
checksum ends up breaking dhcp packets on *non* virtio/vhost-net guest
interfaces. That attempt was reverted in commit v10.9.0-rc2.
Fortunately, there is an existing way to recompute the checksum of a
packet as it leaves an interface - the "tc" (traffic control) utility
that libvirt already uses for bandwidth management. This patch uses a
tc filter rule to match dhcp response packets on the bridge and
recompute their checksum.
The filter rule must be attached to a tc qdisc, which may also have a
filter attached for bandwidth management (in the <bandwidth> element
of the network config). Not only must we add the qdisc only once
(which was already handled by the patch two prior to this one), but
also the filter rule for checksum fixing and the filter rule for
bandwidth management must be different priorities so they don't clash;
this is solved by adding the checksum-fix filter with "priority 2",
while the bandwidth management filter remains "priority 1" (both will
always be evaluated anyway, it's just a matter of which is evaluated
first).
So far this method has worked with every different guest we could
throw at it, including several that failed with the previous method.
Fixes: b89c4991daa0ee9371f10937fab3b03c5ffdabc6
Reported-by: Rich Jones <rjones@redhat.com>
Reported-by: Andrea Bolognani <abologna@redhat.com>
Fix-Suggested-by: Eric Garver <egarver@redhat.com>
Fix-Suggested-by: Phil Sutter <psutter@redhat.com>
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
src/network/network_nftables.c | 68 +++++++++++++++++++
.../forward-dev-linux.nftables | 40 +++++++++++
.../isolated-linux.nftables | 40 +++++++++++
.../nat-default-linux.nftables | 40 +++++++++++
.../nat-ipv6-linux.nftables | 40 +++++++++++
.../nat-ipv6-masquerade-linux.nftables | 40 +++++++++++
.../nat-many-ips-linux.nftables | 40 +++++++++++
.../nat-no-dhcp-linux.nftables | 40 +++++++++++
.../nat-port-range-ipv6-linux.nftables | 40 +++++++++++
.../nat-port-range-linux.nftables | 40 +++++++++++
.../nat-tftp-linux.nftables | 40 +++++++++++
.../route-default-linux.nftables | 40 +++++++++++
12 files changed, 508 insertions(+)
diff --git a/src/network/network_nftables.c b/src/network/network_nftables.c
index cc184105c3..748edb0273 100644
--- a/src/network/network_nftables.c
+++ b/src/network/network_nftables.c
@@ -29,6 +29,7 @@
#include "internal.h"
#include "virfirewalld.h"
+#include "vircommand.h"
#include "virerror.h"
#include "virlog.h"
#include "virhash.h"
@@ -924,6 +925,67 @@ nftablesAddIPSpecificFirewallRules(virFirewall *fw,
}
+/**
+ * nftablesAddUdpChecksumFixWithTC:
+ *
+ * Add a tc filter rule to @ifname (the bridge device of this network)
+ * that will recompute the checksum of udp packets output from @iface with
+ * destination port @port.
+ *
+ * Normally the checksum should be filled by some part of the basic
+ * network stack, but there are cases (e.g. DHCP response packets sent
+ * from virtualization host to a QEMU guest when the guest NIC uses
+ * vhost-net packet processing) when the host (sender) thinks that
+ * packet checksums will be computed elsewhere (and so leaves a
+ * partially computed checksum in the packet header) while the guest
+ * (receiver) thinks that the checksum has already been fully
+ * computed; in the meantime none of the code in between has actually
+ * finished computing the checksum.
+ *
+ * An example of this is DHCP response packets from host to guest. If
+ * the checksum of each of these packets isn't properly computed, then
+ * many guests (e.g. FreeBSD) will drop them with reason BAD CHECKSUM;
+ * this tc filter rule will fix the ip and udp checksums, and the
+ * FreeBSD dhcp client will happily accept the packet.
+ *
+ * (NB: if you're wondering how the tc qdisc and filter are removed
+ * when the network is destroyed, the answer is that the kernel
+ * automatically (and properly) removes them for us, so we don't need
+ * to worry about keeping track/deleting as we do with nftables rules)
+ */
+static int
+nftablesAddUdpChecksumFixWithTC(virFirewall *fw,
+ const char *iface,
+ int port)
+{
+ g_autofree char *portstr = g_strdup_printf("%d", port);
+
+ /* this will add the qdisc (that the filter below is attached to)
+ * unless it already exists
+ */
+ if (virNetDevBandWidthAddTxFilterParentQdisc(iface, true) < 0)
+ return -1;
+
+ /* add a filter to catch all udp packets with dst "port" and
+ * recompute their checksum
+ */
+ virFirewallAddCmd(fw, VIR_FIREWALL_LAYER_TC,
+ "filter", "add", "dev", iface,
+ "prio", "2", "protocol", "ip", "parent", "1:",
+ "u32", "match", "ip", "dport", portstr, "ffff",
+ "action", "csum", "ip", "and", "udp",
+ NULL);
+
+ virFirewallAddRollbackCmd(fw, VIR_FIREWALL_LAYER_TC,
+ "filter", "del", "dev", iface,
+ "prio", "2", "protocol", "ip", "parent", "1:",
+ "u32", "match", "ip", "dport", portstr, "ffff",
+ "action", "csum", "ip", "and", "udp",
+ NULL);
+ return 0;
+}
+
+
/* nftablesAddFirewallrules:
*
* @def - the network that needs an nftables firewall added
@@ -944,6 +1006,12 @@ nftablesAddFirewallRules(virNetworkDef *def, virFirewall **fwRemoval)
virFirewallStartTransaction(fw, VIR_FIREWALL_TRANSACTION_AUTO_ROLLBACK);
+ /* add the tc filter rule needed to fixup the checksum of dhcp
+ * response packets going from host to guest.
+ */
+ if (nftablesAddUdpChecksumFixWithTC(fw, def->bridge, 68) < 0)
+ return -1;
+
nftablesAddGeneralFirewallRules(fw, def);
for (i = 0;
diff --git a/tests/networkxml2firewalldata/forward-dev-linux.nftables b/tests/networkxml2firewalldata/forward-dev-linux.nftables
index 8badb74beb..6772383b37 100644
--- a/tests/networkxml2firewalldata/forward-dev-linux.nftables
+++ b/tests/networkxml2firewalldata/forward-dev-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
diff --git a/tests/networkxml2firewalldata/isolated-linux.nftables b/tests/networkxml2firewalldata/isolated-linux.nftables
index d1b4dac178..546a18b75a 100644
--- a/tests/networkxml2firewalldata/isolated-linux.nftables
+++ b/tests/networkxml2firewalldata/isolated-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
diff --git a/tests/networkxml2firewalldata/nat-default-linux.nftables b/tests/networkxml2firewalldata/nat-default-linux.nftables
index 28508292f9..08623c1381 100644
--- a/tests/networkxml2firewalldata/nat-default-linux.nftables
+++ b/tests/networkxml2firewalldata/nat-default-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
diff --git a/tests/networkxml2firewalldata/nat-ipv6-linux.nftables b/tests/networkxml2firewalldata/nat-ipv6-linux.nftables
index d8a9ba706d..3fd6b94eef 100644
--- a/tests/networkxml2firewalldata/nat-ipv6-linux.nftables
+++ b/tests/networkxml2firewalldata/nat-ipv6-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
diff --git a/tests/networkxml2firewalldata/nat-ipv6-masquerade-linux.nftables b/tests/networkxml2firewalldata/nat-ipv6-masquerade-linux.nftables
index a7f09cda59..2811e098d1 100644
--- a/tests/networkxml2firewalldata/nat-ipv6-masquerade-linux.nftables
+++ b/tests/networkxml2firewalldata/nat-ipv6-masquerade-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
diff --git a/tests/networkxml2firewalldata/nat-many-ips-linux.nftables b/tests/networkxml2firewalldata/nat-many-ips-linux.nftables
index b826fe6134..5409d5b552 100644
--- a/tests/networkxml2firewalldata/nat-many-ips-linux.nftables
+++ b/tests/networkxml2firewalldata/nat-many-ips-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
diff --git a/tests/networkxml2firewalldata/nat-no-dhcp-linux.nftables b/tests/networkxml2firewalldata/nat-no-dhcp-linux.nftables
index d8a9ba706d..3fd6b94eef 100644
--- a/tests/networkxml2firewalldata/nat-no-dhcp-linux.nftables
+++ b/tests/networkxml2firewalldata/nat-no-dhcp-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
diff --git a/tests/networkxml2firewalldata/nat-port-range-ipv6-linux.nftables b/tests/networkxml2firewalldata/nat-port-range-ipv6-linux.nftables
index ceaed6fa40..d74417cdb3 100644
--- a/tests/networkxml2firewalldata/nat-port-range-ipv6-linux.nftables
+++ b/tests/networkxml2firewalldata/nat-port-range-ipv6-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
diff --git a/tests/networkxml2firewalldata/nat-port-range-linux.nftables b/tests/networkxml2firewalldata/nat-port-range-linux.nftables
index 1dc37a26ec..b55bb287a9 100644
--- a/tests/networkxml2firewalldata/nat-port-range-linux.nftables
+++ b/tests/networkxml2firewalldata/nat-port-range-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
diff --git a/tests/networkxml2firewalldata/nat-tftp-linux.nftables b/tests/networkxml2firewalldata/nat-tftp-linux.nftables
index 28508292f9..08623c1381 100644
--- a/tests/networkxml2firewalldata/nat-tftp-linux.nftables
+++ b/tests/networkxml2firewalldata/nat-tftp-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
diff --git a/tests/networkxml2firewalldata/route-default-linux.nftables b/tests/networkxml2firewalldata/route-default-linux.nftables
index 282c9542a5..76d6902517 100644
--- a/tests/networkxml2firewalldata/route-default-linux.nftables
+++ b/tests/networkxml2firewalldata/route-default-linux.nftables
@@ -1,3 +1,43 @@
+tc \
+qdisc \
+show \
+dev \
+virbr0 \
+handle \
+1:
+tc \
+qdisc \
+add \
+dev \
+virbr0 \
+root \
+handle \
+1: \
+htb \
+default \
+2
+tc \
+filter \
+add \
+dev \
+virbr0 \
+prio \
+2 \
+protocol \
+ip \
+parent \
+1: \
+u32 \
+match \
+ip \
+dport \
+68 \
+ffff \
+action \
+csum \
+ip \
+and \
+udp
nft \
-ae insert \
rule \
--
2.47.1
@@ -0,0 +1,51 @@
From 114c0ec656e879ab4d67919914bb24cf5993106d Mon Sep 17 00:00:00 2001
Message-ID: <114c0ec656e879ab4d67919914bb24cf5993106d.1734201785.git.crobinso@redhat.com>
From: Laine Stump <laine@redhat.com>
Date: Mon, 2 Sep 2024 16:13:08 -0400
Subject: [PATCH] network: permit <forward mode='open'/> when a network has no
IP address
Content-type: text/plain
The whole point of <forward mode='open'/> is to supress libvirt from
adding any firewall rules for a network, and someone might want to
create a network with no IP address (i.e. they don't want the guests
to have connectivity to the host via this interface) and no firewall
rules (they don't want any, or they want to add their own). So there's
no reason to fail when a network has <forward mode='open'/> and also
has no IP address.
Kind-of-Resolves: https://gitlab.com/libvirt/libvirt/-/issues/588
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
src/conf/network_conf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 5cf419acf1..320e1b089a 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -1789,7 +1789,6 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt,
case VIR_NETWORK_FORWARD_ROUTE:
case VIR_NETWORK_FORWARD_NAT:
- case VIR_NETWORK_FORWARD_OPEN:
/* It's pointless to specify L3 forwarding without specifying
* the network we're on.
*/
@@ -1806,8 +1805,10 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt,
def->name);
return NULL;
}
+ break;
- if (def->forward.type == VIR_NETWORK_FORWARD_OPEN && def->forward.nifs) {
+ case VIR_NETWORK_FORWARD_OPEN:
+ if (def->forward.nifs) {
/* an open network by definition can't place any restrictions
* on what traffic is allowed or where it goes, so specifying
* a forwarding device is nonsensical.
--
2.47.1
@@ -0,0 +1,64 @@
From d51179fa82448f4720f1645f0b7100df80508cc4 Mon Sep 17 00:00:00 2001
From: Pavel Hrdina <phrdina@redhat.com>
Date: Thu, 9 Jan 2025 16:23:44 +0100
Subject: [PATCH] qemu: snapshot: delete disk image only if parent snapshot is
external
Content-type: text/plain
When we are deleting external snapshot that is not active we only need
to delete overlay disk image of the parent snapshot. This works
correctly even if parent snapshot is external and active as it will have
another overlay created when user reverted to that snapshot.
In case the parent snapshot is internal there are no overlay disk images
created as everything is stored internally within the disk image. In
this case we would delete the actual disk image storing internal
snapshots and most likely the original disk image as well resulting in
data loss once the VM is shutoff.
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/734
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
---
src/qemu/qemu_snapshot.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index 18b2e478f6..80cd54bf33 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -3144,6 +3144,8 @@ qemuSnapshotDeleteExternalPrepareData(virDomainObj *vm,
return -1;
}
+ data->parentSnap = qemuSnapshotFindParentSnapForDisk(snap, data->snapDisk);
+
if (data->merge) {
virStorageSource *snapDiskSrc = NULL;
@@ -3185,8 +3187,6 @@ qemuSnapshotDeleteExternalPrepareData(virDomainObj *vm,
qemuSnapshotGetDisksWithBackingStore(vm, snap, data);
}
- data->parentSnap = qemuSnapshotFindParentSnapForDisk(snap, data->snapDisk);
-
if (data->parentSnap && !virDomainSnapshotIsExternal(data->parentSnap)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("deleting external snapshot that has internal snapshot as parent not supported"));
@@ -3642,10 +3642,12 @@ qemuSnapshotDiscardExternal(virDomainObj *vm,
if (!data->job)
goto error;
} else {
- if (virStorageSourceInit(data->parentDomDisk->src) < 0 ||
- virStorageSourceUnlink(data->parentDomDisk->src) < 0) {
- VIR_WARN("Failed to remove snapshot image '%s'",
- data->snapDisk->name);
+ if (data->parentSnap && virDomainSnapshotIsExternal(data->parentSnap)) {
+ if (virStorageSourceInit(data->parentDomDisk->src) < 0 ||
+ virStorageSourceUnlink(data->parentDomDisk->src) < 0) {
+ VIR_WARN("Failed to remove snapshot image '%s'",
+ data->snapDisk->name);
+ }
}
}
}
-21
View File
@@ -1,21 +0,0 @@
# Makefile for source rpm: libvirt
# $Id$
NAME := libvirt
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)
-184
View File
@@ -1,184 +0,0 @@
From a9311c363defcba7479fdabfb4862bcf851a6b7c 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)
Conflicts:
src/conf/domain_conf.c
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 d082697..db5fa9b 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2308,6 +2308,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 fe81c26..0d6edc8 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1388,6 +1388,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 9cc1644..963768e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4689,6 +4689,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) {
@@ -4726,6 +4728,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);
+ }
+
def->data.spice.keymap = virXMLPropString(node, "keymap");
if (virDomainGraphicsAuthDefParseXML(node, &def->data.spice.auth,
@@ -10311,6 +10327,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 d40fda6..f6df0ea 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -921,6 +921,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 366913b..ee192d3 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4720,6 +4720,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",
@@ -4781,6 +4782,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 -hda \
/dev/HostVG/QEMUGuest1 -usb -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 5313b3a..29f20ab 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
@@ -21,7 +21,7 @@
</disk>
<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
-196
View File
@@ -1,196 +0,0 @@
From b8c86d80df4ba6c682f05974892f5d7ab8f317a9 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 390476d..d082697 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2317,9 +2317,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 9f8d292..fe81c26 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1401,6 +1401,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 2f9da71..9cc1644 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -389,7 +389,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 f2cd8eb..d40fda6 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -797,6 +797,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 1dc6a01..d5475c5 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -405,6 +405,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
diff -rup libvirt-0.9.6.1/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml foo/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml
--- libvirt-0.9.6.1/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml 2012-06-15 17:10:09.086979189 -0400
+++ foo/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml 2012-06-15 17:21:08.788770706 -0400
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219136</memory>
- <currentMemory unit='KiB'>219136</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
-136
View File
@@ -1,136 +0,0 @@
From 57f08fb47b0938a9e8969b857380926fa6966ca8 Mon Sep 17 00:00:00 2001
From: Laine Stump <laine@laine.org>
Date: Wed, 14 Mar 2012 01:41:35 -0400
Subject: [PATCH] Emit graphics events when a SPICE client
connects/disconnects
Wire up the domain graphics event notifications for SPICE. Adapted
from a RHEL-only patch written by Dan Berrange that used custom
__com.redhat_SPICE events - equivalent events are now available in
upstream QEMU (including a SPICE_CONNECTED event, which was missing in
the __COM.redhat_SPICE version).
* src/qemu/qemu_monitor_json.c: Wire up SPICE graphics events
(cherry picked from commit 89ae6a5a30bd91cfb2365544f9dd2e6c2a36ecca)
Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
src/qemu/qemu_monitor_json.c | 56 +++++++++++++++++++++++++++++++++++++++---
1 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e38c2ed..d4a3b7b 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -57,6 +57,9 @@ static void qemuMonitorJSONHandleVNCConnect(qemuMonitorPtr mon, virJSONValuePtr
static void qemuMonitorJSONHandleVNCInitialize(qemuMonitorPtr mon, virJSONValuePtr data);
static void qemuMonitorJSONHandleVNCDisconnect(qemuMonitorPtr mon, virJSONValuePtr data);
static void qemuMonitorJSONHandleBlockJob(qemuMonitorPtr mon, virJSONValuePtr data);
+static void qemuMonitorJSONHandleSPICEConnect(qemuMonitorPtr mon, virJSONValuePtr data);
+static void qemuMonitorJSONHandleSPICEInitialize(qemuMonitorPtr mon, virJSONValuePtr data);
+static void qemuMonitorJSONHandleSPICEDisconnect(qemuMonitorPtr mon, virJSONValuePtr data);
struct {
const char *type;
@@ -73,6 +76,9 @@ struct {
{ "VNC_INITIALIZED", qemuMonitorJSONHandleVNCInitialize, },
{ "VNC_DISCONNECTED", qemuMonitorJSONHandleVNCDisconnect, },
{ "BLOCK_JOB_COMPLETED", qemuMonitorJSONHandleBlockJob, },
+ { "SPICE_CONNECTED", qemuMonitorJSONHandleSPICEConnect, },
+ { "SPICE_INITIALIZED", qemuMonitorJSONHandleSPICEInitialize, },
+ { "SPICE_DISCONNECTED", qemuMonitorJSONHandleSPICEDisconnect, },
};
@@ -617,7 +623,7 @@ VIR_ENUM_DECL(qemuMonitorGraphicsAddressFamily)
VIR_ENUM_IMPL(qemuMonitorGraphicsAddressFamily, VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 + 1,
"ipv4", "ipv6");
-static void qemuMonitorJSONHandleVNC(qemuMonitorPtr mon, virJSONValuePtr data, int phase)
+static void qemuMonitorJSONHandleGraphics(qemuMonitorPtr mon, virJSONValuePtr data, int phase)
{
const char *localNode, *localService, *localFamily;
const char *remoteNode, *remoteService, *remoteFamily;
@@ -636,14 +642,38 @@ static void qemuMonitorJSONHandleVNC(qemuMonitorPtr mon, virJSONValuePtr data, i
}
authScheme = virJSONValueObjectGetString(server, "auth");
+ if (!authScheme) {
+ VIR_WARN("missing auth scheme in graphics event");
+ return;
+ }
localFamily = virJSONValueObjectGetString(server, "family");
+ if (!localFamily) {
+ VIR_WARN("missing local address family in graphics event");
+ return;
+ }
localNode = virJSONValueObjectGetString(server, "host");
+ if (!localNode) {
+ VIR_WARN("missing local hostname in graphics event");
+ return;
+ }
localService = virJSONValueObjectGetString(server, "service");
+ if (!localService)
+ localService = ""; /* Spice has multiple ports, so this isn't provided */
remoteFamily = virJSONValueObjectGetString(client, "family");
+ if (!remoteFamily) {
+ VIR_WARN("missing remote address family in graphics event");
+ return;
+ }
remoteNode = virJSONValueObjectGetString(client, "host");
+ if (!remoteNode) {
+ VIR_WARN("missing remote hostname in graphics event");
+ return;
+ }
remoteService = virJSONValueObjectGetString(client, "service");
+ if (!remoteService)
+ remoteService = ""; /* Spice has multiple ports, so this isn't provided */
saslUsername = virJSONValueObjectGetString(client, "sasl_username");
x509dname = virJSONValueObjectGetString(client, "x509_dname");
@@ -665,19 +695,37 @@ static void qemuMonitorJSONHandleVNC(qemuMonitorPtr mon, virJSONValuePtr data, i
static void qemuMonitorJSONHandleVNCConnect(qemuMonitorPtr mon, virJSONValuePtr data)
{
- qemuMonitorJSONHandleVNC(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_CONNECT);
+ qemuMonitorJSONHandleGraphics(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_CONNECT);
}
static void qemuMonitorJSONHandleVNCInitialize(qemuMonitorPtr mon, virJSONValuePtr data)
{
- qemuMonitorJSONHandleVNC(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE);
+ qemuMonitorJSONHandleGraphics(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE);
}
static void qemuMonitorJSONHandleVNCDisconnect(qemuMonitorPtr mon, virJSONValuePtr data)
{
- qemuMonitorJSONHandleVNC(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT);
+ qemuMonitorJSONHandleGraphics(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT);
+}
+
+
+static void qemuMonitorJSONHandleSPICEConnect(qemuMonitorPtr mon, virJSONValuePtr data)
+{
+ qemuMonitorJSONHandleGraphics(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_CONNECT);
+}
+
+
+static void qemuMonitorJSONHandleSPICEInitialize(qemuMonitorPtr mon, virJSONValuePtr data)
+{
+ qemuMonitorJSONHandleGraphics(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE);
+}
+
+
+static void qemuMonitorJSONHandleSPICEDisconnect(qemuMonitorPtr mon, virJSONValuePtr data)
+{
+ qemuMonitorJSONHandleGraphics(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT);
}
static void qemuMonitorJSONHandleBlockJob(qemuMonitorPtr mon, virJSONValuePtr data)
--
1.7.7.6
@@ -1,156 +0,0 @@
From eaf056bf995558ecf6620ce031287f3aa81b66de Mon Sep 17 00:00:00 2001
From: Laine Stump <laine@laine.org>
Date: Tue, 6 Dec 2011 12:47:28 -0500
Subject: [PATCH 1/2] 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 318f523..7906bb8 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7500,7 +7500,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,
@@ -10648,8 +10666,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
@@ -11100,6 +11140,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.4
+2620 -1614
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1 +1 @@
c374a6f0426e787576d8e5d3fcc3c7a1 libvirt-0.9.6.4.tar.gz
SHA512 (libvirt-10.6.0.tar.xz) = edec79e89669d5e9a46be35e0d6334a6ed3bbf32426679549bd998bde24cba52b0378843f41a3abb5d781ad53e2a6a54619a0bad3f168c11fb41736cc6af6568