[libvirt] [PATCH 0/5] Improve translation handling
by Daniel P. Berrangé
This series aims to improve the way we handle translations.
The key problems with our current approach
- The pot & po files stored in GIT contain huge set of
annotations about source file names & line numbers.
These are out of date as soon as a change is commited
to git following a translation refresh. This makes
diffs impossible to meaningfully review, as they are
98% noise, 2% signal.
- The po file messages are sorted by source location,
so when we move code between files, or rename files,
the po file message order changes for no good reason.
This makes diffs even more impossible to review.
- The po files contain entries for all messages even
if most have no translation, bloating size of po/
data stored in git
- Whenever 'make dist' is run, it alters all the pot
and po files, so developers need to then reset their
content to match git HEAD manually. This is caused
by having auto-generated content (source file locations)
mixed in with the static content (the actual translated
strings)
Overall the *.po files we store consume 100MB, and when
I refresh content from Zanata, it results in git commits
that are many 10's of MB in size and impossible todo any
meaningful review on.
After this series, we only minimized po files in git, with
the redundated & outdated source locations info stripped.
This stripped info is re-added automatically during build
to create the real .po files, that we distribute, and/or
upload to translators in Zanata.
As a result the po directory is only 19MB in size, and
when refreshing from Zanata, we have git commits that
clearly show *only* the altered translations, nothing
else. The importance of this cannot be overstated - by
having these clear diffs I discovered a serious bug in
the Zanata client that has been screwing up translations
in every project that uses Zanata by adding bogus "fuzzy"
annotations.
Note that what I've posted here is a cut-down version of
what will actually be pushed. I have cut out the 99 other
patches that actally change the .po files. There's no
meaningful way to review those commits because of the
noise in the original .po files we're replacing. I have
gone through manual steps, however, to validate that the
.po files we generate from the new .mini.po files are
identical to the original .po files we used to store,
aside from the bogus fuzzy annotations due to broken
Zanata.
The diffstat shown below covers the full set of patches
on the branch at:
https://github.com/berrange/libvirt/commits/i18n-4
The killer statistic is:
418787 insertions(+), 4388281 deletions(-)
Daniel P. Berrangé (5):
po: provide custom make rules for po file management
po: remove language list from zanata configuration
po: add rules for integration with zanata
po: stop storing libvirt.pot in git
po: minimize & canonicalize translations stored in git
.gitignore | 9 +-
ABOUT-NLS | 1 +
autogen.sh | 3 +-
bootstrap.conf | 38 -
build-aux/minimize-po.pl | 37 +
configure.ac | 33 +-
m4/virt-nls.m4 | 70 +
po/Makefile.am | 107 +
po/{POTFILES.in => POTFILES} | 0
po/README.md | 75 +
po/af.mini.po | 20 +
po/af.po | 46395 ------------------------------
po/am.mini.po | 20 +
po/am.po | 46395 ------------------------------
po/anp.mini.po | 20 +
po/anp.po | 46395 ------------------------------
po/ar.mini.po | 762 +
po/ar.po | 46685 ------------------------------
po/{as.po => as.mini.po} | 54246 ++++++++++-------------------------
po/ast.mini.po | 20 +
po/ast.po | 46395 ------------------------------
po/bal.mini.po | 20 +
po/bal.po | 46395 ------------------------------
po/be.mini.po | 21 +
po/be.po | 46396 ------------------------------
po/bg.mini.po | 1204 +
po/bg.po | 46733 ------------------------------
po/bn.mini.po | 761 +
po/bn.po | 46684 ------------------------------
po/bn_IN.mini.po | 9131 ++++++
po/bn_IN.po | 46729 ------------------------------
po/bo.mini.po | 20 +
po/bo.po | 46395 ------------------------------
po/br.mini.po | 20 +
po/br.po | 46395 ------------------------------
po/brx.mini.po | 20 +
po/brx.po | 46395 ------------------------------
po/bs.mini.po | 767 +
po/bs.po | 46693 ------------------------------
po/ca.mini.po | 1618 ++
po/ca.po | 46555 ------------------------------
po/cs.mini.po | 4146 +++
po/cs.po | 46751 ------------------------------
po/cy.mini.po | 762 +
po/cy.po | 46701 ------------------------------
po/da.mini.po | 982 +
po/da.po | 46704 ------------------------------
po/de.mini.po | 22654 +++++++++++++++
po/de.po | 47656 -------------------------------
po/de_CH.mini.po | 20 +
po/de_CH.po | 46395 ------------------------------
po/el.mini.po | 724 +
po/el.po | 46857 ------------------------------
po/en_GB.mini.po | 22271 +++++++++++++++
po/en_GB.po | 47573 -------------------------------
po/eo.mini.po | 20 +
po/eo.po | 46395 ------------------------------
po/es.mini.po | 22622 +++++++++++++++
po/es.po | 47748 -------------------------------
po/et.mini.po | 761 +
po/et.po | 46684 ------------------------------
po/eu.mini.po | 761 +
po/eu.po | 46684 ------------------------------
po/fa.mini.po | 20 +
po/fa.po | 46395 ------------------------------
po/fi.mini.po | 1281 +
po/fi.po | 46744 ------------------------------
po/fil.mini.po | 20 +
po/fr.mini.po | 4258 +++
po/fr.po | 46907 ------------------------------
po/fur.mini.po | 20 +
po/ga.mini.po | 21 +
po/gl.mini.po | 761 +
po/gl.po | 46700 ------------------------------
po/{gu.po => gu.mini.po} | 54191 ++++++++++-------------------------
po/he.mini.po | 761 +
po/he.po | 46684 ------------------------------
po/hi.mini.po | 13772 +++++++++
po/hi.po | 47013 -------------------------------
po/hr.mini.po | 21 +
po/hr.po | 46396 ------------------------------
po/hu.mini.po | 987 +
po/hu.po | 46709 ------------------------------
po/ia.mini.po | 20 +
po/ia.po | 46395 ------------------------------
po/id.mini.po | 728 +
po/id.po | 46691 ------------------------------
po/ilo.mini.po | 20 +
po/ilo.po | 46395 ------------------------------
po/is.mini.po | 761 +
po/is.po | 46684 ------------------------------
po/it.mini.po | 6588 +++++
po/it.po | 46663 ------------------------------
po/{ja.po => ja.mini.po} | 54737 ++++++++++-------------------------
po/ka.mini.po | 761 +
po/ka.po | 46684 ------------------------------
po/kk.mini.po | 20 +
po/kk.po | 46395 ------------------------------
po/km.mini.po | 20 +
po/km.po | 46395 ------------------------------
po/{kn.po => kn.mini.po} | 54156 ++++++++++-------------------------
po/ko.mini.po | 12838 +++++++++
po/ko.po | 46723 ------------------------------
po/kw.mini.po | 21 +
po/kw.po | 46396 ------------------------------
po/kw(a)kkcor.mini.po | 21 +
po/kw(a)kkcor.po | 46396 ------------------------------
po/kw(a)uccor.mini.po | 21 +
po/kw(a)uccor.po | 46396 ------------------------------
po/kw_GB.mini.po | 21 +
po/kw_GB.po | 46396 ------------------------------
po/ky.mini.po | 20 +
po/ky.po | 46395 ------------------------------
po/libvirt.pot | 46394 ------------------------------
po/lt.mini.po | 762 +
po/lt.po | 46685 ------------------------------
po/lv.mini.po | 762 +
po/lv.po | 46685 ------------------------------
po/mai.mini.po | 20 +
po/mai.po | 46395 ------------------------------
po/mk.mini.po | 1138 +
po/mk.po | 46724 ------------------------------
po/{ml.po => ml.mini.po} | 53963 ++++++++++-------------------------
po/mn.mini.po | 20 +
po/mn.po | 46395 ------------------------------
po/{mr.po => mr.mini.po} | 55484 +++++++++++-------------------------
po/ms.mini.po | 189 +
po/ms.po | 46580 ------------------------------
po/my.mini.po | 20 +
po/nb.mini.po | 492 +
po/nb.po | 46667 ------------------------------
po/nds.mini.po | 20 +
po/nds.po | 46395 ------------------------------
po/ne.mini.po | 20 +
po/ne.po | 46395 ------------------------------
po/nl.mini.po | 9868 +++++++
po/nl.po | 47062 -------------------------------
po/nn.mini.po | 761 +
po/nn.po | 46684 ------------------------------
po/nso.mini.po | 761 +
po/nso.po | 46684 ------------------------------
po/{or.po => or.mini.po} | 53161 +++++++++-------------------------
po/{pa.po => pa.mini.po} | 53711 ++++++++++-------------------------
po/pl.mini.po | 10274 +++++++
po/pl.po | 47166 -------------------------------
po/pt.mini.po | 1243 +
po/pt.po | 46587 ------------------------------
po/pt_BR.mini.po | 22821 +++++++++++++++
po/pt_BR.po | 47565 -------------------------------
po/ro.mini.po | 762 +
po/ro.po | 46685 ------------------------------
po/{ru.po => ru.mini.po} | 54065 ++++++++++-------------------------
po/si.mini.po | 761 +
po/si.po | 46684 ------------------------------
po/sk.mini.po | 761 +
po/sk.po | 46684 ------------------------------
po/sl.mini.po | 762 +
po/sl.po | 46685 ------------------------------
po/sq.mini.po | 24 +
po/sq.po | 46399 ------------------------------
po/sr.mini.po | 2203 ++
po/sr.po | 46910 ------------------------------
po/sr(a)latin.mini.po | 2204 ++
po/sr(a)latin.po | 46911 ------------------------------
po/sv.mini.po | 2559 ++
po/sv.po | 46696 ------------------------------
po/{ta.po => ta.mini.po} | 54968 +++++++++++-------------------------
po/{te.po => te.mini.po} | 53427 ++++++++++-------------------------
po/tg.mini.po | 20 +
po/tg.po | 46395 ------------------------------
po/th.mini.po | 761 +
po/th.po | 46684 ------------------------------
po/tr.mini.po | 761 +
po/tr.po | 46684 ------------------------------
po/tw.mini.po | 20 +
po/tw.po | 46395 ------------------------------
po/{uk.po => uk.mini.po} | 62575 +++++++++++++++++------------------------
po/ur.mini.po | 761 +
po/ur.po | 46684 ------------------------------
po/vi.mini.po | 8674 ++++++
po/vi.po | 47171 -------------------------------
po/wba.mini.po | 20 +
po/wba.po | 46395 ------------------------------
po/yo.mini.po | 20 +
po/yo.po | 46395 ------------------------------
po/zanata.xml | 99 -
po/zh_CN.mini.po | 23613 ++++++++++++++++
po/zh_CN.po | 46701 ------------------------------
po/zh_HK.mini.po | 20 +
po/zh_HK.po | 46395 ------------------------------
po/zh_TW.mini.po | 958 +
po/zh_TW.po | 46725 ------------------------------
po/zu.mini.po | 761 +
po/zu.po | 46684 ------------------------------
src/internal.h | 16 +-
src/libvirt-admin.c | 2 +
src/libvirt.c | 2 +
src/util/virgettext.c | 3 +-
tools/virt-host-validate.c | 4 +-
199 files changed, 418787 insertions(+), 4388281 deletions(-)
--
2.14.3
6 years, 6 months
[libvirt] [PATCH 0/6] Split the storage file driver impls from the storage driver backends
by Daniel P. Berrangé
The storage driver backends currently register storage file backends as
a side effect of initialization. This is fine right now while both run
in the same libvirtd process, but in future the storage file backends
will need to run in the hypervisor daemon which will be separate from
the storage daemon. This small series splits them, makin the storage
file backends be registered "on demand"
Daniel P. Berrangé (6):
util: create new virmodule.{c,h} files for dlopen support code
storage: split gluster storage file code from storage driver backend
storage: split fs storage file code from storage driver backend
storage: fix virStorageFileGetBackingStoreStr error handling
util: refactor storage file checks to allow error reporting
storage: create separate loadable modules for storage file drivers
libvirt.spec.in | 4 +
src/driver.c | 133 +-----------
src/driver.h | 3 -
src/libvirt_driver_modules.syms | 1 -
src/libvirt_private.syms | 3 +
src/qemu/qemu_domain.c | 21 +-
src/qemu/qemu_driver.c | 21 +-
src/storage/Makefile.inc.am | 44 ++++
src/storage/storage_backend.c | 3 +-
src/storage/storage_backend_fs.c | 210 +------------------
src/storage/storage_backend_gluster.c | 305 +---------------------------
src/storage/storage_backend_gluster.h | 2 +-
src/storage/storage_file_fs.c | 251 +++++++++++++++++++++++
src/storage/storage_file_fs.h | 29 +++
src/storage/storage_file_gluster.c | 366 ++++++++++++++++++++++++++++++++++
src/storage/storage_file_gluster.h | 27 +++
src/util/Makefile.inc.am | 2 +
src/util/virmodule.c | 163 +++++++++++++++
src/util/virmodule.h | 29 +++
src/util/virstoragefile.c | 123 ++++++++----
src/util/virstoragefile.h | 9 +-
src/util/virstoragefilebackend.c | 72 +++++--
src/util/virstoragefilebackend.h | 9 +-
23 files changed, 1098 insertions(+), 732 deletions(-)
create mode 100644 src/storage/storage_file_fs.c
create mode 100644 src/storage/storage_file_fs.h
create mode 100644 src/storage/storage_file_gluster.c
create mode 100644 src/storage/storage_file_gluster.h
create mode 100644 src/util/virmodule.c
create mode 100644 src/util/virmodule.h
--
2.14.3
6 years, 6 months
[libvirt] [PATCH] docs: Grammar and spelling fixes
by Ville Skyttä
Signed-off-by: Ville Skyttä <ville.skytta(a)iki.fi>
---
docs/aclpolkit.html.in | 2 +-
docs/api.html.in | 2 +-
docs/contribute.html.in | 2 +-
docs/downloads.html.in | 2 +-
docs/drvbhyve.html.in | 2 +-
docs/drvesx.html.in | 2 +-
docs/drvlxc.html.in | 2 +-
docs/errors.html.in | 2 +-
docs/firewall.html.in | 2 +-
docs/formatdomain.html.in | 12 ++++++------
docs/formatdomaincaps.html.in | 2 +-
docs/internals/rpc.html.in | 2 +-
docs/locking-sanlock.html.in | 2 +-
docs/news.xml | 2 +-
docs/storage.html.in | 2 +-
docs/support.html.in | 2 +-
16 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/docs/aclpolkit.html.in b/docs/aclpolkit.html.in
index 0e3c8e9..98d06da 100644
--- a/docs/aclpolkit.html.in
+++ b/docs/aclpolkit.html.in
@@ -396,7 +396,7 @@ polkit.addRule(function(action, subject) {
To achieve this we need to write a rule which checks
whether the <code>connect_driver</code> attribute
is <code>LXC</code> and the <code>domain_name</code>
- attribute is <code>demo</code>, and match on a action
+ attribute is <code>demo</code>, and match on action
name of <code>org.libvirt.api.domain.getattr</code>. Using
the javascript rules format, this ends up written as
</p>
diff --git a/docs/api.html.in b/docs/api.html.in
index 27abed6..288b9ec 100644
--- a/docs/api.html.in
+++ b/docs/api.html.in
@@ -155,7 +155,7 @@
</ul>
</li>
<li><b>Enumeration</b> [virConnectList..., virConnectNumOf...]
- <p>Used to enumerate a set of object available to an given
+ <p>Used to enumerate a set of object available to a given
hypervisor connection such as:</p>
<ul>
<li>
diff --git a/docs/contribute.html.in b/docs/contribute.html.in
index 158c91c..42a1b2f 100644
--- a/docs/contribute.html.in
+++ b/docs/contribute.html.in
@@ -80,7 +80,7 @@
and future growth of the project, that there are a people
who evangalise the work created by the project. This can
take many forms, writing blog posts (about usage of features,
- personal user experiances, areas for future work, and more),
+ personal user experiences, areas for future work, and more),
syndicating docs and blogs via social media, giving user
group and/or conference talks about libvirt.</li>
<li><strong>User assistance</strong>. Since documentation
diff --git a/docs/downloads.html.in b/docs/downloads.html.in
index 8cca203..2956a4f 100644
--- a/docs/downloads.html.in
+++ b/docs/downloads.html.in
@@ -457,7 +457,7 @@
(first release in the middle of Jan, then skip the Feb release), giving
a total of 11 releases a year. The Python and Perl modules will aim to
release at the same time as the core libvirt module. Other modules have
- independant ad-hoc releases with no fixed time schedle.
+ independent ad-hoc releases with no fixed time schedule.
</p>
<h2><a id="numbering">Release numbering</a></h2>
diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in
index 63260af..bde8298 100644
--- a/docs/drvbhyve.html.in
+++ b/docs/drvbhyve.html.in
@@ -239,7 +239,7 @@ to let a guest boot or start a guest using:</p>
<pre>start --console domname</pre>
-<p><b>NB:</b> An bootloader configured to require user interaction will prevent
+<p><b>NB:</b> A bootloader configured to require user interaction will prevent
the domain from starting (and thus <code>virsh console</code> or <code>start
--console</code> from functioning) until the user interacts with it manually on
the VM host. Because users typically do not have access to the VM host,
diff --git a/docs/drvesx.html.in b/docs/drvesx.html.in
index 417aca4..901d659 100644
--- a/docs/drvesx.html.in
+++ b/docs/drvesx.html.in
@@ -437,7 +437,7 @@ ethernet0.checkMACAddress = "false"
<dl>
<dt><code>auto</code></dt>
<dd>
- This isn't a actual controller model. If specified the ESX driver
+ This isn't an actual controller model. If specified the ESX driver
tries to detect the SCSI controller model referenced in the
<code>.vmdk</code> file and use it. Autodetection fails when a
SCSI controller has multiple disks attached and the SCSI controller
diff --git a/docs/drvlxc.html.in b/docs/drvlxc.html.in
index 44c4960..6ee9ee8 100644
--- a/docs/drvlxc.html.in
+++ b/docs/drvlxc.html.in
@@ -429,7 +429,7 @@ be considered secure against exploits of the host OS. The sVirt SELinux
driver provides a way to secure containers even when the "user" namespace
is not used. The cost is that writing a policy to allow execution of
arbitrary OS is not practical. The SELinux sVirt policy is typically
-tailored to work with an simpler application confinement use case,
+tailored to work with a simpler application confinement use case,
as provided by the "libvirt-sandbox" project.
</p>
diff --git a/docs/errors.html.in b/docs/errors.html.in
index 8f4f7d4..ea42728 100644
--- a/docs/errors.html.in
+++ b/docs/errors.html.in
@@ -29,7 +29,7 @@ set specifically to a connection with</p>
call it with the error information</li><li>otherwise call <a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>
which is the default error function of the library issuing the error
on stderr</li><li>save the error in the connection for later retrieval with <a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a></li></ol></li>
- <li>otherwise like when failing to create an hypervisor connection:
+ <li>otherwise like when failing to create a hypervisor connection:
<ol><li>if there is a global callback set with <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a>,
call it with the error information</li><li>otherwise call <a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>
which is the default error function of the library issuing the error
diff --git a/docs/firewall.html.in b/docs/firewall.html.in
index 11c3c81..0a50687 100644
--- a/docs/firewall.html.in
+++ b/docs/firewall.html.in
@@ -11,7 +11,7 @@
<ul>
<li>The virtual network driver
<br /><br />
- This provides a isolated bridge device (ie no physical NICs
+ This provides an isolated bridge device (ie no physical NICs
enslaved). Guest TAP devices are attached to this bridge.
Guests can talk to each other and the host, and optionally the
wider world.
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 8e864f7..b65fea0 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -622,7 +622,7 @@
<code>order</code> allows to specify the order to add the online vcpus.
For hypervisors/platforms that require to insert multiple vcpus at once
- the order may be duplicated accross all vcpus that need to be
+ the order may be duplicated across all vcpus that need to be
enabled at once. Specifying order is not necessary, vcpus are then
added in an arbitrary order. If order info is used, it must be used for
all online vcpus. Hypervisors may clear or update ordering information
@@ -4058,7 +4058,7 @@
pcie-switch-upstream-port, and of course for this to work
properly, you will need to decrease the pcie-expander-bus'
busNr accordingly so that there are enough unused bus
- numbers above it to accomodate giving out one bus number for
+ numbers above it to accommodate giving out one bus number for
the upstream-port and one for each downstream-port (in
addition to the pcie-root-port and the pcie-expander-bus
itself).
@@ -4212,7 +4212,7 @@
<dd>This is the fully qualified path of the file associated
with the lockspace. The offset specifies where the lease
is stored within the file. If the lock manager does not
- require a offset, just pass 0.
+ require an offset, just pass 0.
</dd>
</dl>
@@ -4867,7 +4867,7 @@
(<span class="since">Since 0.10.0</span>). For example, in order
to work properly with both an 802.1Qbh switch and an Open vSwitch
switch, you may choose to specify no type, but both
- an <code>profileid</code> (in case the switch is 802.1Qbh) and
+ a <code>profileid</code> (in case the switch is 802.1Qbh) and
an <code>interfaceid</code> (in case the switch is Open vSwitch)
(you may also omit the other attributes, such as managerid,
typeid, or profileid, to be filled in from the
@@ -6174,7 +6174,7 @@ qemu-kvm -net nic,model=? /dev/null
set to an empty string, then VNC access is disabled. The
<code>keymap</code> attribute specifies the keymap to use. It is
possible to set a limit on the validity of the password by giving
- an timestamp <code>passwdValidTo='2010-04-09T15:51:00'</code>
+ a timestamp <code>passwdValidTo='2010-04-09T15:51:00'</code>
assumed to be in UTC. The <code>connected</code> attribute allows
control of connected client during password changes. VNC accepts
<code>keep</code> value only <span class="since">since 0.9.3</span>.
@@ -6216,7 +6216,7 @@ qemu-kvm -net nic,model=? /dev/null
<code>passwd</code> attribute is set to an empty string, then
SPICE access is disabled. The <code>keymap</code> attribute
specifies the keymap to use. It is possible to set a limit on
- the validity of the password by giving an timestamp
+ the validity of the password by giving a timestamp
<code>passwdValidTo='2010-04-09T15:51:00'</code> assumed to be
in UTC.
</p>
diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
index 6bfcaf6..027e115 100644
--- a/docs/formatdomaincaps.html.in
+++ b/docs/formatdomaincaps.html.in
@@ -81,7 +81,7 @@
<h3><a id="elementsCPUAllocation">CPU Allocation</a></h3>
- <p>Before any devices capability occurs, there might be a info on domain
+ <p>Before any devices capability occurs, there might be info on domain
wide capabilities, e.g. virtual CPUs:</p>
<pre>
diff --git a/docs/internals/rpc.html.in b/docs/internals/rpc.html.in
index fca9cb7..048192f 100644
--- a/docs/internals/rpc.html.in
+++ b/docs/internals/rpc.html.in
@@ -133,7 +133,7 @@
</dd>
<dt><code>serial</code></dt>
<dd>
- This is an number that starts from 1 and increases
+ This is a number that starts from 1 and increases
each time a method call packet is sent. A reply or
stream packet will have a serial number matching the
original method call packet serial. Events always
diff --git a/docs/locking-sanlock.html.in b/docs/locking-sanlock.html.in
index 9b36561..3ee9849 100644
--- a/docs/locking-sanlock.html.in
+++ b/docs/locking-sanlock.html.in
@@ -76,7 +76,7 @@ SANLOCKOPTS="-w 0"
configuration file for each libvirt driver that is using
sanlock. For QEMU, we will edit <code>/etc/libvirt/qemu-sanlock.conf</code>
There is one mandatory parameter that needs to be set,
- the <code>host_id</code>. This is a integer between
+ the <code>host_id</code>. This is an integer between
1 and 2000, which must be set to a <strong>unique</strong>
value on each host running virtual machines.
</p>
diff --git a/docs/news.xml b/docs/news.xml
index d67d5a7..8018141 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -1206,7 +1206,7 @@
<description>
The <code>vgaconf</code> attribute was added to <code>video</code>'s
<code>driver</code> element. Possible values are: <code>on</code>,
- <code>off</code>, and <code>io</code>. It controlls the way how
+ <code>off</code>, and <code>io</code>. It controls the way how
bhyve exposes video devices to its guests; various guest OSes might
require different settings to boot properly.
</description>
diff --git a/docs/storage.html.in b/docs/storage.html.in
index 3f1aec1..1906aa6 100644
--- a/docs/storage.html.in
+++ b/docs/storage.html.in
@@ -759,7 +759,7 @@
This provides a pool based on Virtuozzo storage. Virtuozzo Storage is
a highly available distributed software-defined storage with built-in
replication and disaster recovery. More detailed information about
- Virtuozzo storage and its managment can be found here:
+ Virtuozzo storage and its management can be found here:
<a href="https://openvz.org/Virtuozzo_Storage">Virtuozzo Storage</a>).
</p>
diff --git a/docs/support.html.in b/docs/support.html.in
index 1a9438f..38f2f90 100644
--- a/docs/support.html.in
+++ b/docs/support.html.in
@@ -199,7 +199,7 @@
return an error indicating it is not supported. Likewise libvirt will
make reasonable efforts to keep API calls working across hypervisor
releases even if the underlying implementation changes. In cases where
- this is impossible, an suitable error will be reported. The list of
+ this is impossible, a suitable error will be reported. The list of
APIs which have implementations <a href="hvsupport.html">is detailed separately</a>.
</p>
--
2.14.1
6 years, 6 months
[libvirt] [PATCH] rpm: set wireshark plugin directory from pkg-config
by Daniel P. Berrangé
The wireshark plugin directory moved again in Fedora 29, and will
move again every time wireshark do a new minor release. Call out
to pkg-config to find the right directory to use in the RPM file
list.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as a rawhide build fix
libvirt.spec.in | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 549efcbd3a..d6058f8054 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -184,6 +184,11 @@
%if 0%{?fedora}
%define with_wireshark 0%{!?_without_wireshark:1}
%endif
+%if 0%{?fedora} || 0%{?rhel} > 7
+ %define wireshark_plugindir %(pkg-config --variable plugindir wireshark)
+%else
+ %define wireshark_plugindir %{_libdir}/wireshark/plugins
+%endif
# Enable libssh transport for new enough distros
%if 0%{?fedora}
@@ -1386,7 +1391,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.a
%if %{with_wireshark}
-rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/libvirt.la
+rm -f $RPM_BUILD_ROOT%{wireshark_plugindir}/libvirt.la
%endif
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/
@@ -2097,7 +2102,7 @@ exit 0
%if %{with_wireshark}
%files wireshark
-%{_libdir}/wireshark/plugins/libvirt.so
+%{wireshark_plugindir}/libvirt.so
%endif
%files nss
--
2.14.3
6 years, 6 months
[libvirt] [GSoC] Introduction - nodejs bindings
by Ramy Elkest
Hi all,
As a quick introduction, I'm Ramy Elkest, a student at Georgia Tech and
one of the lucky ones selected by libvirt for this year's Google Summer
of Code.
During the next months I'll be working with my mentors Martin Kletzander
and Erik Skultety to introduce nodejs to libvirt's family of bindings.
In short, the aim is to generate the nodejs bindings from the XMLs (as we
do for python).
On a very high level my current approach is as follows:
- Re-use libvirt-python's generator (mainly the parser) possibly re-written
in node (TBD)
- Draw from existing projects (eg. node-libvirt) to generate preliminary
templates
There are a few things to look into before jumping in:
- Code generation framework (or lack of)
- Node Abstractions for Node (NAN) vs. Node-API (N-API)
If you have preliminary thoughts / background info about any of the above,
I'd love to hear it. I'm usually around on irc, "relkest".
Ramy
6 years, 6 months
[libvirt] [PATCH] rpm: libvirt-daemon-driver-libxl must obsolete libvirt-daemon-driver-xen
by Daniel P. Berrangé
Snce the xen driver was deleted we need to ensure that the old
libvirt-daemon-driver-xen sub-RPM gets removed on upgrade. We
achieve this my making libvirt-daemon-driver-libxl obsolete it.
We don't add a Provides: too, because libvirt-daemon-driver-libxl
is not a functionally identical replacement, since we don't want
to satisfy deps for 3rd party apps that have a Requires on the
libvirt-daemon-driver-xen RPM.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as trivial fix
libvirt.spec.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 5090dfa2aa..549efcbd3a 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -841,6 +841,7 @@ VirtualBox
Summary: Libxl driver plugin for the libvirtd daemon
Group: Development/Libraries
Requires: libvirt-daemon = %{version}-%{release}
+Obsoletes: libvirt-daemon-driver-xen < 4.3.0
%description daemon-driver-libxl
The Libxl driver plugin for the libvirtd daemon, providing
--
2.14.3
6 years, 6 months
[libvirt] [PATCH] docs: Grammar and spelling fixes
by Ville Skyttä
---
docs/aclpolkit.html.in | 2 +-
docs/api.html.in | 2 +-
docs/contribute.html.in | 2 +-
docs/downloads.html.in | 2 +-
docs/drvbhyve.html.in | 2 +-
docs/drvesx.html.in | 2 +-
docs/drvlxc.html.in | 2 +-
docs/errors.html.in | 2 +-
docs/firewall.html.in | 2 +-
docs/formatdomain.html.in | 12 ++++++------
docs/formatdomaincaps.html.in | 2 +-
docs/internals/rpc.html.in | 2 +-
docs/locking-sanlock.html.in | 2 +-
docs/news.xml | 2 +-
docs/storage.html.in | 2 +-
docs/support.html.in | 2 +-
16 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/docs/aclpolkit.html.in b/docs/aclpolkit.html.in
index 0e3c8e9..98d06da 100644
--- a/docs/aclpolkit.html.in
+++ b/docs/aclpolkit.html.in
@@ -396,7 +396,7 @@ polkit.addRule(function(action, subject) {
To achieve this we need to write a rule which checks
whether the <code>connect_driver</code> attribute
is <code>LXC</code> and the <code>domain_name</code>
- attribute is <code>demo</code>, and match on a action
+ attribute is <code>demo</code>, and match on action
name of <code>org.libvirt.api.domain.getattr</code>. Using
the javascript rules format, this ends up written as
</p>
diff --git a/docs/api.html.in b/docs/api.html.in
index 27abed6..288b9ec 100644
--- a/docs/api.html.in
+++ b/docs/api.html.in
@@ -155,7 +155,7 @@
</ul>
</li>
<li><b>Enumeration</b> [virConnectList..., virConnectNumOf...]
- <p>Used to enumerate a set of object available to an given
+ <p>Used to enumerate a set of object available to a given
hypervisor connection such as:</p>
<ul>
<li>
diff --git a/docs/contribute.html.in b/docs/contribute.html.in
index 158c91c..42a1b2f 100644
--- a/docs/contribute.html.in
+++ b/docs/contribute.html.in
@@ -80,7 +80,7 @@
and future growth of the project, that there are a people
who evangalise the work created by the project. This can
take many forms, writing blog posts (about usage of features,
- personal user experiances, areas for future work, and more),
+ personal user experiences, areas for future work, and more),
syndicating docs and blogs via social media, giving user
group and/or conference talks about libvirt.</li>
<li><strong>User assistance</strong>. Since documentation
diff --git a/docs/downloads.html.in b/docs/downloads.html.in
index 8cca203..2956a4f 100644
--- a/docs/downloads.html.in
+++ b/docs/downloads.html.in
@@ -457,7 +457,7 @@
(first release in the middle of Jan, then skip the Feb release), giving
a total of 11 releases a year. The Python and Perl modules will aim to
release at the same time as the core libvirt module. Other modules have
- independant ad-hoc releases with no fixed time schedle.
+ independent ad-hoc releases with no fixed time schedule.
</p>
<h2><a id="numbering">Release numbering</a></h2>
diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in
index 63260af..bde8298 100644
--- a/docs/drvbhyve.html.in
+++ b/docs/drvbhyve.html.in
@@ -239,7 +239,7 @@ to let a guest boot or start a guest using:</p>
<pre>start --console domname</pre>
-<p><b>NB:</b> An bootloader configured to require user interaction will prevent
+<p><b>NB:</b> A bootloader configured to require user interaction will prevent
the domain from starting (and thus <code>virsh console</code> or <code>start
--console</code> from functioning) until the user interacts with it manually on
the VM host. Because users typically do not have access to the VM host,
diff --git a/docs/drvesx.html.in b/docs/drvesx.html.in
index 417aca4..901d659 100644
--- a/docs/drvesx.html.in
+++ b/docs/drvesx.html.in
@@ -437,7 +437,7 @@ ethernet0.checkMACAddress = "false"
<dl>
<dt><code>auto</code></dt>
<dd>
- This isn't a actual controller model. If specified the ESX driver
+ This isn't an actual controller model. If specified the ESX driver
tries to detect the SCSI controller model referenced in the
<code>.vmdk</code> file and use it. Autodetection fails when a
SCSI controller has multiple disks attached and the SCSI controller
diff --git a/docs/drvlxc.html.in b/docs/drvlxc.html.in
index 44c4960..6ee9ee8 100644
--- a/docs/drvlxc.html.in
+++ b/docs/drvlxc.html.in
@@ -429,7 +429,7 @@ be considered secure against exploits of the host OS. The sVirt SELinux
driver provides a way to secure containers even when the "user" namespace
is not used. The cost is that writing a policy to allow execution of
arbitrary OS is not practical. The SELinux sVirt policy is typically
-tailored to work with an simpler application confinement use case,
+tailored to work with a simpler application confinement use case,
as provided by the "libvirt-sandbox" project.
</p>
diff --git a/docs/errors.html.in b/docs/errors.html.in
index 8f4f7d4..ea42728 100644
--- a/docs/errors.html.in
+++ b/docs/errors.html.in
@@ -29,7 +29,7 @@ set specifically to a connection with</p>
call it with the error information</li><li>otherwise call <a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>
which is the default error function of the library issuing the error
on stderr</li><li>save the error in the connection for later retrieval with <a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a></li></ol></li>
- <li>otherwise like when failing to create an hypervisor connection:
+ <li>otherwise like when failing to create a hypervisor connection:
<ol><li>if there is a global callback set with <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a>,
call it with the error information</li><li>otherwise call <a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>
which is the default error function of the library issuing the error
diff --git a/docs/firewall.html.in b/docs/firewall.html.in
index 11c3c81..0a50687 100644
--- a/docs/firewall.html.in
+++ b/docs/firewall.html.in
@@ -11,7 +11,7 @@
<ul>
<li>The virtual network driver
<br /><br />
- This provides a isolated bridge device (ie no physical NICs
+ This provides an isolated bridge device (ie no physical NICs
enslaved). Guest TAP devices are attached to this bridge.
Guests can talk to each other and the host, and optionally the
wider world.
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 8e864f7..b65fea0 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -622,7 +622,7 @@
<code>order</code> allows to specify the order to add the online vcpus.
For hypervisors/platforms that require to insert multiple vcpus at once
- the order may be duplicated accross all vcpus that need to be
+ the order may be duplicated across all vcpus that need to be
enabled at once. Specifying order is not necessary, vcpus are then
added in an arbitrary order. If order info is used, it must be used for
all online vcpus. Hypervisors may clear or update ordering information
@@ -4058,7 +4058,7 @@
pcie-switch-upstream-port, and of course for this to work
properly, you will need to decrease the pcie-expander-bus'
busNr accordingly so that there are enough unused bus
- numbers above it to accomodate giving out one bus number for
+ numbers above it to accommodate giving out one bus number for
the upstream-port and one for each downstream-port (in
addition to the pcie-root-port and the pcie-expander-bus
itself).
@@ -4212,7 +4212,7 @@
<dd>This is the fully qualified path of the file associated
with the lockspace. The offset specifies where the lease
is stored within the file. If the lock manager does not
- require a offset, just pass 0.
+ require an offset, just pass 0.
</dd>
</dl>
@@ -4867,7 +4867,7 @@
(<span class="since">Since 0.10.0</span>). For example, in order
to work properly with both an 802.1Qbh switch and an Open vSwitch
switch, you may choose to specify no type, but both
- an <code>profileid</code> (in case the switch is 802.1Qbh) and
+ a <code>profileid</code> (in case the switch is 802.1Qbh) and
an <code>interfaceid</code> (in case the switch is Open vSwitch)
(you may also omit the other attributes, such as managerid,
typeid, or profileid, to be filled in from the
@@ -6174,7 +6174,7 @@ qemu-kvm -net nic,model=? /dev/null
set to an empty string, then VNC access is disabled. The
<code>keymap</code> attribute specifies the keymap to use. It is
possible to set a limit on the validity of the password by giving
- an timestamp <code>passwdValidTo='2010-04-09T15:51:00'</code>
+ a timestamp <code>passwdValidTo='2010-04-09T15:51:00'</code>
assumed to be in UTC. The <code>connected</code> attribute allows
control of connected client during password changes. VNC accepts
<code>keep</code> value only <span class="since">since 0.9.3</span>.
@@ -6216,7 +6216,7 @@ qemu-kvm -net nic,model=? /dev/null
<code>passwd</code> attribute is set to an empty string, then
SPICE access is disabled. The <code>keymap</code> attribute
specifies the keymap to use. It is possible to set a limit on
- the validity of the password by giving an timestamp
+ the validity of the password by giving a timestamp
<code>passwdValidTo='2010-04-09T15:51:00'</code> assumed to be
in UTC.
</p>
diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
index 6bfcaf6..027e115 100644
--- a/docs/formatdomaincaps.html.in
+++ b/docs/formatdomaincaps.html.in
@@ -81,7 +81,7 @@
<h3><a id="elementsCPUAllocation">CPU Allocation</a></h3>
- <p>Before any devices capability occurs, there might be a info on domain
+ <p>Before any devices capability occurs, there might be info on domain
wide capabilities, e.g. virtual CPUs:</p>
<pre>
diff --git a/docs/internals/rpc.html.in b/docs/internals/rpc.html.in
index fca9cb7..048192f 100644
--- a/docs/internals/rpc.html.in
+++ b/docs/internals/rpc.html.in
@@ -133,7 +133,7 @@
</dd>
<dt><code>serial</code></dt>
<dd>
- This is an number that starts from 1 and increases
+ This is a number that starts from 1 and increases
each time a method call packet is sent. A reply or
stream packet will have a serial number matching the
original method call packet serial. Events always
diff --git a/docs/locking-sanlock.html.in b/docs/locking-sanlock.html.in
index 9b36561..3ee9849 100644
--- a/docs/locking-sanlock.html.in
+++ b/docs/locking-sanlock.html.in
@@ -76,7 +76,7 @@ SANLOCKOPTS="-w 0"
configuration file for each libvirt driver that is using
sanlock. For QEMU, we will edit <code>/etc/libvirt/qemu-sanlock.conf</code>
There is one mandatory parameter that needs to be set,
- the <code>host_id</code>. This is a integer between
+ the <code>host_id</code>. This is an integer between
1 and 2000, which must be set to a <strong>unique</strong>
value on each host running virtual machines.
</p>
diff --git a/docs/news.xml b/docs/news.xml
index d67d5a7..8018141 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -1206,7 +1206,7 @@
<description>
The <code>vgaconf</code> attribute was added to <code>video</code>'s
<code>driver</code> element. Possible values are: <code>on</code>,
- <code>off</code>, and <code>io</code>. It controlls the way how
+ <code>off</code>, and <code>io</code>. It controls the way how
bhyve exposes video devices to its guests; various guest OSes might
require different settings to boot properly.
</description>
diff --git a/docs/storage.html.in b/docs/storage.html.in
index 3f1aec1..1906aa6 100644
--- a/docs/storage.html.in
+++ b/docs/storage.html.in
@@ -759,7 +759,7 @@
This provides a pool based on Virtuozzo storage. Virtuozzo Storage is
a highly available distributed software-defined storage with built-in
replication and disaster recovery. More detailed information about
- Virtuozzo storage and its managment can be found here:
+ Virtuozzo storage and its management can be found here:
<a href="https://openvz.org/Virtuozzo_Storage">Virtuozzo Storage</a>).
</p>
diff --git a/docs/support.html.in b/docs/support.html.in
index 1a9438f..38f2f90 100644
--- a/docs/support.html.in
+++ b/docs/support.html.in
@@ -199,7 +199,7 @@
return an error indicating it is not supported. Likewise libvirt will
make reasonable efforts to keep API calls working across hypervisor
releases even if the underlying implementation changes. In cases where
- this is impossible, an suitable error will be reported. The list of
+ this is impossible, a suitable error will be reported. The list of
APIs which have implementations <a href="hvsupport.html">is detailed separately</a>.
</p>
--
2.14.1
6 years, 6 months
[libvirt] [PATCH v2 REBASE] lib: provide error message in new blockjob event
by Nikolay Shirokovskiy
If block job is completed with error qemu additionally
provides error message. This patch introduces new event
VIR_DOMAIN_EVENT_ID_BLOCK_JOB_ERROR to pass error message to client.
This error message has no semantics and should not be interpreted.
API and RPC layer also have reserved 'code' field to pass semantics
loaded error code value in the future.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
Diff from v1 [1]:
- replace block job event version 3 with block job error event
- add code field to API/RPC to pass error code in the future
Peter, I decided not to use enum/union as this looks like to much effort to extend
code generation for this simple case. Using typed params looks unsuitable too.
[1] https://www.redhat.com/archives/libvir-list/2017-October/msg01369.html
examples/object-events/event-test.c | 20 ++++++++
include/libvirt/libvirt-domain.h | 25 ++++++++++
src/conf/domain_event.c | 92 +++++++++++++++++++++++++++++++++++++
src/conf/domain_event.h | 13 ++++++
src/libvirt_private.syms | 2 +
src/qemu/qemu_blockjob.c | 10 +++-
src/qemu/qemu_blockjob.h | 3 +-
src/qemu/qemu_domain.c | 4 +-
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_driver.c | 9 ++--
src/qemu/qemu_process.c | 1 +
src/remote/remote_daemon_dispatch.c | 48 +++++++++++++++++++
src/remote/remote_driver.c | 34 ++++++++++++++
src/remote/remote_protocol.x | 17 ++++++-
src/remote_protocol-structs | 9 ++++
tools/virsh-domain.c | 24 ++++++++++
16 files changed, 304 insertions(+), 8 deletions(-)
diff --git a/examples/object-events/event-test.c b/examples/object-events/event-test.c
index 8499e0b..23d5a3f 100644
--- a/examples/object-events/event-test.c
+++ b/examples/object-events/event-test.c
@@ -936,6 +936,25 @@ myDomainEventBlockJobCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
static int
+myDomainEventBlockJobErrorCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
+ virDomainPtr dom,
+ const char *dev,
+ int type,
+ unsigned int code,
+ const char *message,
+ void *opaque)
+{
+ const char *eventName = opaque;
+
+ printf("%s EVENT: Domain %s(%d) block job error callback '%s' disk '%s', "
+ "type '%s' code '%u' message '%s'",
+ __func__, virDomainGetName(dom), virDomainGetID(dom), eventName,
+ dev, blockJobTypeToStr(type), code, NULLSTR(message));
+ return 0;
+}
+
+
+static int
myDomainEventBlockThresholdCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
virDomainPtr dom,
const char *dev,
@@ -1082,6 +1101,7 @@ struct domainEventData domainEvents[] = {
DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED, myDomainEventDeviceRemovalFailedCallback),
DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_METADATA_CHANGE, myDomainEventMetadataChangeCallback),
DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD, myDomainEventBlockThresholdCallback),
+ DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_BLOCK_JOB_ERROR, myDomainEventBlockJobErrorCallback),
};
struct storagePoolEventData {
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 12fd340..ee55ab9 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -4370,6 +4370,30 @@ typedef void (*virConnectDomainEventBlockThresholdCallback)(virConnectPtr conn,
unsigned long long excess,
void *opaque);
+
+/**
+ * virConnectDomainEventBlockJobErrorCallback:
+ * @conn: connection object
+ * @dom: domain on which the event occurred
+ * @dev: name associated with the affected disk or storage backing chain
+ * element
+ * @type: type of block job (virDomainBlockJobType)
+ * @code: always 0, reserved for future use
+ * @message: error message with no semantics, can be NULL
+ * @opaque: application specified data
+ *
+ * The callback occurs when block job is completed with error and provides
+ * error message in @message.
+ *
+ */
+typedef void (*virConnectDomainEventBlockJobErrorCallback)(virConnectPtr conn,
+ virDomainPtr dom,
+ const char *dev,
+ int type,
+ unsigned int code,
+ const char *message,
+ void *opaque);
+
/**
* VIR_DOMAIN_EVENT_CALLBACK:
*
@@ -4412,6 +4436,7 @@ typedef enum {
VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED = 22, /* virConnectDomainEventDeviceRemovalFailedCallback */
VIR_DOMAIN_EVENT_ID_METADATA_CHANGE = 23, /* virConnectDomainEventMetadataChangeCallback */
VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD = 24, /* virConnectDomainEventBlockThresholdCallback */
+ VIR_DOMAIN_EVENT_ID_BLOCK_JOB_ERROR = 25, /* virConnectDomainEventBlockJobErrorCallback */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_ID_LAST
diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index 9752070..54f4cf4 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -47,6 +47,7 @@ static virClassPtr virDomainEventWatchdogClass;
static virClassPtr virDomainEventIOErrorClass;
static virClassPtr virDomainEventGraphicsClass;
static virClassPtr virDomainEventBlockJobClass;
+static virClassPtr virDomainEventBlockJobErrorClass;
static virClassPtr virDomainEventDiskChangeClass;
static virClassPtr virDomainEventTrayChangeClass;
static virClassPtr virDomainEventBalloonChangeClass;
@@ -69,6 +70,7 @@ static void virDomainEventWatchdogDispose(void *obj);
static void virDomainEventIOErrorDispose(void *obj);
static void virDomainEventGraphicsDispose(void *obj);
static void virDomainEventBlockJobDispose(void *obj);
+static void virDomainEventBlockJobErrorDispose(void *obj);
static void virDomainEventDiskChangeDispose(void *obj);
static void virDomainEventTrayChangeDispose(void *obj);
static void virDomainEventBalloonChangeDispose(void *obj);
@@ -151,6 +153,17 @@ struct _virDomainEventBlockJob {
typedef struct _virDomainEventBlockJob virDomainEventBlockJob;
typedef virDomainEventBlockJob *virDomainEventBlockJobPtr;
+struct _virDomainEventBlockJobError {
+ virDomainEvent parent;
+
+ char *dev;
+ int type;
+ unsigned int code;
+ char *message;
+};
+typedef struct _virDomainEventBlockJobError virDomainEventBlockJobError;
+typedef virDomainEventBlockJobError *virDomainEventBlockJobErrorPtr;
+
struct _virDomainEventGraphics {
virDomainEvent parent;
@@ -309,6 +322,8 @@ virDomainEventsOnceInit(void)
return -1;
if (!VIR_CLASS_NEW(virDomainEventBlockJob, virDomainEventClass))
return -1;
+ if (!VIR_CLASS_NEW(virDomainEventBlockJobError, virDomainEventClass))
+ return -1;
if (!VIR_CLASS_NEW(virDomainEventDiskChange, virDomainEventClass))
return -1;
if (!VIR_CLASS_NEW(virDomainEventTrayChange, virDomainEventClass))
@@ -420,6 +435,16 @@ virDomainEventBlockJobDispose(void *obj)
}
static void
+virDomainEventBlockJobErrorDispose(void *obj)
+{
+ virDomainEventBlockJobErrorPtr event = obj;
+ VIR_DEBUG("obj=%p", event);
+
+ VIR_FREE(event->dev);
+ VIR_FREE(event->message);
+}
+
+static void
virDomainEventDiskChangeDispose(void *obj)
{
virDomainEventDiskChangePtr event = obj;
@@ -977,6 +1002,59 @@ virDomainEventBlockJob2NewFromDom(virDomainPtr dom,
dst, type, status);
}
+static virObjectEventPtr
+virDomainEventBlockJobErrorNew(int id,
+ const char *name,
+ unsigned char *uuid,
+ const char *dev,
+ int type,
+ unsigned int code,
+ const char *message)
+{
+ virDomainEventBlockJobErrorPtr ev;
+
+ if (virDomainEventsInitialize() < 0)
+ return NULL;
+
+ if (!(ev = virDomainEventNew(virDomainEventBlockJobErrorClass,
+ VIR_DOMAIN_EVENT_ID_BLOCK_JOB_ERROR,
+ id, name, uuid)))
+ return NULL;
+
+ if (VIR_STRDUP(ev->dev, dev) < 0) {
+ virObjectUnref(ev);
+ return NULL;
+ }
+ ignore_value(VIR_STRDUP_QUIET(ev->message, message));
+ ev->type = type;
+ ev->code = code;
+
+ return (virObjectEventPtr)ev;
+}
+
+virObjectEventPtr
+virDomainEventBlockJobErrorNewFromObj(virDomainObjPtr obj,
+ const char *dev,
+ int type,
+ unsigned int code,
+ const char *message)
+{
+ return virDomainEventBlockJobErrorNew(obj->def->id, obj->def->name,
+ obj->def->uuid, dev, type, code,
+ message);
+}
+
+virObjectEventPtr
+virDomainEventBlockJobErrorNewFromDom(virDomainPtr dom,
+ const char *dev,
+ int type,
+ unsigned int code,
+ const char *message)
+{
+ return virDomainEventBlockJobErrorNew(dom->id, dom->name, dom->uuid,
+ dev, type, code, message);
+}
+
virObjectEventPtr
virDomainEventControlErrorNewFromDom(virDomainPtr dom)
{
@@ -1787,6 +1865,20 @@ virDomainEventDispatchDefaultFunc(virConnectPtr conn,
goto cleanup;
}
+ case VIR_DOMAIN_EVENT_ID_BLOCK_JOB_ERROR:
+ {
+ virDomainEventBlockJobErrorPtr blockJobErrorEvent;
+
+ blockJobErrorEvent = (virDomainEventBlockJobErrorPtr)event;
+ ((virConnectDomainEventBlockJobErrorCallback)cb)(conn, dom,
+ blockJobErrorEvent->dev,
+ blockJobErrorEvent->type,
+ blockJobErrorEvent->code,
+ blockJobErrorEvent->message,
+ cbopaque);
+ goto cleanup;
+ }
+
case VIR_DOMAIN_EVENT_ID_DISK_CHANGE:
{
virDomainEventDiskChangePtr diskChangeEvent;
diff --git a/src/conf/domain_event.h b/src/conf/domain_event.h
index 3992a29..456026c 100644
--- a/src/conf/domain_event.h
+++ b/src/conf/domain_event.h
@@ -138,6 +138,19 @@ virDomainEventBlockJob2NewFromDom(virDomainPtr dom,
int status);
virObjectEventPtr
+virDomainEventBlockJobErrorNewFromObj(virDomainObjPtr obj,
+ const char *dev,
+ int type,
+ unsigned int code,
+ const char *message);
+virObjectEventPtr
+virDomainEventBlockJobErrorNewFromDom(virDomainPtr dom,
+ const char *dev,
+ int type,
+ unsigned int code,
+ const char *message);
+
+virObjectEventPtr
virDomainEventDiskChangeNewFromObj(virDomainObjPtr obj,
const char *oldSrcPath,
const char *newSrcPath,
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index b31f599..303f28c 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -589,6 +589,8 @@ virDomainEventBalloonChangeNewFromDom;
virDomainEventBalloonChangeNewFromObj;
virDomainEventBlockJob2NewFromDom;
virDomainEventBlockJob2NewFromObj;
+virDomainEventBlockJobErrorNewFromDom;
+virDomainEventBlockJobErrorNewFromObj;
virDomainEventBlockJobNewFromDom;
virDomainEventBlockJobNewFromObj;
virDomainEventBlockThresholdNewFromDom;
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 617e4ee..4df4ed6 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -70,7 +70,8 @@ qemuBlockJobUpdate(virQEMUDriverPtr driver,
if (status != -1) {
qemuBlockJobEventProcess(driver, vm, disk, asyncJob,
diskPriv->blockJobType,
- diskPriv->blockJobStatus);
+ diskPriv->blockJobStatus,
+ diskPriv->blockJobError);
diskPriv->blockJobStatus = -1;
if (error)
VIR_STEAL_PTR(*error, diskPriv->blockJobError);
@@ -100,10 +101,12 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
virDomainDiskDefPtr disk,
qemuDomainAsyncJob asyncJob,
int type,
- int status)
+ int status,
+ const char *error)
{
virObjectEventPtr event = NULL;
virObjectEventPtr event2 = NULL;
+ virObjectEventPtr errorEvent = NULL;
const char *path;
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
virDomainDiskDefPtr persistDisk = NULL;
@@ -123,6 +126,8 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
path = virDomainDiskGetSource(disk);
event = virDomainEventBlockJobNewFromObj(vm, path, type, status);
event2 = virDomainEventBlockJob2NewFromObj(vm, disk->dst, type, status);
+ if (error)
+ errorEvent = virDomainEventBlockJobErrorNewFromObj(vm, disk->dst, type, 0, error);
/* If we completed a block pull or commit, then update the XML
* to match. */
@@ -213,6 +218,7 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
qemuDomainEventQueue(driver, event);
qemuDomainEventQueue(driver, event2);
+ qemuDomainEventQueue(driver, errorEvent);
virObjectUnref(cfg);
}
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index e71d691..18bcaaa 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -36,7 +36,8 @@ void qemuBlockJobEventProcess(virQEMUDriverPtr driver,
virDomainDiskDefPtr disk,
qemuDomainAsyncJob asyncJob,
int type,
- int status);
+ int status,
+ const char *error);
void qemuBlockJobSyncBegin(virDomainDiskDefPtr disk);
void qemuBlockJobSyncEnd(virQEMUDriverPtr driver,
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index e2a8450..883652d 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -11951,12 +11951,14 @@ qemuProcessEventFree(struct qemuProcessEvent *event)
case QEMU_PROCESS_EVENT_GUESTPANIC:
qemuMonitorEventPanicInfoFree(event->data);
break;
+ case QEMU_PROCESS_EVENT_MONITOR_EOF:
+ VIR_FREE(event->error);
+ ATTRIBUTE_FALLTHROUGH;
case QEMU_PROCESS_EVENT_WATCHDOG:
case QEMU_PROCESS_EVENT_DEVICE_DELETED:
case QEMU_PROCESS_EVENT_NIC_RX_FILTER_CHANGED:
case QEMU_PROCESS_EVENT_SERIAL_CHANGED:
case QEMU_PROCESS_EVENT_BLOCK_JOB:
- case QEMU_PROCESS_EVENT_MONITOR_EOF:
VIR_FREE(event->data);
break;
case QEMU_PROCESS_EVENT_LAST:
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 2c27dfb..f3b262f 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -456,6 +456,7 @@ struct qemuProcessEvent {
int action;
int status;
void *data;
+ char *error;
};
void qemuProcessEventFree(struct qemuProcessEvent *event);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5673d9f..cefbe52 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4748,7 +4748,8 @@ processBlockJobEvent(virQEMUDriverPtr driver,
virDomainObjPtr vm,
const char *diskAlias,
int type,
- int status)
+ int status,
+ char *error)
{
virDomainDiskDefPtr disk;
@@ -4761,7 +4762,8 @@ processBlockJobEvent(virQEMUDriverPtr driver,
}
if ((disk = qemuProcessFindDomainDiskByAlias(vm, diskAlias)))
- qemuBlockJobEventProcess(driver, vm, disk, QEMU_ASYNC_JOB_NONE, type, status);
+ qemuBlockJobEventProcess(driver, vm, disk, QEMU_ASYNC_JOB_NONE,
+ type, status, error);
endjob:
qemuDomainObjEndJob(driver, vm);
@@ -4846,7 +4848,8 @@ static void qemuProcessEventHandler(void *data, void *opaque)
processBlockJobEvent(driver, vm,
processEvent->data,
processEvent->action,
- processEvent->status);
+ processEvent->status,
+ processEvent->error);
break;
case QEMU_PROCESS_EVENT_MONITOR_EOF:
processMonitorEOFEvent(driver, vm);
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 6a5262a..12b156f 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1026,6 +1026,7 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
processEvent->vm = virObjectRef(vm);
processEvent->action = type;
processEvent->status = status;
+ ignore_value(VIR_STRDUP_QUIET(processEvent->error, error));
if (virThreadPoolSendJob(driver->workerPool, 0, processEvent) < 0) {
ignore_value(virObjectUnref(vm));
diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index a8a5932..07c9dbb 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -1342,6 +1342,53 @@ remoteRelayDomainEventBlockThreshold(virConnectPtr conn,
}
+static int
+remoteRelayDomainEventBlockJobError(virConnectPtr conn,
+ virDomainPtr dom,
+ const char *dev,
+ int type,
+ unsigned int code,
+ const char *message,
+ void *opaque)
+{
+ daemonClientEventCallbackPtr callback = opaque;
+ remote_domain_event_block_job_error_msg msg;
+
+ if (callback->callbackID < 0 ||
+ !remoteRelayDomainEventCheckACL(callback->client, conn, dom))
+ return -1;
+
+ VIR_DEBUG("Relaying domain block job error event %s %d %s %i %u %s, callback %d",
+ dom->name, dom->id, dev, type, code, NULLSTR(message),
+ callback->callbackID);
+
+ memset(&msg, 0, sizeof(msg));
+ msg.callbackID = callback->callbackID;
+ if (VIR_STRDUP(msg.dev, dev) < 0)
+ return -1;
+ if (message) {
+ if (VIR_ALLOC(msg.message) < 0 ||
+ VIR_STRDUP(*(msg.message), message) < 0)
+ goto error;
+ }
+ msg.type = type;
+ msg.code = code;
+ make_nonnull_domain(&msg.dom, dom);
+
+ remoteDispatchObjectEventSend(callback->client, remoteProgram,
+ REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_ERROR,
+ (xdrproc_t)xdr_remote_domain_event_block_job_error_msg,
+ &msg);
+ return 0;
+
+ error:
+ VIR_FREE(msg.dev);
+ VIR_FREE(msg.message);
+
+ return -1;
+}
+
+
static virConnectDomainEventGenericCallback domainEventCallbacks[] = {
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventLifecycle),
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventReboot),
@@ -1368,6 +1415,7 @@ static virConnectDomainEventGenericCallback domainEventCallbacks[] = {
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventDeviceRemovalFailed),
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventMetadataChange),
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventBlockThreshold),
+ VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventBlockJobError),
};
verify(ARRAY_CARDINALITY(domainEventCallbacks) == VIR_DOMAIN_EVENT_ID_LAST);
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index d3b588c..0d30bf3 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -405,6 +405,11 @@ remoteConnectNotifyEventConnectionClosed(virNetClientProgramPtr prog ATTRIBUTE_U
virNetClientPtr client ATTRIBUTE_UNUSED,
void *evdata, void *opaque);
+static void
+remoteDomainBuildEventBlockJobError(virNetClientProgramPtr prog,
+ virNetClientPtr client,
+ void *evdata, void *opaque);
+
static virNetClientProgramEvent remoteEvents[] = {
{ REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE,
remoteDomainBuildEventLifecycle,
@@ -611,6 +616,10 @@ static virNetClientProgramEvent remoteEvents[] = {
remoteDomainBuildEventBlockThreshold,
sizeof(remote_domain_event_block_threshold_msg),
(xdrproc_t)xdr_remote_domain_event_block_threshold_msg },
+ { REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_ERROR,
+ remoteDomainBuildEventBlockJobError,
+ sizeof(remote_domain_event_block_job_error_msg),
+ (xdrproc_t)xdr_remote_domain_event_block_job_error_msg },
};
static void
@@ -5533,6 +5542,31 @@ remoteDomainBuildEventBlockThreshold(virNetClientProgramPtr prog ATTRIBUTE_UNUSE
}
+static void
+remoteDomainBuildEventBlockJobError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
+ virNetClientPtr client ATTRIBUTE_UNUSED,
+ void *evdata, void *opaque)
+{
+ virConnectPtr conn = opaque;
+ remote_domain_event_block_job_error_msg *msg = evdata;
+ struct private_data *priv = conn->privateData;
+ virDomainPtr dom;
+ virObjectEventPtr event = NULL;
+
+ dom = get_nonnull_domain(conn, msg->dom);
+ if (!dom)
+ return;
+
+ event = virDomainEventBlockJobErrorNewFromDom(dom, msg->dev, msg->type,
+ msg->code,
+ msg->message ? *msg->message : NULL);
+
+ virObjectUnref(dom);
+
+ remoteEventQueue(priv, event, msg->callbackID);
+}
+
+
static int
remoteStreamSend(virStreamPtr st,
const char *data,
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 296a087..051a773 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -3103,6 +3103,15 @@ struct remote_domain_event_block_job_2_msg {
int status;
};
+struct remote_domain_event_block_job_error_msg {
+ int callbackID;
+ remote_nonnull_domain dom;
+ remote_nonnull_string dev;
+ int type;
+ int code;
+ remote_string message;
+};
+
struct remote_domain_event_block_threshold_msg {
int callbackID;
remote_nonnull_domain dom;
@@ -6135,5 +6144,11 @@ enum remote_procedure {
* @priority: high
* @acl: storage_pool:getattr
*/
- REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH = 391
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH = 391,
+
+ /**
+ * @generate: none
+ * @acl: none
+ */
+ REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_ERROR = 392
};
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index fe163db..567f307 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -2541,6 +2541,14 @@ struct remote_domain_event_block_job_2_msg {
int type;
int status;
};
+struct remote_domain_event_block_job_error_msg {
+ int callbackID;
+ remote_nonnull_domain dom;
+ remote_nonnull_string dev;
+ int type;
+ int code;
+ remote_string message;
+};
struct remote_domain_event_block_threshold_msg {
int callbackID;
remote_nonnull_domain dom;
@@ -3269,4 +3277,5 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_MANAGED_SAVE_DEFINE_XML = 389,
REMOTE_PROC_DOMAIN_SET_LIFECYCLE_ACTION = 390,
REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH = 391,
+ REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_ERROR = 392,
};
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 2b775fc..40d3c82 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -13286,6 +13286,28 @@ virshEventBlockThresholdPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
+static void
+virshEventBlockJobErrorPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
+ virDomainPtr dom,
+ const char *dev,
+ int type,
+ unsigned int code ATTRIBUTE_UNUSED,
+ const char *message,
+ void *opaque)
+{
+ virBuffer buf = VIR_BUFFER_INITIALIZER;
+
+ virBufferAsprintf(&buf, _("event '%s' for domain %s: %s for %s, "
+ "error: %s\n"),
+ ((virshDomEventData *) opaque)->cb->name,
+ virDomainGetName(dom),
+ virshDomainBlockJobToString(type),
+ dev,
+ NULLSTR(message));
+ virshEventPrint(opaque, &buf);
+}
+
+
static vshEventCallback vshEventCallbacks[] = {
{ "lifecycle",
VIR_DOMAIN_EVENT_CALLBACK(virshEventLifecyclePrint), },
@@ -13335,6 +13357,8 @@ static vshEventCallback vshEventCallbacks[] = {
VIR_DOMAIN_EVENT_CALLBACK(virshEventMetadataChangePrint), },
{ "block-threshold",
VIR_DOMAIN_EVENT_CALLBACK(virshEventBlockThresholdPrint), },
+ { "block-job-error",
+ VIR_DOMAIN_EVENT_CALLBACK(virshEventBlockJobErrorPrint), },
};
verify(VIR_DOMAIN_EVENT_ID_LAST == ARRAY_CARDINALITY(vshEventCallbacks));
--
1.8.3.1
6 years, 6 months
[libvirt] [PATCH] news: Mention changes TLS non-shared-storage migration
by Peter Krempa
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/news.xml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index caeda159a8..af57751e0c 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -157,6 +157,18 @@
</change>
</section>
<section title="Bug fixes">
+ <change>
+ <summary>
+ qemu: TLS migration now enforces use of TLS for the NBD connection
+ </summary>
+ <description>
+ When the VIR_MIGRATE_TLS flag was used with the migration API libvirt
+ did not ensure that the NBD connection was using TLS as well. The code
+ now rejects such migration as the TLS transport for NBD is not ready
+ yet, but prevents a false sense of security that TLS would be used.
+ The support TLS for NBD will be added soon.
+ </description>
+ </change>
</section>
</release>
<release version="v4.1.0" date="2018-03-05">
--
2.16.2
6 years, 6 months
[libvirt] [PATCH 00/35] qemu: Add formatting of JSON objects for -blockdev (blockdev-add saga)
by Peter Krempa
Diff to the RFC posting:
- host_device and host_cdrom handling was added
- modified code to format and parse node-names to status XML so that we
can add other node names easier (for quorum, throttling, etc)
- added test case for host_device
Kevin, please sanity check the outputs whether they make sense. Thanks.
Peter Krempa (35):
storage: Properly track that backing chain members are readonly
qemu: domain: Format storage source node names into private data
util: storage: Add shadow copies of few disk properties to
virStorageSource
qemu: domain: Carefuly transfer configuration from disk to storage
source
qemu: block: Extract formatting of props for 'file' backend
qemu: block: Handle iomode property for json 'file' driver
utils: storage: Mark that a virStorageSource is going to be used as a
floppy
qemu: Move virtual FAT disk validation from command line builder
qemu: block: Add support for accessing directories via the 'vvfat'
driver
util: file: Use only one #ifdef for __linux__
util: file: Add helper to determine whether a path is a CDROM
qemu: domain: Store whether a virStorageSource is a host CDROM drive
qemu: block: Properly handle block storage in JSON generator
qemu: block: Propagate 'legacy' parameter when formatting disk backing
qemu: block: Validate node-names for use with qemu
qemu: block: Format cache modes for disk storage backends
qemu: block: Format 'read-only' attribute for JSON disk protocol
qemu: block: Always set discard for storage nodes
qemu: block: Add support for creating 'format' layer for blockdev-add
tests: qemublock: Rename variables in anticipation of new tests
tests: Makefile: Sanitize entry for qemublocktest
qemu: domain: Export qemuDomainDeviceDefValidateDisk
qemu: domain: Tolerate NULL 'cfg' in qemuDomainPrepareDiskSourceChain
tests: qemublock: Add testing of blockdev JSON property generator
tests: qemublock: Add basic 'raw' file test
tests: qemublock: Add tests for all other format without special
options
tests: qemublock: Add tests for basic backing chain formats
tests: qemublock: Add test-case for the 'vvfat' driver in qemu
tests: qemublock: Add test cases for 'aio' options of 'file' storage
tests: qemublock: Add test for raw luks disk format
tests: qemublock: basic qcow2 tests
tests: qemublock: Add test combining authentication and encryption
tests: qemublock: Test handling of 'unmap' and 'detect-zeroes' options
tests: qemublock: Test handling of all cache modes
tests: qemublock: Test handling of block devices
src/conf/domain_conf.c | 3 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_block.c | 430 ++++++++++++++++++++-
src/qemu/qemu_block.h | 6 +-
src/qemu/qemu_command.c | 16 +-
src/qemu/qemu_domain.c | 61 ++-
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_driver.c | 3 +
src/util/virfile.c | 61 ++-
src/util/virfile.h | 2 +
src/util/virstoragefile.c | 5 +
src/util/virstoragefile.h | 13 +
tests/Makefile.am | 11 +-
tests/qemublocktest.c | 314 ++++++++++++++-
.../xml2json/block-raw-noopts.json | 12 +
.../xml2json/block-raw-noopts.xml | 12 +
.../qemublocktestdata/xml2json/dir-fat-cache.json | 22 ++
tests/qemublocktestdata/xml2json/dir-fat-cache.xml | 13 +
.../qemublocktestdata/xml2json/dir-fat-floppy.json | 14 +
.../qemublocktestdata/xml2json/dir-fat-floppy.xml | 14 +
.../xml2json/dir-fat-readonly.json | 14 +
.../xml2json/dir-fat-readonly.xml | 13 +
.../xml2json/file-backing_basic-aio_threads.json | 62 +++
.../xml2json/file-backing_basic-aio_threads.xml | 47 +++
.../file-backing_basic-cache-directsync.json | 91 +++++
.../file-backing_basic-cache-directsync.xml | 47 +++
.../xml2json/file-backing_basic-cache-none.json | 91 +++++
.../xml2json/file-backing_basic-cache-none.xml | 47 +++
.../xml2json/file-backing_basic-cache-unsafe.json | 91 +++++
.../xml2json/file-backing_basic-cache-unsafe.xml | 47 +++
.../file-backing_basic-cache-writeback.json | 91 +++++
.../file-backing_basic-cache-writeback.xml | 47 +++
.../file-backing_basic-cache-writethrough.json | 91 +++++
.../file-backing_basic-cache-writethrough.xml | 47 +++
.../xml2json/file-backing_basic-detect.json | 60 +++
.../xml2json/file-backing_basic-detect.xml | 47 +++
.../xml2json/file-backing_basic-noopts.json | 51 +++
.../xml2json/file-backing_basic-noopts.xml | 46 +++
.../xml2json/file-backing_basic-unmap-detect.json | 64 +++
.../xml2json/file-backing_basic-unmap-detect.xml | 47 +++
.../xml2json/file-backing_basic-unmap-discard.json | 0
.../xml2json/file-backing_basic-unmap-ignore.json | 64 +++
.../xml2json/file-backing_basic-unmap-ignore.xml | 47 +++
.../xml2json/file-backing_basic-unmap.json | 63 +++
.../xml2json/file-backing_basic-unmap.xml | 47 +++
.../xml2json/file-bochs-noopts.json | 12 +
.../xml2json/file-bochs-noopts.xml | 12 +
.../xml2json/file-cloop-noopts.json | 12 +
.../xml2json/file-cloop-noopts.xml | 12 +
.../xml2json/file-dmg-noopts.json | 12 +
.../qemublocktestdata/xml2json/file-dmg-noopts.xml | 12 +
.../xml2json/file-ploop-noopts.json | 12 +
.../xml2json/file-ploop-noopts.xml | 12 +
.../file-qcow2-backing-chain-encryption.json | 34 ++
.../file-qcow2-backing-chain-encryption.xml | 31 ++
.../xml2json/file-qcow2-backing-chain-noopts.json | 130 +++++++
.../xml2json/file-qcow2-backing-chain-noopts.xml | 113 ++++++
.../file-qcow2-backing-chain-unterminated.json | 25 ++
.../file-qcow2-backing-chain-unterminated.xml | 24 ++
.../xml2json/file-raw-aio_native.json | 21 +
.../xml2json/file-raw-aio_native.xml | 12 +
.../qemublocktestdata/xml2json/file-raw-luks.json | 13 +
tests/qemublocktestdata/xml2json/file-raw-luks.xml | 15 +
.../xml2json/file-raw-noopts.json | 12 +
.../qemublocktestdata/xml2json/file-raw-noopts.xml | 12 +
.../xml2json/file-vdi-noopts.json | 12 +
.../qemublocktestdata/xml2json/file-vdi-noopts.xml | 12 +
.../xml2json/file-vhd-noopts.json | 12 +
.../qemublocktestdata/xml2json/file-vhd-noopts.xml | 12 +
.../xml2json/file-vpc-noopts.json | 12 +
.../qemublocktestdata/xml2json/file-vpc-noopts.xml | 12 +
.../network-qcow2-backing-chain-cache-unsafe.json | 57 +++
.../network-qcow2-backing-chain-cache-unsafe.xml | 31 ++
...etwork-qcow2-backing-chain-encryption_auth.json | 51 +++
...network-qcow2-backing-chain-encryption_auth.xml | 40 ++
.../xml2json/nodename-long-format.xml | 12 +
.../xml2json/nodename-long-protocol.xml | 12 +
tests/qemustatusxml2xmldata/modern-in.xml | 4 +
78 files changed, 3155 insertions(+), 40 deletions(-)
create mode 100644 tests/qemublocktestdata/xml2json/block-raw-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/block-raw-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-cache.json
create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-cache.xml
create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-floppy.json
create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-floppy.xml
create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-readonly.json
create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-readonly.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-none.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-none.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-detect.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-detect.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-discard.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-bochs-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/file-bochs-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-cloop-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/file-cloop-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-dmg-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/file-dmg-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-ploop-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/file-ploop-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption.json
create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated.json
create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-raw-aio_native.json
create mode 100644 tests/qemublocktestdata/xml2json/file-raw-aio_native.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-raw-luks.json
create mode 100644 tests/qemublocktestdata/xml2json/file-raw-luks.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-raw-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/file-raw-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-vdi-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/file-vdi-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-vhd-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/file-vhd-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/file-vpc-noopts.json
create mode 100644 tests/qemublocktestdata/xml2json/file-vpc-noopts.xml
create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe.json
create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe.xml
create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth.json
create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth.xml
create mode 100644 tests/qemublocktestdata/xml2json/nodename-long-format.xml
create mode 100644 tests/qemublocktestdata/xml2json/nodename-long-protocol.xml
--
2.16.2
6 years, 6 months