Fix unit file deps and qemu-img test compat
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
97a323d7c2
commit
2d6cbe6672
@ -0,0 +1,66 @@
|
||||
From 88c5b9f827779ae6fe5a6f08100a4b6184492a1c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Tue, 31 Aug 2021 10:59:39 +0100
|
||||
Subject: [PATCH] qemu, xen: add missing deps on virtlockd/virtlogd sockets
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The QEMU driver uses both virtlogd and virtlockd, while the Xen driver
|
||||
uses virtlockd. The libvirtd.service unit contains deps on the socket
|
||||
units for these services, but these deps were missed in the modular
|
||||
daemons. As a result the virtlockd/virtlogd sockets are not started
|
||||
when the virtqemud/virtxend daemons are started.
|
||||
|
||||
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
---
|
||||
src/libxl/virtxend.service.in | 2 ++
|
||||
src/qemu/virtqemud.service.in | 4 ++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/libxl/virtxend.service.in b/src/libxl/virtxend.service.in
|
||||
index a863917467..19b19ce3e6 100644
|
||||
--- a/src/libxl/virtxend.service.in
|
||||
+++ b/src/libxl/virtxend.service.in
|
||||
@@ -1,6 +1,7 @@
|
||||
[Unit]
|
||||
Description=Virtualization xen daemon
|
||||
Conflicts=libvirtd.service
|
||||
+Requires=virtlockd.socket
|
||||
Requires=virtxend.socket
|
||||
Requires=virtxend-ro.socket
|
||||
Requires=virtxend-admin.socket
|
||||
@@ -25,6 +26,7 @@ KillMode=process
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
+Also=virtlockd.socket
|
||||
Also=virtxend.socket
|
||||
Also=virtxend-ro.socket
|
||||
Also=virtxend-admin.socket
|
||||
diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in
|
||||
index 8abc9d3a7f..20e1b43a6e 100644
|
||||
--- a/src/qemu/virtqemud.service.in
|
||||
+++ b/src/qemu/virtqemud.service.in
|
||||
@@ -1,6 +1,8 @@
|
||||
[Unit]
|
||||
Description=Virtualization qemu daemon
|
||||
Conflicts=libvirtd.service
|
||||
+Requires=virtlogd.socket
|
||||
+Requires=virtlockd.socket
|
||||
Requires=virtqemud.socket
|
||||
Requires=virtqemud-ro.socket
|
||||
Requires=virtqemud-admin.socket
|
||||
@@ -42,6 +44,8 @@ LimitMEMLOCK=64M
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
+Also=virtlogd.socket
|
||||
+Also=virtlockd.socket
|
||||
Also=virtqemud.socket
|
||||
Also=virtqemud-ro.socket
|
||||
Also=virtqemud-admin.socket
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,78 @@
|
||||
From 979d1ba3ae1332bda80cb6eca98e41dc4462a226 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
||||
Date: Tue, 31 Aug 2021 11:41:55 +0200
|
||||
Subject: [PATCH] tests: virstoragetest: remove tests without backing type
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
As of qemu commit:
|
||||
|
||||
commit 497a30dbb065937d67f6c43af6dd78492e1d6f6d
|
||||
qemu-img: Require -F with -b backing image
|
||||
|
||||
creating images with backing images requires specifying the format.
|
||||
|
||||
Remove tests which do not pass the backing format on the command
|
||||
line.
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
---
|
||||
tests/virstoragetest.c | 33 ---------------------------------
|
||||
1 file changed, 33 deletions(-)
|
||||
|
||||
diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
|
||||
index 1b211b60e6..b80818bc7b 100644
|
||||
--- a/tests/virstoragetest.c
|
||||
+++ b/tests/virstoragetest.c
|
||||
@@ -638,30 +638,6 @@ mymain(void)
|
||||
};
|
||||
TEST_CHAIN(abswrap, VIR_STORAGE_FILE_QCOW2, (&wrap, &qcow2, &raw), EXP_PASS);
|
||||
|
||||
- /* Rewrite qcow2 and wrap file to omit backing file type */
|
||||
- virCommandFree(cmd);
|
||||
- cmd = virCommandNewArgList(qemuimg, "rebase", "-u", "-f", "qcow2",
|
||||
- "-b", absraw, "qcow2", NULL);
|
||||
- if (virCommandRun(cmd, NULL) < 0)
|
||||
- ret = -1;
|
||||
-
|
||||
- virCommandFree(cmd);
|
||||
- cmd = virCommandNewArgList(qemuimg, "rebase", "-u", "-f", "qcow2",
|
||||
- "-b", absqcow2, "wrap", NULL);
|
||||
- if (virCommandRun(cmd, NULL) < 0)
|
||||
- ret = -1;
|
||||
-
|
||||
- /* Qcow2 file with raw as absolute backing, backing format omitted */
|
||||
- testFileData wrap_as_raw = {
|
||||
- .expBackingStoreRaw = absqcow2,
|
||||
- .expCapacity = 1024,
|
||||
- .path = abswrap,
|
||||
- .type = VIR_STORAGE_TYPE_FILE,
|
||||
- .format = VIR_STORAGE_FILE_QCOW2,
|
||||
- };
|
||||
- TEST_CHAIN(abswrap, VIR_STORAGE_FILE_QCOW2,
|
||||
- (&wrap_as_raw, &qcow2_as_raw), EXP_FAIL);
|
||||
-
|
||||
/* Rewrite qcow2 to a missing backing file, with backing type */
|
||||
virCommandFree(cmd);
|
||||
cmd = virCommandNewArgList(qemuimg, "rebase", "-u", "-f", "qcow2",
|
||||
@@ -674,15 +650,6 @@ mymain(void)
|
||||
/* Qcow2 file with missing backing file but specified type */
|
||||
TEST_CHAIN(absqcow2, VIR_STORAGE_FILE_QCOW2, (&qcow2), EXP_FAIL);
|
||||
|
||||
- /* Rewrite qcow2 to a missing backing file, without backing type */
|
||||
- virCommandFree(cmd);
|
||||
- cmd = virCommandNewArgList(qemuimg, "rebase", "-u", "-f", "qcow2",
|
||||
- "-b", datadir "/bogus", "qcow2", NULL);
|
||||
- if (virCommandRun(cmd, NULL) < 0)
|
||||
- ret = -1;
|
||||
-
|
||||
- /* Qcow2 file with missing backing file and no specified type */
|
||||
- TEST_CHAIN(absqcow2, VIR_STORAGE_FILE_QCOW2, (&qcow2), EXP_FAIL);
|
||||
|
||||
/* Rewrite qcow2 to use an nbd: protocol as backend */
|
||||
virCommandFree(cmd);
|
||||
--
|
||||
2.31.1
|
||||
|
@ -214,6 +214,8 @@ URL: https://libvirt.org/
|
||||
%define mainturl stable_updates/
|
||||
%endif
|
||||
Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
|
||||
Patch1: 0001-qemu-xen-add-missing-deps-on-virtlockd-virtlogd-sock.patch
|
||||
Patch2: 0002-tests-virstoragetest-remove-tests-without-backing-ty.patch
|
||||
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
Requires: libvirt-daemon-config-network = %{version}-%{release}
|
||||
@ -2067,6 +2069,8 @@ exit 0
|
||||
%changelog
|
||||
* Tue Aug 31 2021 Daniel P. Berrangé <berrange@redhat.com> - 7.6.0-3
|
||||
- Fix repeated word in scriptlet name
|
||||
- Fix deps on virtlockd/virtlogd socket units
|
||||
- Fix test failure with newer QEMU
|
||||
|
||||
* Wed Aug 4 2021 Daniel P. Berrangé <berrange@redhat.com> - 7.6.0-2
|
||||
- Switch to use modular daemons by default
|
||||
|
Loading…
Reference in New Issue
Block a user