[libvirt] [PATCH 0/3] bhyve: implement support for commandline args
by Roman Bogorodskiy
Roman Bogorodskiy (3):
bhyve: implement support for commandline args
docs: bhyve: document commandline element
news: document bhyve custom commandline support
docs/drvbhyve.html.in | 20 ++++
docs/news.xml | 11 ++
docs/schemas/domaincommon.rng | 17 +++
src/bhyve/bhyve_command.c | 9 ++
src/bhyve/bhyve_conf.c | 15 +++
src/bhyve/bhyve_conf.h | 9 ++
src/bhyve/bhyve_domain.c | 107 +++++++++++++++++-
src/bhyve/bhyve_domain.h | 1 +
.../bhyvexml2argv-commandline.args | 9 ++
.../bhyvexml2argv-commandline.ldargs | 3 +
.../bhyvexml2argv-commandline.xml | 27 +++++
tests/bhyvexml2argvtest.c | 1 +
.../bhyvexml2xmlout-commandline.xml | 37 ++++++
tests/bhyvexml2xmltest.c | 1 +
14 files changed, 266 insertions(+), 1 deletion(-)
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-commandline.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-commandline.xml
--
2.20.1
5 years, 9 months
[libvirt] [PATCH 0/2] A couple of GCC 9 fixes.
by Richard W.M. Jones
I'm not 100% confident about either of these patches, so
please take care with them. I also think the second patch
is probaby best fixed by disabling the warning, or else a
much more fundamental rewrite of the test.
Rich.
5 years, 9 months
[libvirt] [PATCH v4 00/10] Allow adding mountOpts to the storage pool mount command
by John Ferlan
v3: https://www.redhat.com/archives/libvir-list/2019-January/msg00467.html
NB: Kept same subject for cover to keep the same context; however, it's
now more of a series of a few things... Add default NFS Server options,
add nfsvers, and add support for XML namespaces in storage pools which
are used by NFS and RBD storage pools.
Changes since v3:
Remove patch 1 and 3. Rework patch 2 to make the nodev, nosuid, and
noexec be the "default options" for the NFS Storage Pool. Created a
virStorageBackendFileSystemMountNFSAddOptions in order to add those
options for NFS pools using format NFS (and not 'cifs' or 'gluster').
Everything else just gets adjusted/merged based on how the first patch
works.
John Ferlan (10):
storage: Add default mount options for NFS Storage Pools
docs: Add news mention of NFS Storage Pool mount options
conf: Add optional NFS Source Pool <protocol ver='n'/> option
storage: Add the nfsvers to the command line
virsh: Add source-protocol-ver for pool commands
conf: Introduce virStoragePoolXMLNamespace
nfs: Add infrastructure to manage XML namespace options
docs,tests: Add schema, description, and tests for NFS namespace
storage: Add NFS storage pool namespace options to command line
rbd: Utilize storage pool namespace to manage config options
docs/formatstorage.html.in | 123 +++++++++++++
docs/news.xml | 11 ++
docs/schemas/storagepool.rng | 50 ++++++
src/conf/storage_conf.c | 73 +++++++-
src/conf/storage_conf.h | 27 +++
src/libvirt_private.syms | 1 +
src/storage/storage_backend_fs.c | 128 ++++++++++++++
src/storage/storage_backend_rbd.c | 166 +++++++++++++++++-
src/storage/storage_util.c | 52 ++++++
src/storage/storage_util.h | 14 ++
tests/Makefile.am | 4 +-
.../pool-netfs-auto-freebsd.argv | 1 +
.../pool-netfs-auto-linux.argv | 1 +
.../pool-netfs-freebsd.argv | 1 +
.../pool-netfs-linux.argv | 1 +
.../pool-netfs-ns-mountopts-freebsd.argv | 2 +
.../pool-netfs-ns-mountopts-linux.argv | 2 +
.../pool-netfs-ns-mountopts.argv | 1 +
.../pool-netfs-protocol-ver-freebsd.argv | 1 +
.../pool-netfs-protocol-ver-linux.argv | 2 +
.../pool-netfs-protocol-ver.argv | 1 +
tests/storagepoolxml2argvtest.c | 49 +++++-
.../pool-netfs-ns-mountopts.xml | 25 +++
.../pool-netfs-protocol-ver.xml | 21 +++
.../pool-rbd-ns-configopts.xml | 17 ++
.../pool-netfs-ns-mountopts.xml | 25 +++
.../pool-netfs-protocol-ver.xml | 21 +++
.../pool-rbd-ns-configopts.xml | 20 +++
tests/storagepoolxml2xmltest.c | 8 +
tools/virsh-pool.c | 12 +-
tools/virsh.pod | 5 +
31 files changed, 851 insertions(+), 14 deletions(-)
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-auto-freebsd.argv
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-freebsd.argv
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-linux.argv
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-freebsd.argv
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts.argv
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-freebsd.argv
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-protocol-ver.argv
create mode 100644 tests/storagepoolxml2xmlin/pool-netfs-ns-mountopts.xml
create mode 100644 tests/storagepoolxml2xmlin/pool-netfs-protocol-ver.xml
create mode 100644 tests/storagepoolxml2xmlin/pool-rbd-ns-configopts.xml
create mode 100644 tests/storagepoolxml2xmlout/pool-netfs-ns-mountopts.xml
create mode 100644 tests/storagepoolxml2xmlout/pool-netfs-protocol-ver.xml
create mode 100644 tests/storagepoolxml2xmlout/pool-rbd-ns-configopts.xml
--
2.20.1
5 years, 9 months
[libvirt] [PATCH] docs: Format bit shift notation for bitwise flag enums
by Peter Krempa
Big number itself does not make much sense in some cases. Format the
bitshift format as well.
Changes our web page docs from:
VIR_MIGRATE_POSTCOPY = 32768 : Setting the VIR_MIGRATE_POSTCOPY...
VIR_MIGRATE_TLS = 65536 : Setting the VIR_MIGRATE_TLS flag...
to:
VIR_MIGRATE_POSTCOPY = 32768 (1<<15) : Setting the VIR_MIGRATE_POSTCOPY...
VIR_MIGRATE_TLS = 65536 (1<<16) : Setting the VIR_MIGRATE_TLS flag...
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/apibuild.py | 4 ++++
docs/libvirt.css | 4 ++++
docs/newapi.xsl | 15 +++++++++++++--
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/docs/apibuild.py b/docs/apibuild.py
index 3ef5d0f554..a57f995189 100755
--- a/docs/apibuild.py
+++ b/docs/apibuild.py
@@ -2123,6 +2123,10 @@ class docBuilder:
except:
val = info[0]
output.write(" value='%s'" % (val))
+ valuestr = re.sub("<", "<", info[0])
+ valuestr = re.sub("[\(\)]", "", valuestr)
+ output.write(" valuestr='%s'" % valuestr)
+
if info[2] is not None and info[2] != '':
output.write(" type='%s'" % info[2])
if info[1] is not None and info[1] != '':
diff --git a/docs/libvirt.css b/docs/libvirt.css
index e590b33cfb..c5fe27fa3f 100644
--- a/docs/libvirt.css
+++ b/docs/libvirt.css
@@ -537,3 +537,7 @@ dl.mail dt a:hover {
color: rgb(255, 230, 0);
text-decoration: none;
}
+
+td.enumvalue {
+ white-space: nowrap;
+}
diff --git a/docs/newapi.xsl b/docs/newapi.xsl
index 8d4c032c03..0a3658c9a5 100644
--- a/docs/newapi.xsl
+++ b/docs/newapi.xsl
@@ -288,6 +288,17 @@
</xsl:choose>
</xsl:template>
+ <xsl:template name="enumvalue">
+ <xsl:param name="value" select="@value"/>
+ <xsl:param name="valuestr" select="@valuestr"/>
+ <xsl:value-of select="@value"/>
+ <xsl:if test="$value != $valuestr">
+ <xsl:text> (</xsl:text>
+ <xsl:value-of select="@valuestr"/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
<xsl:template match="typedef[@type = 'enum']">
<xsl:variable name="name" select="string(@name)"/>
<h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3>
@@ -306,7 +317,7 @@
<td><xsl:text> = </xsl:text></td>
<xsl:choose>
<xsl:when test="@info != ''">
- <td><xsl:value-of select="@value"/></td>
+ <td class="enumvalue"><xsl:call-template name="enumvalue"/></td>
<td>
<div class="comment">
<xsl:call-template name="dumptext">
@@ -316,7 +327,7 @@
</td>
</xsl:when>
<xsl:otherwise>
- <td colspan="2"><xsl:value-of select="@value"/></td>
+ <td colspan="2" class="enumvalue"><xsl:call-template name="enumvalue"/></td>
</xsl:otherwise>
</xsl:choose>
</tr>
--
2.20.1
5 years, 9 months
[libvirt] question: about iothreads count restrict in virDomainDefCheckABIStabilityFlags
by WangJie (Pluto)
Hi,
Migrate feature have a restrict: target domain iothreads count must match source
The relevant code as follows:
------------------------------------
if (src->niothreadids != dst->niothreadids) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Target domain iothreads count %zu does not " "match source %zu"), dst->niothreadids, src->niothreadids); goto error; }
------------------------------------
I tried to remove the restrict, and perform migrate in that case: "target domain iothreads count does not match source" , Anything is normal!
So, can we remove the restrict to support this case?
5 years, 9 months
Re: [libvirt] [Qemu-devel] [PATCH v4 03/14] audio: -audiodev command line option: documentation
by Thomas Huth
On 2019-01-28 23:43, Kővágó, Zoltán wrote:
> This patch adds documentation of an -audiodev command line option, that
> deprecates the old QEMU_* environment variables for audio backend
> configuration. It's syntax is similar to existing options (-netdev,
> -device, etc):
>
> -audiodev driver_name,property=value,...
>
> Although now it's possible to specify multiple -audiodev options on
> command line, multiple audio backends are not supported yet.
>
> Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu(a)gmail.com>
> ---
> qemu-options.hx | 222 +++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 219 insertions(+), 3 deletions(-)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 521511ec13..a12931899b 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -416,14 +416,230 @@ The default is @code{en-us}.
> ETEXI
>
>
> +HXCOMM Deprecated by -audiodev
> DEF("audio-help", 0, QEMU_OPTION_audio_help,
> - "-audio-help print list of audio drivers and their options\n",
> + "-audio-help show -audiodev equivalent of the currently specified audio settings\n",
> QEMU_ARCH_ALL)
Note that if you want to deprecate a parameter "officially" (in the
sense that it could be removed in a future release), you also have to
add an entry to qemu-deprecated.texi. But that could also be done in an
additional patch later, so no need to respin just because of this.
Thomas
5 years, 9 months
[libvirt] [PATCH 0/5] Block job handling related fixes (blockdev-add saga)
by Peter Krempa
Fix the generated documentation and clean up a few corner cases in
qemu's block job handling.
Peter Krempa (5):
lib: Fix docs generated for enum virDomainBlockJobType
qemu: blockjob: Make sure that internal states are not reported as
event
qemu: blockjob: Mark job as started only when it's new
qemu: Clear block copy mirror state explicitly
qemu: Don't double-free disk->mirror if block commit initialization
fails
include/libvirt/libvirt-domain.h | 3 ++-
src/qemu/qemu_blockjob.c | 7 ++++++-
src/qemu/qemu_driver.c | 34 ++++++++++++++------------------
3 files changed, 23 insertions(+), 21 deletions(-)
--
2.20.1
5 years, 9 months
[libvirt] [PATCH] qmp: Deprecate query-nodes option of query-blockstats
by Anton Kuchin
This option is broken since a6baa60807 in v2.9 and returns mostly
zeroes instead of real stats because actual querring of BlockStats
that resides in blk is missing.
And it makes no sense because with this option BlockDriverState-s
are iterated but BlockAcctStats belong to BlockBackend and not BDS
since 7f0e9da6f13 in v2.5
Signed-off-by: Anton Kuchin <antonkuchin(a)yandex-team.ru>
---
block/qapi.c | 26 +++++++-------------------
qapi/block-core.json | 8 +-------
qemu-deprecated.texi | 5 +++++
3 files changed, 13 insertions(+), 26 deletions(-)
diff --git a/block/qapi.c b/block/qapi.c
index c66f949db8..19d4b4ee42 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -502,8 +502,7 @@ static void bdrv_query_blk_stats(BlockDeviceStats *ds, BlockBackend *blk)
&ds->x_flush_latency_histogram);
}
-static BlockStats *bdrv_query_bds_stats(BlockDriverState *bs,
- bool blk_level)
+static BlockStats *bdrv_query_bds_stats(BlockDriverState *bs)
{
BlockStats *s = NULL;
@@ -517,7 +516,7 @@ static BlockStats *bdrv_query_bds_stats(BlockDriverState *bs,
/* Skip automatically inserted nodes that the user isn't aware of in
* a BlockBackend-level command. Stay at the exact node for a node-level
* command. */
- while (blk_level && bs->drv && bs->implicit) {
+ while (bs->drv && bs->implicit) {
bs = backing_bs(bs);
assert(bs);
}
@@ -531,12 +530,12 @@ static BlockStats *bdrv_query_bds_stats(BlockDriverState *bs,
if (bs->file) {
s->has_parent = true;
- s->parent = bdrv_query_bds_stats(bs->file->bs, blk_level);
+ s->parent = bdrv_query_bds_stats(bs->file->bs);
}
- if (blk_level && bs->backing) {
+ if (bs->backing) {
s->has_backing = true;
- s->backing = bdrv_query_bds_stats(bs->backing->bs, blk_level);
+ s->backing = bdrv_query_bds_stats(bs->backing->bs);
}
return s;
@@ -577,21 +576,10 @@ BlockStatsList *qmp_query_blockstats(bool has_query_nodes,
{
BlockStatsList *head = NULL, **p_next = &head;
BlockBackend *blk;
- BlockDriverState *bs;
/* Just to be safe if query_nodes is not always initialized */
if (has_query_nodes && query_nodes) {
- for (bs = bdrv_next_node(NULL); bs; bs = bdrv_next_node(bs)) {
- BlockStatsList *info = g_malloc0(sizeof(*info));
- AioContext *ctx = bdrv_get_aio_context(bs);
-
- aio_context_acquire(ctx);
- info->value = bdrv_query_bds_stats(bs, false);
- aio_context_release(ctx);
-
- *p_next = info;
- p_next = &info->next;
- }
+ error_setg(errp, "Option query_nodes is deprecated");
} else {
for (blk = blk_all_next(NULL); blk; blk = blk_all_next(blk)) {
BlockStatsList *info;
@@ -604,7 +592,7 @@ BlockStatsList *qmp_query_blockstats(bool has_query_nodes,
}
aio_context_acquire(ctx);
- s = bdrv_query_bds_stats(blk_bs(blk), true);
+ s = bdrv_query_bds_stats(blk_bs(blk));
s->has_device = true;
s->device = g_strdup(blk_name(blk));
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 91685be6c2..2dd5f6032c 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -892,13 +892,7 @@
#
# Query the @BlockStats for all virtual block devices.
#
-# @query-nodes: If true, the command will query all the block nodes
-# that have a node name, in a list which will include "parent"
-# information, but not "backing".
-# If false or omitted, the behavior is as before - query all the
-# device backends, recursively including their "parent" and
-# "backing". Filter nodes that were created implicitly are
-# skipped over in this mode. (Since 2.3)
+# @query-nodes: deprecated since 3.2
#
# Returns: A list of @BlockStats for each virtual block devices.
#
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index 219206a836..e1e04ced7d 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -112,6 +112,11 @@ Use ``device_add'' for hotplugging vCPUs instead of ``cpu-add''. See
documentation of ``query-hotpluggable-cpus'' for additional
details.
+@subsection query-blockstats (since 3.2)
+
+"query-nodes" parameter is not supported anymore because blockstats
+are not a prorerty of node.
+
@section Human Monitor Protocol (HMP) commands
@subsection The hub_id parameter of 'hostfwd_add' / 'hostfwd_remove' (since 3.1)
--
2.19.1
5 years, 9 months
[libvirt] [PATCH] conf: Add check to avoid a NULL compare for SysfsPath
by Cheng Lin
If the two sysfs_path are both NULL, there may be an incorrect
object returned for virNodeDeviceObjListFindBySysfsPath().
This check exists in old interface virNodeDeviceFindBySysfsPath().
e.g.
virNodeDeviceFindBySysfsPath(virNodeDeviceObjListPtr devs,
const char *sysfs_path)
{
...
if ((devs->objs[i]->def->sysfs_path != NULL) &&
(STREQ(devs->objs[i]->def->sysfs_path, sysfs_path))) {
...
}
Signed-off-by: Cheng Lin <cheng.lin130(a)zte.com.cn>
---
src/conf/virnodedeviceobj.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
index c8ad131..2e40de5 100644
--- a/src/conf/virnodedeviceobj.c
+++ b/src/conf/virnodedeviceobj.c
@@ -207,7 +207,8 @@ virNodeDeviceObjListFindBySysfsPathCallback(const void *payload,
int want = 0;
virObjectLock(obj);
- if (STREQ_NULLABLE(obj->def->sysfs_path, sysfs_path))
+ if ((obj->def->sysfs_path != NULL) &&
+ (STREQ_NULLABLE(obj->def->sysfs_path, sysfs_path)))
want = 1;
virObjectUnlock(obj);
return want;
--
1.8.3.1
5 years, 9 months
[libvirt] [PATCH] qemu: Assume migration with iscsi migration is safe
by Michal Privoznik
If a domain has a disk that is type='network' and
protocol='iscsi' then there is no need to require @cache or
UNSAFE migration flag. iscsi is a block device not a filesystem
after all.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_migration.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 52aa665640..9a7077f710 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1249,7 +1249,8 @@ qemuMigrationSrcIsSafe(virDomainDefPtr def,
else if (rc == 1)
continue;
} else if (disk->src->type == VIR_STORAGE_TYPE_NETWORK &&
- disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD) {
+ (disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD ||
+ disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_ISCSI)) {
continue;
}
--
2.19.2
5 years, 9 months