Compare commits

...

187 Commits

Author SHA1 Message Date
Cole Robinson 0aea5c88f2 libvirt-6.1.0-4
Fix libxl driver startup crash (bz #1842318)
2020-06-02 13:46:51 -04:00
Cole Robinson 1ab72850ed libvirt-6.1.0-3
Fix iptables No chain/target/match by that name (bz #1813830)
systemd: start libvirtd after firewalld/iptables services (bz #1697636)
2020-05-26 11:44:02 -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
16 changed files with 1814 additions and 3275 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 -1
View File
@@ -2,4 +2,4 @@
*.rpm
i686
x86_64
libvirt-*.tar.gz
libvirt-*.tar.xz
@@ -1,66 +0,0 @@
From d519f225d79a61451cfa62b463ea3083e9367353 Mon Sep 17 00:00:00 2001
From: Michal Privoznik <mprivozn@redhat.com>
Date: Tue, 1 Oct 2013 15:04:48 +0200
Subject: [PATCH] qemu_hotplug: Allow QoS update in qemuDomainChangeNet
The qemuDomainChangeNet() is called when 'virsh update-device' is
invoked on a NIC. Currently, we fail to update the QoS even though
we have routines for that.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 9fa10d3901a14997f724fe50ad8a33d7f0d23abe)
---
src/qemu/qemu_hotplug.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index f06930e..818c726 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1799,6 +1799,7 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
bool needFilterChange = false;
bool needLinkStateChange = false;
bool needReplaceDevDef = false;
+ bool needBandwidthSet = false;
int ret = -1;
if (!devslot || !(olddev = *devslot)) {
@@ -2062,8 +2063,6 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
virDomainNetGetActualDirectMode(olddev) != virDomainNetGetActualDirectMode(olddev) ||
!virNetDevVPortProfileEqual(virDomainNetGetActualVirtPortProfile(olddev),
virDomainNetGetActualVirtPortProfile(newdev)) ||
- !virNetDevBandwidthEqual(virDomainNetGetActualBandwidth(olddev),
- virDomainNetGetActualBandwidth(newdev)) ||
!virNetDevVlanEqual(virDomainNetGetActualVlan(olddev),
virDomainNetGetActualVlan(newdev))) {
needReconnect = true;
@@ -2072,6 +2071,10 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
if (olddev->linkstate != newdev->linkstate)
needLinkStateChange = true;
+ if (!virNetDevBandwidthEqual(virDomainNetGetActualBandwidth(olddev),
+ virDomainNetGetActualBandwidth(newdev)))
+ needBandwidthSet = true;
+
/* FINALLY - actually perform the required actions */
if (needReconnect) {
@@ -2081,6 +2084,18 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
goto cleanup;
}
+ if (needBandwidthSet) {
+ if (virNetDevBandwidthSet(newdev->ifname,
+ virDomainNetGetActualBandwidth(newdev),
+ false) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("cannot set bandwidth limits on %s"),
+ newdev->ifname);
+ goto cleanup;
+ }
+ needReplaceDevDef = true;
+ }
+
if (needBridgeChange) {
if (qemuDomainChangeNetBridge(dom->conn, vm, olddev, newdev) < 0)
goto cleanup;
@@ -0,0 +1,36 @@
From: Michal Privoznik <mprivozn@redhat.com>
Date: Mon, 9 Mar 2020 16:40:57 +0100
Subject: [PATCH] virDomainDiskTranslateSourcePool: Check for disk type
correctly
When rewriting the virDomainDiskTranslateSourcePool() function in
v6.1.0-rc1~184 a typo was introduced. Previously, we allowed
startup policy only for those volumes which translated to
VIR_STORAGE_TYPE_FILE. But starting with the referenced commit,
the value we checked for was changed to VIR_STORAGE_VOL_FILE
which comes from a different enum and has a different value too.
This is wrong, because virStorageSourceGetActualType() returns a
value from the original enum.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1811728
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
(cherry picked from commit 3918dbd84e4951b43f93fbf50ef52be00274850c)
---
src/conf/domain_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 17867eeece..fd2e8f4eb5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -31746,7 +31746,7 @@ virDomainDiskTranslateSourcePool(virDomainDiskDefPtr def)
}
if (def->startupPolicy != 0 &&
- virStorageSourceGetActualType(def->src) != VIR_STORAGE_VOL_FILE) {
+ virStorageSourceGetActualType(def->src) != VIR_STORAGE_TYPE_FILE) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("'startupPolicy' is only valid for "
"'file' type volume"));
@@ -0,0 +1,55 @@
From: Laine Stump <laine@redhat.com>
Date: Thu, 7 May 2020 22:32:59 -0400
Subject: [PATCH] network: make it safe to call networkSetupPrivateChains()
multiple times
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
networkSetupPrivateChains() is currently called only once per run of
libvirtd, so it can assume that errInitV4 and errInitV6 are empty/null
when it is called. In preparation for potentially calling this
function multiple times during one run, this patch moves the reset of
errInitV[46] to the top of the function, to assure no memory is
leaked.
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit de110f110fb917a31b9f33ad8e4b3c1d3284766a)
---
src/network/bridge_driver_linux.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_linux.c
index 7bbde5c6a9..80bd2409e1 100644
--- a/src/network/bridge_driver_linux.c
+++ b/src/network/bridge_driver_linux.c
@@ -48,6 +48,10 @@ static void networkSetupPrivateChains(void)
VIR_DEBUG("Setting up global firewall chains");
createdChains = false;
+ virFreeError(errInitV4);
+ errInitV4 = NULL;
+ virFreeError(errInitV6);
+ errInitV6 = NULL;
rc = iptablesSetupPrivateChains(VIR_FIREWALL_LAYER_IPV4);
if (rc < 0) {
@@ -56,8 +60,6 @@ static void networkSetupPrivateChains(void)
errInitV4 = virSaveLastError();
virResetLastError();
} else {
- virFreeError(errInitV4);
- errInitV4 = NULL;
if (rc) {
VIR_DEBUG("Created global IPv4 chains");
createdChains = true;
@@ -73,8 +75,6 @@ static void networkSetupPrivateChains(void)
errInitV6 = virSaveLastError();
virResetLastError();
} else {
- virFreeError(errInitV6);
- errInitV6 = NULL;
if (rc) {
VIR_DEBUG("Created global IPv6 chains");
createdChains = true;
@@ -1,57 +0,0 @@
From 658f4b3c39c9bdd490a44175742f8259dd10b84f Mon Sep 17 00:00:00 2001
From: Michal Privoznik <mprivozn@redhat.com>
Date: Wed, 2 Oct 2013 09:18:02 +0200
Subject: [PATCH] virNetDevBandwidthEqual: Make it more robust
So far the virNetDevBandwidthEqual() expected both ->in and ->out items
to be allocated for both @a and @b compared. This is not necessary true
for all our code. For instance, running 'update-device' twice over a NIC
with the very same XML results in SIGSEGV-ing in this function.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit ee02fbc8e4a24c1347761ceff2ddb2c108e9611c)
---
src/util/virnetdevbandwidth.c | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c
index 42b0a50..17f4fa3 100644
--- a/src/util/virnetdevbandwidth.c
+++ b/src/util/virnetdevbandwidth.c
@@ -335,16 +335,30 @@ virNetDevBandwidthEqual(virNetDevBandwidthPtr a,
return false;
/* in */
- if (a->in->average != b->in->average ||
- a->in->peak != b->in->peak ||
- a->in->burst != b->in->burst)
+ if (a->in) {
+ if (!b->in)
+ return false;
+
+ if (a->in->average != b->in->average ||
+ a->in->peak != b->in->peak ||
+ a->in->burst != b->in->burst)
+ return false;
+ } else if (b->in) {
return false;
+ }
/*out*/
- if (a->out->average != b->out->average ||
- a->out->peak != b->out->peak ||
- a->out->burst != b->out->burst)
+ if (a->out) {
+ if (!b->out)
+ return false;
+
+ if (a->out->average != b->out->average ||
+ a->out->peak != b->out->peak ||
+ a->out->burst != b->out->burst)
+ return false;
+ } else if (b->out) {
return false;
+ }
return true;
}
@@ -1,105 +0,0 @@
From 56c170544f7a71749ef63fef650c71787c05e8af Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Thu, 3 Oct 2013 14:06:58 +0100
Subject: [PATCH] Remove virConnectPtr arg from virNWFilterDefParse*
None of the virNWFilterDefParse* methods require a virConnectPtr
arg, so just drop it
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
src/conf/nwfilter_conf.c | 15 ++++++---------
src/conf/nwfilter_conf.h | 6 ++----
src/nwfilter/nwfilter_driver.c | 2 +-
tests/nwfilterxml2xmltest.c | 2 +-
4 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 3456b77..c009921 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -2634,8 +2634,7 @@ cleanup:
static virNWFilterDefPtr
-virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED,
- const char *xmlStr,
+virNWFilterDefParse(const char *xmlStr,
const char *filename) {
virNWFilterDefPtr def = NULL;
xmlDocPtr xml;
@@ -2650,18 +2649,16 @@ virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED,
virNWFilterDefPtr
-virNWFilterDefParseString(virConnectPtr conn,
- const char *xmlStr)
+virNWFilterDefParseString(const char *xmlStr)
{
- return virNWFilterDefParse(conn, xmlStr, NULL);
+ return virNWFilterDefParse(xmlStr, NULL);
}
virNWFilterDefPtr
-virNWFilterDefParseFile(virConnectPtr conn,
- const char *filename)
+virNWFilterDefParseFile(const char *filename)
{
- return virNWFilterDefParse(conn, NULL, filename);
+ return virNWFilterDefParse(NULL, filename);
}
@@ -3056,7 +3053,7 @@ virNWFilterObjLoad(virConnectPtr conn,
virNWFilterDefPtr def;
virNWFilterObjPtr nwfilter;
- if (!(def = virNWFilterDefParseFile(conn, path))) {
+ if (!(def = virNWFilterDefParseFile(path))) {
return NULL;
}
diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h
index 5d04cff..faa7527 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -713,10 +713,8 @@ int virNWFilterLoadAllConfigs(virConnectPtr conn,
char *virNWFilterConfigFile(const char *dir,
const char *name);
-virNWFilterDefPtr virNWFilterDefParseString(virConnectPtr conn,
- const char *xml);
-virNWFilterDefPtr virNWFilterDefParseFile(virConnectPtr conn,
- const char *filename);
+virNWFilterDefPtr virNWFilterDefParseString(const char *xml);
+virNWFilterDefPtr virNWFilterDefParseFile(const char *filename);
void virNWFilterObjLock(virNWFilterObjPtr obj);
void virNWFilterObjUnlock(virNWFilterObjPtr obj);
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index 1ed28a2..c2afdfc 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -566,7 +566,7 @@ nwfilterDefineXML(virConnectPtr conn,
nwfilterDriverLock(driver);
virNWFilterCallbackDriversLock();
- if (!(def = virNWFilterDefParseString(conn, xml)))
+ if (!(def = virNWFilterDefParseString(xml)))
goto cleanup;
if (virNWFilterDefineXMLEnsureACL(conn, def) < 0)
diff --git a/tests/nwfilterxml2xmltest.c b/tests/nwfilterxml2xmltest.c
index 84e61da..14191a6 100644
--- a/tests/nwfilterxml2xmltest.c
+++ b/tests/nwfilterxml2xmltest.c
@@ -36,7 +36,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
virResetLastError();
- if (!(dev = virNWFilterDefParseString(NULL, inXmlData))) {
+ if (!(dev = virNWFilterDefParseString(inXmlData))) {
if (expect_error) {
virResetLastError();
goto done;
@@ -0,0 +1,265 @@
From: Laine Stump <laine@redhat.com>
Date: Thu, 7 May 2020 21:54:39 -0400
Subject: [PATCH] network: force re-creation of iptables private chains on
firewalld restart
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When firewalld is stopped, it removes *all* iptables rules and chains,
including those added by libvirt. Since restarting firewalld means
stopping and then starting it, any time it is restarted, libvirt needs
to recreate all the private iptables chains it uses, along with all
the rules it adds.
We already have code in place to call networkReloadFirewallRules() any
time we're notified of a firewalld start, and
networkReloadFirewallRules() will call
networkPreReloadFirewallRules(), which calls
networkSetupPrivateChains(); unfortunately that last call is called
using virOnce(), meaning that it will only be called the first time
through networkPreReloadFirewallRules() after libvirtd starts - so of
course when firewalld is later restarted, the call to
networkSetupPrivateChains() is skipped.
The neat and tidy way to fix this would be if there was a standard way
to reset a pthread_once_t object so that the next time virOnce was
called, it would think the function hadn't been called, and call it
again. Unfortunately, there isn't any official way of doing that (we
*could* just fill it with 0 and hope for the best, but that doesn't
seem very safe.
So instead, this patch just adds a static variable called
chainInitDone, which is set to true after networkSetupPrivateChains()
is called for the first time, and then during calls to
networkPreReloadFirewallRules(), if chainInitDone is set, we call
networkSetupPrivateChains() directly instead of via virOnce().
It may seem unsafe to directly call a function that is meant to be
called only once, but I think in this case we're safe - there's
nothing in the function that is inherently "once only" - it doesn't
initialize anything that can't safely be re-initialized (as long as
two threads don't try to do it at the same time), and it only happens
when responding to a dbus message that firewalld has been started (and
I don't think it's possible for us to be processing two of those at
once), and even then only if the initial call to the function has
already been completed (so we're safe if we receive a firewalld
restart call at a time when we haven't yet called it, or even if
another thread is already in the process of executing it. The only
problematic bit I can think of is if another thread is in the process
of adding an iptable rule at the time we're executing this function,
but 1) none of those threads will be trying to add chains, and 2) if
there was a concurrency problem with other threads adding iptables
rules while firewalld was being restarted, it would still be a problem
even without this change.
This is yet another patch that fixes an occurrence of this error:
COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --insert LIBVIRT_INP --in-interface virbr0 --protocol tcp --destination-port 67 --jump ACCEPT' failed: iptables: No chain/target/match by that name.
In particular, this resolves: https://bugzilla.redhat.com/1813830
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit f5418b427e7d2f26803880309478de9103680826)
---
src/network/bridge_driver.c | 16 ++++---
src/network/bridge_driver_linux.c | 69 ++++++++++++++++++----------
src/network/bridge_driver_nop.c | 3 +-
src/network/bridge_driver_platform.h | 2 +-
4 files changed, 58 insertions(+), 32 deletions(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 369e80a889..aaf14defe4 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -273,7 +273,9 @@ static int
networkShutdownNetworkExternal(virNetworkObjPtr obj);
static void
-networkReloadFirewallRules(virNetworkDriverStatePtr driver, bool startup);
+networkReloadFirewallRules(virNetworkDriverStatePtr driver,
+ bool startup,
+ bool force);
static void
networkRefreshDaemons(virNetworkDriverStatePtr driver);
@@ -689,7 +691,7 @@ firewalld_dbus_filter_bridge(DBusConnection *connection G_GNUC_UNUSED,
if (reload) {
VIR_DEBUG("Reload in bridge_driver because of firewalld.");
- networkReloadFirewallRules(driver, false);
+ networkReloadFirewallRules(driver, false, true);
}
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -798,7 +800,7 @@ networkStateInitialize(bool privileged,
virNetworkObjListPrune(network_driver->networks,
VIR_CONNECT_LIST_NETWORKS_INACTIVE |
VIR_CONNECT_LIST_NETWORKS_TRANSIENT);
- networkReloadFirewallRules(network_driver, true);
+ networkReloadFirewallRules(network_driver, true, false);
networkRefreshDaemons(network_driver);
if (virDriverShouldAutostart(network_driver->stateDir, &autostart) < 0)
@@ -868,7 +870,7 @@ networkStateReload(void)
network_driver->networkConfigDir,
network_driver->networkAutostartDir,
network_driver->xmlopt);
- networkReloadFirewallRules(network_driver, false);
+ networkReloadFirewallRules(network_driver, false, false);
networkRefreshDaemons(network_driver);
virNetworkObjListForEach(network_driver->networks,
networkAutostartConfig,
@@ -2236,14 +2238,16 @@ networkReloadFirewallRulesHelper(virNetworkObjPtr obj,
static void
-networkReloadFirewallRules(virNetworkDriverStatePtr driver, bool startup)
+networkReloadFirewallRules(virNetworkDriverStatePtr driver,
+ bool startup,
+ bool force)
{
VIR_INFO("Reloading iptables rules");
/* Ideally we'd not even register the driver when unprivilegd
* but until we untangle the virt driver that's not viable */
if (!driver->privileged)
return;
- networkPreReloadFirewallRules(driver, startup);
+ networkPreReloadFirewallRules(driver, startup, force);
virNetworkObjListForEach(driver->networks,
networkReloadFirewallRulesHelper,
NULL);
diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_linux.c
index 80bd2409e1..b0bd207250 100644
--- a/src/network/bridge_driver_linux.c
+++ b/src/network/bridge_driver_linux.c
@@ -36,11 +36,14 @@ VIR_LOG_INIT("network.bridge_driver_linux");
#define PROC_NET_ROUTE "/proc/net/route"
static virOnceControl createdOnce;
-static bool createdChains;
+static bool chainInitDone; /* true iff networkSetupPrivateChains was ever called */
+static bool createdChains; /* true iff networkSetupPrivateChains created chains during most recent call */
static virErrorPtr errInitV4;
static virErrorPtr errInitV6;
-/* Only call via virOnce */
+/* Usually only called via virOnce, but can also be called directly in
+ * response to firewalld reload (if chainInitDone == true)
+ */
static void networkSetupPrivateChains(void)
{
int rc;
@@ -82,6 +85,8 @@ static void networkSetupPrivateChains(void)
VIR_DEBUG("Global IPv6 chains already exist");
}
}
+
+ chainInitDone = true;
}
@@ -111,7 +116,10 @@ networkHasRunningNetworks(virNetworkDriverStatePtr driver)
}
-void networkPreReloadFirewallRules(virNetworkDriverStatePtr driver, bool startup)
+void
+networkPreReloadFirewallRules(virNetworkDriverStatePtr driver,
+ bool startup,
+ bool force)
{
/*
* If there are any running networks, we need to
@@ -130,29 +138,42 @@ void networkPreReloadFirewallRules(virNetworkDriverStatePtr driver, bool startup
* of starting the network though as that makes them
* more likely to be seen by a human
*/
- if (!networkHasRunningNetworks(driver)) {
- VIR_DEBUG("Delayed global rule setup as no networks are running");
- return;
- }
+ if (chainInitDone && force) {
+ /* The Private chains have already been initialized once
+ * during this run of libvirtd, so 1) we can't do it again via
+ * virOnce(), and 2) we need to re-add the private chains even
+ * if there are currently no running networks, because the
+ * next time a network is started, libvirt will expect that
+ * the chains have already been added. So we call directly
+ * instead of via virOnce().
+ */
+ networkSetupPrivateChains();
- ignore_value(virOnce(&createdOnce, networkSetupPrivateChains));
+ } else {
+ if (!networkHasRunningNetworks(driver)) {
+ VIR_DEBUG("Delayed global rule setup as no networks are running");
+ return;
+ }
- /*
- * If this is initial startup, and we just created the
- * top level private chains we either
- *
- * - upgraded from old libvirt
- * - freshly booted from clean state
- *
- * In the first case we must delete the old rules from
- * the built-in chains, instead of our new private chains.
- * In the second case it doesn't matter, since no existing
- * rules will be present. Thus we can safely just tell it
- * to always delete from the builin chain
- */
- if (startup && createdChains) {
- VIR_DEBUG("Requesting cleanup of legacy firewall rules");
- iptablesSetDeletePrivate(false);
+ ignore_value(virOnce(&createdOnce, networkSetupPrivateChains));
+
+ /*
+ * If this is initial startup, and we just created the
+ * top level private chains we either
+ *
+ * - upgraded from old libvirt
+ * - freshly booted from clean state
+ *
+ * In the first case we must delete the old rules from
+ * the built-in chains, instead of our new private chains.
+ * In the second case it doesn't matter, since no existing
+ * rules will be present. Thus we can safely just tell it
+ * to always delete from the builin chain
+ */
+ if (startup && createdChains) {
+ VIR_DEBUG("Requesting cleanup of legacy firewall rules");
+ iptablesSetDeletePrivate(false);
+ }
}
}
diff --git a/src/network/bridge_driver_nop.c b/src/network/bridge_driver_nop.c
index 08d737511f..db89c10023 100644
--- a/src/network/bridge_driver_nop.c
+++ b/src/network/bridge_driver_nop.c
@@ -20,7 +20,8 @@
#include <config.h>
void networkPreReloadFirewallRules(virNetworkDriverStatePtr driver G_GNUC_UNUSED,
- bool startup G_GNUC_UNUSED)
+ bool startup G_GNUC_UNUSED,
+ bool force G_GNUC_UNUSED)
{
}
diff --git a/src/network/bridge_driver_platform.h b/src/network/bridge_driver_platform.h
index 169417a6c0..48ab52c160 100644
--- a/src/network/bridge_driver_platform.h
+++ b/src/network/bridge_driver_platform.h
@@ -62,7 +62,7 @@ struct _virNetworkDriverState {
typedef struct _virNetworkDriverState virNetworkDriverState;
typedef virNetworkDriverState *virNetworkDriverStatePtr;
-void networkPreReloadFirewallRules(virNetworkDriverStatePtr driver, bool startup);
+void networkPreReloadFirewallRules(virNetworkDriverStatePtr driver, bool startup, bool force);
void networkPostReloadFirewallRules(bool startup);
int networkCheckRouteCollision(virNetworkDefPtr def);
@@ -1,355 +0,0 @@
From 0a5abfb22d5d030cc3780c44b805b5b92567b44a Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Thu, 3 Oct 2013 14:06:59 +0100
Subject: [PATCH] Don't pass virConnectPtr in nwfilter 'struct
domUpdateCBStruct'
The nwfilter driver only needs a reference to its private
state object, not a full virConnectPtr. Update the domUpdateCBStruct
struct to have a 'void *opaque' field instead of a virConnectPtr.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
src/conf/nwfilter_conf.c | 14 +++++++++++---
src/conf/nwfilter_conf.h | 4 ++--
src/nwfilter/nwfilter_dhcpsnoop.c | 12 ++++++------
src/nwfilter/nwfilter_driver.c | 5 +++--
src/nwfilter/nwfilter_gentech_driver.c | 32 ++++++++++++++++----------------
src/nwfilter/nwfilter_gentech_driver.h | 10 +++++-----
src/nwfilter/nwfilter_learnipaddr.c | 6 +++---
7 files changed, 46 insertions(+), 37 deletions(-)
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index c009921..9927f7e 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -2850,6 +2850,7 @@ virNWFilterCallbackDriversUnlock(void)
static virDomainObjListIterator virNWFilterDomainFWUpdateCB;
+static void *virNWFilterDomainFWUpdateOpaque;
/**
* virNWFilterInstFiltersOnAllVMs:
@@ -2861,7 +2862,7 @@ virNWFilterInstFiltersOnAllVMs(virConnectPtr conn)
{
size_t i;
struct domUpdateCBStruct cb = {
- .conn = conn,
+ .opaque = virNWFilterDomainFWUpdateOpaque,
.step = STEP_APPLY_CURRENT,
.skipInterfaces = NULL, /* not needed */
};
@@ -2880,7 +2881,7 @@ virNWFilterTriggerVMFilterRebuild(virConnectPtr conn)
size_t i;
int ret = 0;
struct domUpdateCBStruct cb = {
- .conn = conn,
+ .opaque = virNWFilterDomainFWUpdateOpaque,
.step = STEP_APPLY_NEW,
.skipInterfaces = virHashCreate(0, NULL),
};
@@ -3474,9 +3475,14 @@ char *virNWFilterConfigFile(const char *dir,
}
-int virNWFilterConfLayerInit(virDomainObjListIterator domUpdateCB)
+int virNWFilterConfLayerInit(virDomainObjListIterator domUpdateCB,
+ void *opaque)
{
+ if (initialized)
+ return -1;
+
virNWFilterDomainFWUpdateCB = domUpdateCB;
+ virNWFilterDomainFWUpdateOpaque = opaque;
initialized = true;
@@ -3495,6 +3501,8 @@ void virNWFilterConfLayerShutdown(void)
virMutexDestroy(&updateMutex);
initialized = false;
+ virNWFilterDomainFWUpdateOpaque = NULL;
+ virNWFilterDomainFWUpdateCB = NULL;
}
diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h
index faa7527..e470615 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -586,7 +586,7 @@ enum UpdateStep {
};
struct domUpdateCBStruct {
- virConnectPtr conn;
+ void *opaque;
enum UpdateStep step;
virHashTablePtr skipInterfaces;
};
@@ -722,7 +722,7 @@ void virNWFilterObjUnlock(virNWFilterObjPtr obj);
void virNWFilterLockFilterUpdates(void);
void virNWFilterUnlockFilterUpdates(void);
-int virNWFilterConfLayerInit(virDomainObjListIterator domUpdateCB);
+int virNWFilterConfLayerInit(virDomainObjListIterator domUpdateCB, void *opaque);
void virNWFilterConfLayerShutdown(void);
int virNWFilterInstFiltersOnAllVMs(virConnectPtr conn);
diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c
index 3e9f046..2bc1686 100644
--- a/src/nwfilter/nwfilter_dhcpsnoop.c
+++ b/src/nwfilter/nwfilter_dhcpsnoop.c
@@ -481,15 +481,15 @@ virNWFilterSnoopIPLeaseInstallRule(virNWFilterSnoopIPLeasePtr ipl,
/* instantiate the filters */
if (req->ifname)
- rc = virNWFilterInstantiateFilterLate(NULL,
+ rc = virNWFilterInstantiateFilterLate(req->driver,
+ NULL,
req->ifname,
req->ifindex,
req->linkdev,
req->nettype,
&req->macaddr,
req->filtername,
- req->vars,
- req->driver);
+ req->vars);
exit_snooprequnlock:
virNWFilterSnoopReqUnlock(req);
@@ -867,15 +867,15 @@ virNWFilterSnoopReqLeaseDel(virNWFilterSnoopReqPtr req,
goto skip_instantiate;
if (ipAddrLeft) {
- ret = virNWFilterInstantiateFilterLate(NULL,
+ ret = virNWFilterInstantiateFilterLate(req->driver,
+ NULL,
req->ifname,
req->ifindex,
req->linkdev,
req->nettype,
&req->macaddr,
req->filtername,
- req->vars,
- req->driver);
+ req->vars);
} else {
const virNWFilterVarValuePtr dhcpsrvrs =
virHashLookup(req->vars->hashTable, NWFILTER_VARNAME_DHCPSERVER);
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index c2afdfc..6e20e03 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -203,7 +203,8 @@ nwfilterStateInitialize(bool privileged,
virNWFilterTechDriversInit(privileged);
- if (virNWFilterConfLayerInit(virNWFilterDomainFWUpdateCB) < 0)
+ if (virNWFilterConfLayerInit(virNWFilterDomainFWUpdateCB,
+ driverState) < 0)
goto err_techdrivers_shutdown;
/*
@@ -681,7 +682,7 @@ nwfilterInstantiateFilter(virConnectPtr conn,
const unsigned char *vmuuid,
virDomainNetDefPtr net)
{
- return virNWFilterInstantiateFilter(conn, vmuuid, net);
+ return virNWFilterInstantiateFilter(conn->nwfilterPrivateData, vmuuid, net);
}
diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c
index 382d73f..5961165 100644
--- a/src/nwfilter/nwfilter_gentech_driver.c
+++ b/src/nwfilter/nwfilter_gentech_driver.c
@@ -800,7 +800,8 @@ err_unresolvable_vars:
* Call this function while holding the NWFilter filter update lock
*/
static int
-__virNWFilterInstantiateFilter(const unsigned char *vmuuid,
+__virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
+ const unsigned char *vmuuid,
bool teardownOld,
const char *ifname,
int ifindex,
@@ -810,7 +811,6 @@ __virNWFilterInstantiateFilter(const unsigned char *vmuuid,
const char *filtername,
virNWFilterHashTablePtr filterparams,
enum instCase useNewFilter,
- virNWFilterDriverStatePtr driver,
bool forceWithPendingReq,
bool *foundNewFilter)
{
@@ -921,7 +921,7 @@ err_exit:
static int
-_virNWFilterInstantiateFilter(virConnectPtr conn,
+_virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
const unsigned char *vmuuid,
const virDomainNetDefPtr net,
bool teardownOld,
@@ -948,7 +948,8 @@ _virNWFilterInstantiateFilter(virConnectPtr conn,
goto cleanup;
}
- rc = __virNWFilterInstantiateFilter(vmuuid,
+ rc = __virNWFilterInstantiateFilter(driver,
+ vmuuid,
teardownOld,
net->ifname,
ifindex,
@@ -958,7 +959,6 @@ _virNWFilterInstantiateFilter(virConnectPtr conn,
net->filter,
net->filterparams,
useNewFilter,
- conn->nwfilterPrivateData,
false,
foundNewFilter);
@@ -970,22 +970,23 @@ cleanup:
int
-virNWFilterInstantiateFilterLate(const unsigned char *vmuuid,
+virNWFilterInstantiateFilterLate(virNWFilterDriverStatePtr driver,
+ const unsigned char *vmuuid,
const char *ifname,
int ifindex,
const char *linkdev,
enum virDomainNetType nettype,
const virMacAddrPtr macaddr,
const char *filtername,
- virNWFilterHashTablePtr filterparams,
- virNWFilterDriverStatePtr driver)
+ virNWFilterHashTablePtr filterparams)
{
int rc;
bool foundNewFilter = false;
virNWFilterLockFilterUpdates();
- rc = __virNWFilterInstantiateFilter(vmuuid,
+ rc = __virNWFilterInstantiateFilter(driver,
+ vmuuid,
true,
ifname,
ifindex,
@@ -995,7 +996,6 @@ virNWFilterInstantiateFilterLate(const unsigned char *vmuuid,
filtername,
filterparams,
INSTANTIATE_ALWAYS,
- driver,
true,
&foundNewFilter);
if (rc < 0) {
@@ -1015,13 +1015,13 @@ virNWFilterInstantiateFilterLate(const unsigned char *vmuuid,
int
-virNWFilterInstantiateFilter(virConnectPtr conn,
+virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
const unsigned char *vmuuid,
const virDomainNetDefPtr net)
{
bool foundNewFilter = false;
- return _virNWFilterInstantiateFilter(conn, vmuuid, net,
+ return _virNWFilterInstantiateFilter(driver, vmuuid, net,
1,
INSTANTIATE_ALWAYS,
&foundNewFilter);
@@ -1029,14 +1029,14 @@ virNWFilterInstantiateFilter(virConnectPtr conn,
int
-virNWFilterUpdateInstantiateFilter(virConnectPtr conn,
+virNWFilterUpdateInstantiateFilter(virNWFilterDriverStatePtr driver,
const unsigned char *vmuuid,
const virDomainNetDefPtr net,
bool *skipIface)
{
bool foundNewFilter = false;
- int rc = _virNWFilterInstantiateFilter(conn, vmuuid, net,
+ int rc = _virNWFilterInstantiateFilter(driver, vmuuid, net,
0,
INSTANTIATE_FOLLOW_NEWFILTER,
&foundNewFilter);
@@ -1154,7 +1154,7 @@ virNWFilterDomainFWUpdateCB(virDomainObjPtr obj,
if ((net->filter) && (net->ifname)) {
switch (cb->step) {
case STEP_APPLY_NEW:
- ret = virNWFilterUpdateInstantiateFilter(cb->conn,
+ ret = virNWFilterUpdateInstantiateFilter(cb->opaque,
vm->uuid,
net,
&skipIface);
@@ -1179,7 +1179,7 @@ virNWFilterDomainFWUpdateCB(virDomainObjPtr obj,
break;
case STEP_APPLY_CURRENT:
- ret = virNWFilterInstantiateFilter(cb->conn,
+ ret = virNWFilterInstantiateFilter(cb->opaque,
vm->uuid,
net);
if (ret)
diff --git a/src/nwfilter/nwfilter_gentech_driver.h b/src/nwfilter/nwfilter_gentech_driver.h
index 4b47b4a..8528e2a 100644
--- a/src/nwfilter/nwfilter_gentech_driver.h
+++ b/src/nwfilter/nwfilter_gentech_driver.h
@@ -39,23 +39,23 @@ enum instCase {
};
-int virNWFilterInstantiateFilter(virConnectPtr conn,
+int virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
const unsigned char *vmuuid,
const virDomainNetDefPtr net);
-int virNWFilterUpdateInstantiateFilter(virConnectPtr conn,
+int virNWFilterUpdateInstantiateFilter(virNWFilterDriverStatePtr driver,
const unsigned char *vmuuid,
const virDomainNetDefPtr net,
bool *skipIface);
-int virNWFilterInstantiateFilterLate(const unsigned char *vmuuid,
+int virNWFilterInstantiateFilterLate(virNWFilterDriverStatePtr driver,
+ const unsigned char *vmuuid,
const char *ifname,
int ifindex,
const char *linkdev,
enum virDomainNetType nettype,
const virMacAddrPtr macaddr,
const char *filtername,
- virNWFilterHashTablePtr filterparams,
- virNWFilterDriverStatePtr driver);
+ virNWFilterHashTablePtr filterparams);
int virNWFilterTeardownFilter(const virDomainNetDefPtr net);
diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c
index 7e67203..093158a 100644
--- a/src/nwfilter/nwfilter_learnipaddr.c
+++ b/src/nwfilter/nwfilter_learnipaddr.c
@@ -612,15 +612,15 @@ learnIPAddressThread(void *arg)
"cache for interface %s"), inetaddr, req->ifname);
}
- ret = virNWFilterInstantiateFilterLate(NULL,
+ ret = virNWFilterInstantiateFilterLate(req->driver,
+ NULL,
req->ifname,
req->ifindex,
req->linkdev,
req->nettype,
&req->macaddr,
req->filtername,
- req->filterparams,
- req->driver);
+ req->filterparams);
VIR_DEBUG("Result from applying firewall rules on "
"%s with IP addr %s : %d\n", req->ifname, inetaddr, ret);
}
@@ -0,0 +1,100 @@
From: Laine Stump <laine@redhat.com>
Date: Fri, 1 May 2020 00:05:50 -0400
Subject: [PATCH] systemd: start libvirtd after firewalld/iptables services
When a system has enabled the iptables/ip6tables services rather than
firewalld, there is no explicit ordering of the start of those
services vs. libvirtd. This creates a problem when libvirtd.service is
started before ip[6]tables, as the latter, when it finally is started,
will remove all of the iptables rules that had previously been added
by libvirt, including the custom chains where libvirt's rules are
kept. This results in an error message similar to the following when a
user subsequently tries to start a new libvirt network:
"Error while activating network: Call to virNetworkCreate failed:
internal error: Failed to apply firewall rules
/usr/sbin/ip6tables -w --table filter --insert LIBVIRT_FWO \
--in-interface virbr2 --jump REJECT:
ip6tables: No chain/target/match by that name."
(Prior to logging this error, it also would have caused failure to
forward (or block) traffic in some cases, e.g. for guests on a NATed
network, since libvirt's rules to forward/block had all been deleted
and libvirt didn't know about it, so it couldn't fix the problem)
When this happens, the problem can be remedied by simply restarting
libvirtd.service (which has the side-effect of reloading all
libvirt-generated firewall rules)
Instead, we can just explicitly stating in the libvirtd.service file
that libvirtd.service should start after ip6tables.service and
ip6tables.service, eliminating the race condition that leads to the
error.
There is also nothing (that I can see) in the systemd .service files
to guarantee that firewalld.service will be started (if enabled) prior
to libvirtd.service. The same error scenario given above would occur
if libvirtd.service started before firewalld.service. Even before
that, though libvirtd would have detected that firewalld.service was
disabled, and then turn off all firewalld support. So, for example,
firewalld's libvirt zone wouldn't be used, and most likely traffic
from guests would therefore be blocked (all with no external
indication of the source of the problem other than a debug-level log
when libvirtd was started saying that firewalld wasn't in use); also
libvirtd wouldn't notice when firewalld reloaded its rules (which also
simultaneously deletes all of libvirt's rules).
I'm not aware of any reports that have been traced back to
libvirtd.service starting before firewalld.service, but have seen that
error reported multiple times, and also don't see an existing
dependency that would guarantee firewalld.service starts before
libvirtd.service, so it's possible it's been happening and we just
haven't gotten to the bottom of it.
This patch adds an After= line to the libvirtd.service file for each
of iptables.service, ip6tables.service, and firewalld.servicee, which
should guarantee that libvirtd.service isn't started until systemd has
started whichever of the others is enabled.
This race was diagnosed, and patch proposed, by Jason Montleon in
https://bugzilla.redhat.com/1723698 . At the time (April 2019) danpb
agreed with him that this change to libvirtd.service was a reasonable
thing to do, but I guess everyone thought someone else was going to
post a patch, so in the end nobody did.
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 0756415f147dda15a417bd79eef9a62027d176e6)
---
src/network/virtnetworkd.service.in | 3 +++
src/remote/libvirtd.service.in | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/network/virtnetworkd.service.in b/src/network/virtnetworkd.service.in
index 656e8b4f84..56182e1693 100644
--- a/src/network/virtnetworkd.service.in
+++ b/src/network/virtnetworkd.service.in
@@ -5,6 +5,9 @@ Requires=virtnetworkd.socket
Requires=virtnetworkd-ro.socket
Requires=virtnetworkd-admin.socket
After=network.target
+After=firewalld.service
+After=iptables.service
+After=ip6tables.service
After=dbus.service
After=apparmor.service
After=local-fs.target
diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
index 90b2cad5b0..cc0d4e3693 100644
--- a/src/remote/libvirtd.service.in
+++ b/src/remote/libvirtd.service.in
@@ -11,6 +11,9 @@ Wants=libvirtd-admin.socket
Wants=systemd-machined.service
Before=libvirt-guests.service
After=network.target
+After=firewalld.service
+After=iptables.service
+After=ip6tables.service
After=dbus.service
After=iscsid.service
After=apparmor.service
@@ -1,382 +0,0 @@
From 1766db28533e2b5a96792aa0811e5364e0bb54d4 Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Thu, 3 Oct 2013 14:07:00 +0100
Subject: [PATCH] Remove use of virConnectPtr from all remaining nwfilter code
The virConnectPtr is passed around loads of nwfilter code in
order to provide it as a parameter to the callback registered
by the virt drivers. None of the virt drivers use this param
though, so it serves no purpose.
Avoiding the need to pass a virConnectPtr means that the
nwfilterStateReload method no longer needs to open a bogus
QEMU driver connection. This addresses a race condition that
can lead to a crash on startup.
The nwfilter driver starts before the QEMU driver and registers
some callbacks with DBus to detect firewalld reload. If the
firewalld reload happens while the QEMU driver is still starting
up though, the nwfilterStateReload method will open a connection
to the partially initialized QEMU driver and cause a crash.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
src/conf/nwfilter_conf.c | 49 ++++++++++++++++--------------------------
src/conf/nwfilter_conf.h | 14 +++++-------
src/lxc/lxc_driver.c | 3 +--
src/nwfilter/nwfilter_driver.c | 42 ++++++++++++++----------------------
src/qemu/qemu_driver.c | 3 +--
src/uml/uml_driver.c | 3 +--
6 files changed, 43 insertions(+), 71 deletions(-)
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 9927f7e..7152aae 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -2744,8 +2744,7 @@ cleanup:
static int
-_virNWFilterDefLoopDetect(virConnectPtr conn,
- virNWFilterObjListPtr nwfilters,
+_virNWFilterDefLoopDetect(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def,
const char *filtername)
{
@@ -2769,7 +2768,7 @@ _virNWFilterDefLoopDetect(virConnectPtr conn,
obj = virNWFilterObjFindByName(nwfilters,
entry->include->filterref);
if (obj) {
- rc = _virNWFilterDefLoopDetect(conn, nwfilters,
+ rc = _virNWFilterDefLoopDetect(nwfilters,
obj->def, filtername);
virNWFilterObjUnlock(obj);
@@ -2785,7 +2784,6 @@ _virNWFilterDefLoopDetect(virConnectPtr conn,
/*
* virNWFilterDefLoopDetect:
- * @conn: pointer to virConnect object
* @nwfilters : the nwfilters to search
* @def : the filter definition that may add a loop and is to be tested
*
@@ -2795,11 +2793,10 @@ _virNWFilterDefLoopDetect(virConnectPtr conn,
* Returns 0 in case no loop was detected, -1 otherwise.
*/
static int
-virNWFilterDefLoopDetect(virConnectPtr conn,
- virNWFilterObjListPtr nwfilters,
+virNWFilterDefLoopDetect(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def)
{
- return _virNWFilterDefLoopDetect(conn, nwfilters, def, def->name);
+ return _virNWFilterDefLoopDetect(nwfilters, def, def->name);
}
int nCallbackDriver;
@@ -2858,7 +2855,7 @@ static void *virNWFilterDomainFWUpdateOpaque;
* error. This should be called upon reloading of the driver.
*/
int
-virNWFilterInstFiltersOnAllVMs(virConnectPtr conn)
+virNWFilterInstFiltersOnAllVMs(void)
{
size_t i;
struct domUpdateCBStruct cb = {
@@ -2868,15 +2865,14 @@ virNWFilterInstFiltersOnAllVMs(virConnectPtr conn)
};
for (i = 0; i < nCallbackDriver; i++)
- callbackDrvArray[i]->vmFilterRebuild(conn,
- virNWFilterDomainFWUpdateCB,
+ callbackDrvArray[i]->vmFilterRebuild(virNWFilterDomainFWUpdateCB,
&cb);
return 0;
}
static int
-virNWFilterTriggerVMFilterRebuild(virConnectPtr conn)
+virNWFilterTriggerVMFilterRebuild(void)
{
size_t i;
int ret = 0;
@@ -2890,8 +2886,7 @@ virNWFilterTriggerVMFilterRebuild(virConnectPtr conn)
return -1;
for (i = 0; i < nCallbackDriver; i++) {
- if (callbackDrvArray[i]->vmFilterRebuild(conn,
- virNWFilterDomainFWUpdateCB,
+ if (callbackDrvArray[i]->vmFilterRebuild(virNWFilterDomainFWUpdateCB,
&cb) < 0)
ret = -1;
}
@@ -2900,15 +2895,13 @@ virNWFilterTriggerVMFilterRebuild(virConnectPtr conn)
cb.step = STEP_TEAR_NEW; /* rollback */
for (i = 0; i < nCallbackDriver; i++)
- callbackDrvArray[i]->vmFilterRebuild(conn,
- virNWFilterDomainFWUpdateCB,
+ callbackDrvArray[i]->vmFilterRebuild(virNWFilterDomainFWUpdateCB,
&cb);
} else {
cb.step = STEP_TEAR_OLD; /* switch over */
for (i = 0; i < nCallbackDriver; i++)
- callbackDrvArray[i]->vmFilterRebuild(conn,
- virNWFilterDomainFWUpdateCB,
+ callbackDrvArray[i]->vmFilterRebuild(virNWFilterDomainFWUpdateCB,
&cb);
}
@@ -2919,14 +2912,13 @@ virNWFilterTriggerVMFilterRebuild(virConnectPtr conn)
int
-virNWFilterTestUnassignDef(virConnectPtr conn,
- virNWFilterObjPtr nwfilter)
+virNWFilterTestUnassignDef(virNWFilterObjPtr nwfilter)
{
int rc = 0;
nwfilter->wantRemoved = 1;
/* trigger the update on VMs referencing the filter */
- if (virNWFilterTriggerVMFilterRebuild(conn))
+ if (virNWFilterTriggerVMFilterRebuild())
rc = -1;
nwfilter->wantRemoved = 0;
@@ -2965,8 +2957,7 @@ cleanup:
}
virNWFilterObjPtr
-virNWFilterObjAssignDef(virConnectPtr conn,
- virNWFilterObjListPtr nwfilters,
+virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def)
{
virNWFilterObjPtr nwfilter;
@@ -2985,7 +2976,7 @@ virNWFilterObjAssignDef(virConnectPtr conn,
virNWFilterObjUnlock(nwfilter);
}
- if (virNWFilterDefLoopDetect(conn, nwfilters, def) < 0) {
+ if (virNWFilterDefLoopDetect(nwfilters, def) < 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
"%s", _("filter would introduce a loop"));
return NULL;
@@ -3004,7 +2995,7 @@ virNWFilterObjAssignDef(virConnectPtr conn,
nwfilter->newDef = def;
/* trigger the update on VMs referencing the filter */
- if (virNWFilterTriggerVMFilterRebuild(conn)) {
+ if (virNWFilterTriggerVMFilterRebuild()) {
nwfilter->newDef = NULL;
virNWFilterUnlockFilterUpdates();
virNWFilterObjUnlock(nwfilter);
@@ -3046,8 +3037,7 @@ virNWFilterObjAssignDef(virConnectPtr conn,
static virNWFilterObjPtr
-virNWFilterObjLoad(virConnectPtr conn,
- virNWFilterObjListPtr nwfilters,
+virNWFilterObjLoad(virNWFilterObjListPtr nwfilters,
const char *file,
const char *path)
{
@@ -3066,7 +3056,7 @@ virNWFilterObjLoad(virConnectPtr conn,
return NULL;
}
- if (!(nwfilter = virNWFilterObjAssignDef(conn, nwfilters, def))) {
+ if (!(nwfilter = virNWFilterObjAssignDef(nwfilters, def))) {
virNWFilterDefFree(def);
return NULL;
}
@@ -3082,8 +3072,7 @@ virNWFilterObjLoad(virConnectPtr conn,
int
-virNWFilterLoadAllConfigs(virConnectPtr conn,
- virNWFilterObjListPtr nwfilters,
+virNWFilterLoadAllConfigs(virNWFilterObjListPtr nwfilters,
const char *configDir)
{
DIR *dir;
@@ -3111,7 +3100,7 @@ virNWFilterLoadAllConfigs(virConnectPtr conn,
if (!(path = virFileBuildPath(configDir, entry->d_name, NULL)))
continue;
- nwfilter = virNWFilterObjLoad(conn, nwfilters, entry->d_name, path);
+ nwfilter = virNWFilterObjLoad(nwfilters, entry->d_name, path);
if (nwfilter)
virNWFilterObjUnlock(nwfilter);
diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h
index e470615..29906f1 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -687,12 +687,10 @@ int virNWFilterObjSaveDef(virNWFilterDriverStatePtr driver,
int virNWFilterObjDeleteDef(virNWFilterObjPtr nwfilter);
-virNWFilterObjPtr virNWFilterObjAssignDef(virConnectPtr conn,
- virNWFilterObjListPtr nwfilters,
+virNWFilterObjPtr virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def);
-int virNWFilterTestUnassignDef(virConnectPtr conn,
- virNWFilterObjPtr nwfilter);
+int virNWFilterTestUnassignDef(virNWFilterObjPtr nwfilter);
virNWFilterDefPtr virNWFilterDefParseNode(xmlDocPtr xml,
xmlNodePtr root);
@@ -706,8 +704,7 @@ int virNWFilterSaveXML(const char *configDir,
int virNWFilterSaveConfig(const char *configDir,
virNWFilterDefPtr def);
-int virNWFilterLoadAllConfigs(virConnectPtr conn,
- virNWFilterObjListPtr nwfilters,
+int virNWFilterLoadAllConfigs(virNWFilterObjListPtr nwfilters,
const char *configDir);
char *virNWFilterConfigFile(const char *dir,
@@ -725,11 +722,10 @@ void virNWFilterUnlockFilterUpdates(void);
int virNWFilterConfLayerInit(virDomainObjListIterator domUpdateCB, void *opaque);
void virNWFilterConfLayerShutdown(void);
-int virNWFilterInstFiltersOnAllVMs(virConnectPtr conn);
+int virNWFilterInstFiltersOnAllVMs(void);
-typedef int (*virNWFilterRebuild)(virConnectPtr conn,
- virDomainObjListIterator domUpdateCB,
+typedef int (*virNWFilterRebuild)(virDomainObjListIterator domUpdateCB,
void *data);
typedef void (*virNWFilterVoidCall)(void);
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 8b13f84..e3a34d6 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -84,8 +84,7 @@ virLXCDriverPtr lxc_driver = NULL;
/* callbacks for nwfilter */
static int
-lxcVMFilterRebuild(virConnectPtr conn ATTRIBUTE_UNUSED,
- virDomainObjListIterator iter, void *data)
+lxcVMFilterRebuild(virDomainObjListIterator iter, void *data)
{
return virDomainObjListForEach(lxc_driver->domains, iter, data);
}
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index 6e20e03..d25c6f2 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -235,8 +235,7 @@ nwfilterStateInitialize(bool privileged,
VIR_FREE(base);
- if (virNWFilterLoadAllConfigs(NULL,
- &driverState->nwfilters,
+ if (virNWFilterLoadAllConfigs(&driverState->nwfilters,
driverState->configDir) < 0)
goto error;
@@ -272,37 +271,28 @@ err_free_driverstate:
* files and update its state
*/
static int
-nwfilterStateReload(void) {
- virConnectPtr conn;
-
- if (!driverState) {
+nwfilterStateReload(void)
+{
+ if (!driverState)
return -1;
- }
if (!driverState->privileged)
return 0;
- conn = virConnectOpen("qemu:///system");
-
- if (conn) {
- virNWFilterDHCPSnoopEnd(NULL);
- /* shut down all threads -- they will be restarted if necessary */
- virNWFilterLearnThreadsTerminate(true);
-
- nwfilterDriverLock(driverState);
- virNWFilterCallbackDriversLock();
+ virNWFilterDHCPSnoopEnd(NULL);
+ /* shut down all threads -- they will be restarted if necessary */
+ virNWFilterLearnThreadsTerminate(true);
- virNWFilterLoadAllConfigs(conn,
- &driverState->nwfilters,
- driverState->configDir);
+ nwfilterDriverLock(driverState);
+ virNWFilterCallbackDriversLock();
- virNWFilterCallbackDriversUnlock();
- nwfilterDriverUnlock(driverState);
+ virNWFilterLoadAllConfigs(&driverState->nwfilters,
+ driverState->configDir);
- virNWFilterInstFiltersOnAllVMs(conn);
+ virNWFilterCallbackDriversUnlock();
+ nwfilterDriverUnlock(driverState);
- virConnectClose(conn);
- }
+ virNWFilterInstFiltersOnAllVMs();
return 0;
}
@@ -573,7 +563,7 @@ nwfilterDefineXML(virConnectPtr conn,
if (virNWFilterDefineXMLEnsureACL(conn, def) < 0)
goto cleanup;
- if (!(nwfilter = virNWFilterObjAssignDef(conn, &driver->nwfilters, def)))
+ if (!(nwfilter = virNWFilterObjAssignDef(&driver->nwfilters, def)))
goto cleanup;
if (virNWFilterObjSaveDef(driver, nwfilter, def) < 0) {
@@ -617,7 +607,7 @@ nwfilterUndefine(virNWFilterPtr obj) {
if (virNWFilterUndefineEnsureACL(obj->conn, nwfilter->def) < 0)
goto cleanup;
- if (virNWFilterTestUnassignDef(obj->conn, nwfilter) < 0) {
+ if (virNWFilterTestUnassignDef(nwfilter) < 0) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s",
_("nwfilter is in use"));
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index e8bc04d..068d29f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -177,8 +177,7 @@ static void
qemuVMDriverUnlock(void) {}
static int
-qemuVMFilterRebuild(virConnectPtr conn ATTRIBUTE_UNUSED,
- virDomainObjListIterator iter, void *data)
+qemuVMFilterRebuild(virDomainObjListIterator iter, void *data)
{
return virDomainObjListForEach(qemu_driver->domains, iter, data);
}
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 9ca352f..eb02542 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -148,8 +148,7 @@ static int umlMonitorCommand(const struct uml_driver *driver,
static struct uml_driver *uml_driver = NULL;
static int
-umlVMFilterRebuild(virConnectPtr conn ATTRIBUTE_UNUSED,
- virDomainObjListIterator iter, void *data)
+umlVMFilterRebuild(virDomainObjListIterator iter, void *data)
{
return virDomainObjListForEach(uml_driver->domains, iter, data);
}
@@ -0,0 +1,43 @@
From: Jim Fehlig <jfehlig@suse.com>
Date: Fri, 3 Apr 2020 15:51:48 -0600
Subject: [PATCH] libxl: fix crash when initializing driver
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit 54a401af478 split out DriverConfigInit from DriverConfigNew, but
then called it a bit late from libxlStateInitialize. The cfg is used in
libxlDriverConfigLoadFile and when uninitialized results in a crash.
Calling DriverConfigInit immediately after DriverConfigNew fixes the
crash.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 88011ed280c4f946a7b8e7ffcea2335eb075de60)
---
src/libxl/libxl_driver.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index f2387e2a20..c4fb791fa0 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -703,14 +703,14 @@ libxlStateInitialize(bool privileged,
if (!(cfg = libxlDriverConfigNew()))
goto error;
+ if (libxlDriverConfigInit(cfg) < 0)
+ goto error;
+
driverConf = g_strdup_printf("%s/libxl.conf", cfg->configBaseDir);
if (libxlDriverConfigLoadFile(cfg, driverConf) < 0)
goto error;
- if (libxlDriverConfigInit(cfg) < 0)
- goto error;
-
/* Register the callbacks providing access to libvirt's event loop */
libxl_osevent_register_hooks(cfg->ctx, &libxl_osevent_callbacks, cfg->ctx);
@@ -1,31 +0,0 @@
From 009332c5530a3f3419578b62b44a98ff8de31ca2 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 1 Oct 2013 07:55:19 -0400
Subject: [PATCH] qemu: cgroup: Fix crash if starting nographics guest
We can dereference graphics[0] even if guest has no graphics device
configured. I screwed this up in a216e6487255d3b65d97c7ec1fa5da63dbced902
https://bugzilla.redhat.com/show_bug.cgi?id=1014088
(cherry picked from commit a924d9d083c215df6044387057c501d9aa338b96)
---
src/qemu/qemu_cgroup.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index f95c7f2..ace7e35 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -490,9 +490,10 @@ qemuSetupDevicesCgroup(virQEMUDriverPtr driver,
if (vm->def->nsounds &&
((!vm->def->ngraphics && cfg->nogfxAllowHostAudio) ||
- ((vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
+ (vm->def->graphics &&
+ ((vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
cfg->vncAllowHostAudio) ||
- (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_SDL)))) {
+ (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_SDL))))) {
rv = virCgroupAllowDeviceMajor(priv->cgroup, 'c', DEVICE_SND_MAJOR,
VIR_CGROUP_DEVICE_RW);
virDomainAuditCgroupMajor(vm, priv->cgroup, "allow", DEVICE_SND_MAJOR,
-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)
+1282 -2255
View File
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -1,2 +1 @@
1835bbfa492099bce12e2934870e5611 libvirt-1.1.2.tar.gz
b0dfe373ebe0c588b42a28c14d36a3e6 libvirt-1.1.3.tar.gz
SHA512 (libvirt-6.1.0.tar.xz) = 17a2641f300a4a05149261bae74ac856e9a2511a259146595d2e2412c4a0601d88369b0544ba86edc80e433a47cf828317d8de38c6ec86a1b3efaca75294a606