[libvirt] [PATCH 0/9] Slightly rework our streams
by Michal Privoznik
This is not the big patch set that enables sparse streams. Not
just yet. I'm merely sending first few patches that prepare the
environment for that. These can, however, go in independent of
sparse streams.
Michal Privoznik (9):
daemonClientStream: Use unsigned int to store stream @serial
daemon stream: Prefer bool over unsigned int var:1
daemon stream: Convert @tx in daemonClientStream to bool
daemon stream: Remove useless empty lines from header file
virNetClientCallDispatchStream: Update comment
daemonStreamHandleRead: Rework to follow our coding pattern
Revert "rpc: Fix slow volume download (virsh vol-download)"
virnetclientstream: Process stream messages later
virStream{Recv,Send}All: Increase client buffer
daemon/stream.c | 116 +++++++++++++++----------------
daemon/stream.h | 2 -
src/libvirt-stream.c | 5 +-
src/rpc/virnetclient.c | 6 +-
src/rpc/virnetclientstream.c | 158 +++++++++++++++---------------------------
src/rpc/virnetserverprogram.c | 12 ++--
src/rpc/virnetserverprogram.h | 4 +-
7 files changed, 129 insertions(+), 174 deletions(-)
--
2.7.3
8 years, 7 months
[libvirt] [RFC] live migration of VMs with internal snapshots
by Maxim Nestratov
Hi,
As far as I understand, currently there is no way to live migrate qemu
VMs that
have internal snapshots, because live migration works via qemu drive
mirroring,
which in turns mirrors only shallow block layer, effectively losing
existing embedded
snapshots. The problem could be fixed if we created an external delta
for all disks with
internal snapshots, live migrate such VMs and then auto merge them back into
original images. That said, I would like to know very much your opinion
on the matter
and would also like to know if this approach is affordable. If so, I or
one of my colleagues
will send a pathset to fix this, otherwise what solution for this
problem you will
recommend?
Thanks,
Maxim
8 years, 7 months
[libvirt] [PATCH] conf: Drop restrictions on rng backend path
by Cole Robinson
Currently we only allow /dev/random and /dev/hwrng as host input
for <rng><backend model='random'/> device. This was added after
various upstream discussions in commit 4932ef45
However this restriction has generated quite a few complaints over
the years, so a new discussion was initiated:
http://www.redhat.com/archives/libvir-list/2016-April/msg00987.html
Several people suggested removing the restriction, and nobody really
spoke up to defend it. So this patch drops the path restriction
entirely
https://bugzilla.redhat.com/show_bug.cgi?id=1074464
---
docs/formatdomain.html.in | 9 ++++-----
docs/schemas/domaincommon.rng | 3 +--
src/conf/domain_conf.c | 8 --------
tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml | 2 +-
tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-rng-random.xml | 2 +-
6 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 895114b..132b261 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -6231,8 +6231,7 @@ qemu-kvm -net nic,model=? /dev/null
<code>model</code> attribute. Supported source models are:
</p>
<ul>
- <li>'random' — /dev/random (default) or /dev/hwrng
- device as source (for now, no other sources are permitted)</li>
+ <li>'random' — a character device backend</li>
<li>'egd' — a EGD protocol backend</li>
</ul>
</dd>
@@ -6240,9 +6239,9 @@ qemu-kvm -net nic,model=? /dev/null
<dd>
<p>
This backend type expects a non-blocking character device as input.
- The only accepted paths are /dev/random and /dev/hwrng. The file
- name is specified as contents of the <code>backend</code> element.
- When no file name is specified the hypervisor default is used.
+ The file name is specified as contents of the
+ <code>backend</code> element. When no file name is specified the
+ this defaults to /dev/random.
</p>
</dd>
<dt><code>backend model='egd'</code></dt>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 3605afe..c91a3a9 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4691,8 +4691,7 @@
<value>random</value>
</attribute>
<choice>
- <value>/dev/random</value>
- <value>/dev/hwrng</value>
+ <ref name='absFilePath'/>
<empty/>
</choice>
</group>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 28248c8..f9cd69c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -11512,14 +11512,6 @@ virDomainRNGDefParseXML(xmlNodePtr node,
switch ((virDomainRNGBackend) def->backend) {
case VIR_DOMAIN_RNG_BACKEND_RANDOM:
def->source.file = virXPathString("string(./backend)", ctxt);
- if (def->source.file &&
- STRNEQ(def->source.file, "/dev/random") &&
- STRNEQ(def->source.file, "/dev/hwrng")) {
- virReportError(VIR_ERR_XML_ERROR,
- _("file '%s' is not a supported random source"),
- def->source.file);
- goto error;
- }
break;
case VIR_DOMAIN_RNG_BACKEND_EGD:
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.args
index ba97c1e..5a4d47b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.args
@@ -18,6 +18,6 @@ QEMU_AUDIO_DRV=none \
-boot c \
-usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
--object rng-random,id=objrng0,filename=/dev/hwrng \
+-object rng-random,id=objrng0,filename=/dev/urandom \
-device virtio-rng-pci,rng=objrng0,id=rng0,max-bytes=123,period=1234,bus=pci.0,\
addr=0x4
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml
index 71bd21a..a6e91ff 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml
@@ -21,7 +21,7 @@
<memballoon model='virtio'/>
<rng model='virtio'>
<rate bytes='123' period='1234'/>
- <backend model='random'>/dev/hwrng</backend>
+ <backend model='random'>/dev/urandom</backend>
</rng>
</devices>
</domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-rng-random.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-rng-random.xml
index e8a0478..0bdefde 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-rng-random.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-rng-random.xml
@@ -25,7 +25,7 @@
</memballoon>
<rng model='virtio'>
<rate bytes='123' period='1234'/>
- <backend model='random'>/dev/hwrng</backend>
+ <backend model='random'>/dev/urandom</backend>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</rng>
</devices>
--
2.7.3
8 years, 7 months
[libvirt] [PATCH] spec: Use proper indentation
by Andrea Bolognani
Commit 1d4400082a02 added some code that was not indented properly
and broke syntax-check. Fix it.
---
Pushed as trivial.
libvirt.spec.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 4eff5ae..970ac32 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1851,11 +1851,11 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ;
ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
# Make sure libvirt picks up the new network defininiton
- %if %{with_systemd}
+ %if %{with_systemd}
/bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 ||:
- %else
+ %else
/sbin/service libvirtd condrestart > /dev/null 2>&1 || :
- %endif
+ %endif
fi
%endif
--
2.5.5
8 years, 7 months
[libvirt] [PATCH 00/13] qemu: Kill some very ugly legacy code
by Peter Krempa
Noticed while doing a depth-first search for a different refactor.
Peter Krempa (13):
qemu: remove default case from few typecasted enums
qemu: hotplug: Assume QEMU_CAPS_DEVICE in
qemuDomainAttachUSBMassStorageDevice
qemu: hotplug: Assume QEMU_CAPS_DEVICE in
qemuDomainAttachHostUSBDevice
qemu: monitor: Kill legacy USB monitor code
qemu: hotplug: Assume QEMU_CAPS_DEVICE in
qemuDomainAttachVirtioDiskDevice
qemu: hotplug: Assume QEMU_CAPS_DEVICE in qemuDomainAttachNetDevice
qemu: hotplug: Assume QEMU_CAPS_DEVICE in
qemuDomainAttachHostPCIDevice
qemu: hotplug: Assume QEMU_CAPS_DEVICE in
qemuDomainDetachVirtioDiskDevice
qemu: hotplug: Assume QEMU_CAPS_DEVICE in
qemuDomainDetachControllerDevice
qemu: hotplug: Assume QEMU_CAPS_DEVICE in
qemuDomainDetachHostPCIDevice
qemu: hotplug: Assume QEMU_CAPS_DEVICE in qemuDomainDetachNetDevice
qemu: hotplug: Assume QEMU_CAPS_DEVICE in
qemuDomainAttachControllerDevice
qemu: monitor: Kill legacy PCI hotplug code
src/qemu/qemu_command.c | 4 +-
src/qemu/qemu_hotplug.c | 381 ++++++++++++++++---------------------------
src/qemu/qemu_monitor.c | 130 ---------------
src/qemu/qemu_monitor.h | 37 -----
src/qemu/qemu_monitor_json.c | 79 ---------
src/qemu/qemu_monitor_json.h | 11 --
src/qemu/qemu_monitor_text.c | 377 ------------------------------------------
src/qemu/qemu_monitor_text.h | 31 ----
8 files changed, 140 insertions(+), 910 deletions(-)
--
2.8.1
8 years, 7 months
[libvirt] ideas for custom iptables rules for libvirt networks.
by Laine Stump
We still periodically get requests to allow custom iptables rules for
libvirt virtual networks (or, more commonly, a mode where libvirt simply
leaves iptables alone, not adding or removing anything), and it's been a
nagging item on my to-do list for a very long time. The problem is that,
although the amount of code required to support *any* solution is very
small, it's one of those things without a single obvious "only" way to
do it. Anyway, I'm going to take one more stab at it.
First, some background points:
* For <forward mode='nat'> libvirt's iptables rules are essential to the
operation of the forwarding, so we shouldn't mess with that.
* For [no forward mode], libvirt's iptables rules are a part of what
keeps the network isolated from the rest of the network, so we shouldn't
mess with that either.
* For <forward mode='route'> we currently allow all outgoing and
incoming as long as it is to/from the IP address range defined for the
network.
So we really want something that can be used only for <forward mode='route'>
I can see 3 different possibilities:
1) a new forward mode which is just like 'route', but doesn't add any
iptables rules. (what to call it though? "filterless-route"? Too long
and ugly :-/)
2) a new attribute to <forward> that takes effect only for mode='route'.
Maybe call it "filter". We could have "filter='open'" (what it does
currently, and will remain the default), "filter='outgoingOnly'", and
"filter='none' (the most requested functionality - no iptables rules
would be added for the network)
3) add a <filter> subelement to <forward> that allows specifying
iptables rules for the network. Perhaps this could instead be a
<filterref>, and use nwfilter to specify the rules? (that sounds really
cool, and if it worked it would be a nice re-use of the nwfilter driver,
but it may have undetermined pitfalls due to nwfilter being designed
with guest traffic filtering in mind, would take a lot more work, and
wouldn't address the most common request - "Don't mess with iptables! I
want to do it myself!".
Anyone have an opinion or alternate idea?
8 years, 7 months
[libvirt] [PATCH] remote: Don't reject remote polkit if client lacks support
by Cole Robinson
If you compile a client --without-polkit, and connect to a URI that needs
polkit auth, the connection will fail with:
$ ./tools/virsh --connect qemu+ssh://crobinso@machine/system
error: failed to connect to the hypervisor
error: authentication failed: unsupported authentication type 2
This is because the client side portion of the polkit handling is
compiled out. However, nothing polkit specific is actually required
of the client.
Fix that error by unconditionally compiling the basic polkit client
handling.
https://bugzilla.redhat.com/show_bug.cgi?id=635529
---
Granted, if polkit needs to do any interaction at all, and you are
connecting to a remote machine, then things are going to fail anyways
with a 'missing agent' error. But if you're user is in the 'libvirt'
group polkit doesn't need to auth it should all work.
src/remote/remote_driver.c | 69 +++++++++++++++++++++-------------------------
1 file changed, 31 insertions(+), 38 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index da94411..6bed2c5 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -132,11 +132,9 @@ static int remoteAuthenticate(virConnectPtr conn, struct private_data *priv,
#if WITH_SASL
static int remoteAuthSASL(virConnectPtr conn, struct private_data *priv,
virConnectAuthPtr auth, const char *mech);
-#endif
-#if WITH_POLKIT
+#endif /* WITH_SASL */
static int remoteAuthPolkit(virConnectPtr conn, struct private_data *priv,
virConnectAuthPtr auth);
-#endif /* WITH_POLKIT */
static virDomainPtr get_nonnull_domain(virConnectPtr conn, remote_nonnull_domain domain);
static virNetworkPtr get_nonnull_network(virConnectPtr conn, remote_nonnull_network network);
@@ -3326,14 +3324,12 @@ remoteAuthenticate(virConnectPtr conn, struct private_data *priv,
}
#endif
-#if WITH_POLKIT
case REMOTE_AUTH_POLKIT:
if (remoteAuthPolkit(conn, priv, auth) < 0) {
VIR_FREE(ret.types.types_val);
return -1;
}
break;
-#endif
case REMOTE_AUTH_NONE:
/* Nothing todo, hurrah ! */
@@ -3904,30 +3900,10 @@ remoteAuthSASL(virConnectPtr conn, struct private_data *priv,
#endif /* WITH_SASL */
-#if WITH_POLKIT
-# if WITH_POLKIT1
-static int
-remoteAuthPolkit(virConnectPtr conn, struct private_data *priv,
- virConnectAuthPtr auth ATTRIBUTE_UNUSED)
-{
- remote_auth_polkit_ret ret;
- VIR_DEBUG("Client initialize PolicyKit-1 authentication");
-
- memset(&ret, 0, sizeof(ret));
- if (call(conn, priv, 0, REMOTE_PROC_AUTH_POLKIT,
- (xdrproc_t) xdr_void, (char *)NULL,
- (xdrproc_t) xdr_remote_auth_polkit_ret, (char *) &ret) != 0) {
- return -1; /* virError already set by call */
- }
-
- VIR_DEBUG("PolicyKit-1 authentication complete");
- return 0;
-}
-# elif WITH_POLKIT0
-/* Perform the PolicyKit authentication process
- */
+#if WITH_POLKIT0
+/* Perform the PolicyKit0 authentication process */
static int
-remoteAuthPolkit(virConnectPtr conn, struct private_data *priv,
+remoteAuthPolkit0(virConnectPtr conn, struct private_data *priv,
virConnectAuthPtr auth)
{
remote_auth_polkit_ret ret;
@@ -3943,14 +3919,8 @@ remoteAuthPolkit(virConnectPtr conn, struct private_data *priv,
};
VIR_DEBUG("Client initialize PolicyKit-0 authentication");
- /* Check auth first and if it succeeds we are done. */
- memset(&ret, 0, sizeof(ret));
- if (call(conn, priv, 0, REMOTE_PROC_AUTH_POLKIT,
- (xdrproc_t) xdr_void, (char *)NULL,
- (xdrproc_t) xdr_remote_auth_polkit_ret, (char *) &ret) == 0)
- goto out;
-
- /* Auth failed. Ask client to obtain it and check again. */
+ /* We only make it here if auth already failed
+ * Ask client to obtain it and check again. */
if (auth && auth->cb) {
/* Check if the necessary credential type for PolicyKit is supported */
for (i = 0; i < auth->ncredtype; i++) {
@@ -3986,8 +3956,31 @@ remoteAuthPolkit(virConnectPtr conn, struct private_data *priv,
VIR_DEBUG("PolicyKit-0 authentication complete");
return 0;
}
-# endif /* WITH_POLKIT0 */
-#endif /* WITH_POLKIT */
+#endif /* WITH_POLKIT0 */
+
+static int
+remoteAuthPolkit(virConnectPtr conn, struct private_data *priv,
+ virConnectAuthPtr auth ATTRIBUTE_UNUSED)
+{
+ remote_auth_polkit_ret ret;
+ VIR_DEBUG("Client initialize PolicyKit authentication");
+
+ memset(&ret, 0, sizeof(ret));
+ if (call(conn, priv, 0, REMOTE_PROC_AUTH_POLKIT,
+ (xdrproc_t) xdr_void, (char *)NULL,
+ (xdrproc_t) xdr_remote_auth_polkit_ret, (char *) &ret) != 0) {
+ return -1; /* virError already set by call */
+ }
+
+#if WITH_POLKIT0
+ if (remoteAuthPolkit0(conn, priv, auth) < 0)
+ return -1;
+#endif /* WITH_POLKIT0 */
+
+ VIR_DEBUG("PolicyKit authentication complete");
+ return 0;
+}
+
/*----------------------------------------------------------------------*/
static int
--
2.7.3
8 years, 7 months
[libvirt] [PATCH v3] schema: Allow space character in disk vendor/product
by Cole Robinson
The hex range already tried to allow for it, but it wasn't using
the correct XML hex syntax. Fix it, and test it
---
v3: use proper XML hex syntax (thanks danpb)
docs/schemas/domaincommon.rng | 6 ++++--
tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.args | 4 ++--
tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml | 4 ++--
tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml | 4 ++--
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 3605afe..66f4167 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1165,14 +1165,16 @@
<optional>
<element name="vendor">
<data type="string">
- <param name="pattern">[x20-x7E]{0,8}</param>
+ <!-- All printable characters -->
+ <param name="pattern">[ -~]{0,8}</param>
</data>
</element>
</optional>
<optional>
<element name="product">
<data type="string">
- <param name="pattern">[x20-x7E]{0,16}</param>
+ <!-- All printable characters -->
+ <param name="pattern">[ -~]{0,16}</param>
</data>
</element>
</optional>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.args
index df118e3..1831ebd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.args
@@ -24,6 +24,6 @@ QEMU_AUDIO_DRV=none \
-device scsi-cd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,\
id=scsi0-0-0-0,vendor=SEAGATE,product=ST3146707LC \
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-scsi1-0-0 \
--device scsi-hd,bus=scsi1.0,scsi-id=0,drive=drive-scsi1-0-0,id=scsi1-0-0,\
-vendor=SEAGATE,product=ST3567807GD \
+-device 'scsi-hd,bus=scsi1.0,scsi-id=0,drive=drive-scsi1-0-0,id=scsi1-0-0,\
+vendor=SEA GATE,product=ST67 807GD' \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml
index 13004c1..b32b746 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml
@@ -26,8 +26,8 @@
<source dev='/dev/HostVG/QEMUGuest2'/>
<target dev='sdb' bus='scsi'/>
<readonly/>
- <vendor>SEAGATE</vendor>
- <product>ST3567807GD</product>
+ <vendor>SEA GATE</vendor>
+ <product>ST67 807GD</product>
<address type='drive' controller='1' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml
index 42c7bcd..9e1e7af 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml
@@ -26,8 +26,8 @@
<source dev='/dev/HostVG/QEMUGuest2'/>
<target dev='sdb' bus='scsi'/>
<readonly/>
- <vendor>SEAGATE</vendor>
- <product>ST3567807GD</product>
+ <vendor>SEA GATE</vendor>
+ <product>ST67 807GD</product>
<address type='drive' controller='1' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'>
--
2.7.4
8 years, 7 months
[libvirt] [PATCH v2] schema: Allow space character in disk vendor/product
by Cole Robinson
The hex range already tried to allow for it, but it doesn't work
for reasons I can't figure out. Use a plain character range instead,
and test it
---
v2: send the fully squashed patch
docs/schemas/domaincommon.rng | 6 ++++--
tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.args | 4 ++--
tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml | 4 ++--
tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml | 4 ++--
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 3605afe..6c80b66 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1165,14 +1165,16 @@
<optional>
<element name="vendor">
<data type="string">
- <param name="pattern">[x20-x7E]{0,8}</param>
+ <!-- All printable characters -->
+ <param name="pattern">[ -~]{0,8}</param>
</data>
</element>
</optional>
<optional>
<element name="product">
<data type="string">
- <param name="pattern">[x20-x7E]{0,16}</param>
+ <!-- All printable characters -->
+ <param name="pattern">[ -~]{0,16}</param>
</data>
</element>
</optional>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.args
index df118e3..1831ebd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.args
@@ -24,6 +24,6 @@ QEMU_AUDIO_DRV=none \
-device scsi-cd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,\
id=scsi0-0-0-0,vendor=SEAGATE,product=ST3146707LC \
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-scsi1-0-0 \
--device scsi-hd,bus=scsi1.0,scsi-id=0,drive=drive-scsi1-0-0,id=scsi1-0-0,\
-vendor=SEAGATE,product=ST3567807GD \
+-device 'scsi-hd,bus=scsi1.0,scsi-id=0,drive=drive-scsi1-0-0,id=scsi1-0-0,\
+vendor=SEA GATE,product=ST67 807GD' \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml
index 13004c1..b32b746 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml
@@ -26,8 +26,8 @@
<source dev='/dev/HostVG/QEMUGuest2'/>
<target dev='sdb' bus='scsi'/>
<readonly/>
- <vendor>SEAGATE</vendor>
- <product>ST3567807GD</product>
+ <vendor>SEA GATE</vendor>
+ <product>ST67 807GD</product>
<address type='drive' controller='1' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml
index 42c7bcd..9e1e7af 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml
@@ -26,8 +26,8 @@
<source dev='/dev/HostVG/QEMUGuest2'/>
<target dev='sdb' bus='scsi'/>
<readonly/>
- <vendor>SEAGATE</vendor>
- <product>ST3567807GD</product>
+ <vendor>SEA GATE</vendor>
+ <product>ST67 807GD</product>
<address type='drive' controller='1' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'>
--
2.7.4
8 years, 7 months
[libvirt] [PATCH v2] spec: If installing default network, restart libvirtd
by Cole Robinson
If libvirt-daemon-config-network is installed while libvirtd is already
running, the daemon doesn't notice the network. Users then have to
manually restart libvirtd (or reboot) to pick up the network.
Instead let's trigger a daemon restart when the package is first installed.
Then the default network is available immediately if libvirtd was already
running.
https://bugzilla.redhat.com/show_bug.cgi?id=867546
---
v2: Send the patch with actual try-restart/condrestart
Plain restart is kind of suboptimal since it will drop all open
libvirt connections. Ideally we would use reload which is meant
for this case, but it's kinda crashy with current git:
http://www.redhat.com/archives/libvir-list/2016-April/msg01624.html
And in fact daemon restart is what the spec triggers on libvirt-daemon
upgrade anyways, so this isn't anything new WRT packaging.
libvirt.spec.in | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 35212da..4eff5ae 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1849,6 +1849,14 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ;
< %{_datadir}/libvirt/networks/default.xml \
> %{_sysconfdir}/libvirt/qemu/networks/default.xml
ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
+
+ # Make sure libvirt picks up the new network defininiton
+ %if %{with_systemd}
+ /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 ||:
+ %else
+ /sbin/service libvirtd condrestart > /dev/null 2>&1 || :
+ %endif
+
fi
%endif
--
2.7.4
8 years, 7 months