-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
---
src/qemu/qemu_conf.c | 22
src/qemu/qemu_conf.h | 2 ++
src/qemu/qemu_domain.c | 31
src/qemu/qemu_domain.h | 4 +++
src/qemu/qemu_nbdkit.c | 82 ++
src/qemu/qemu_nbdkit.h | 26
Implement the loadFile and saveFile virFileCacheHandlers callbacks so
that nbdkit capabilities are cached perstistently across daemon
restarts. The format and implementation is modeled on the qemu
capabilities, but simplified slightly.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
Add the virFileCache implementation for nbdkit capabilities to the qemu
driver. This allows us to determine whether nbdkit is installed and
which plugins are supported. it also has persistent caching and the
capabilities are re-queried whenever something changes.
Signed-off-by: Jonathon Jongsma
This prepares encryption secrets and authentication secrets. When we add
nbdkit-backed network storage sources, we will not need to send
authentication secrets to qemu, since they will be sent to nbdkit
instead. So split this into two different functions.
Signed-off-by: Jonathon Jongsma
Reviewed
log stderr and stdout from nbdkit into its own log so that
nbdkit-related issues can be debugged more easily.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_nbdkit.c | 30 +-
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_nbdkit.c b
Since the libvirt documentation suggests to prefer GObject over
virObject, and since virObject is a GObject, change virFileCache to
allow GObjects as data.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
---
src/util/virfilecache.c | 14 --
src/util/virfilecache.h | 2
.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
---
src/qemu/qemu_nbdkit.c | 42 ++
1 file changed, 42 insertions(+)
diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c
index 9ff293698d..486df8c161 100644
--- a/src/qemu/qemu_nbdkit.c
+++ b
nbdkit when libvirt restarts if nbdkit has died in the
meantime
- simplify ownership of event data used for monitoring and restart of nbdkit
process
- other smaller changes suggested by Peter in v4
Jonathon Jongsma (32):
schema: allow 'ssh' as a protocol for network disks
qemu: Add
On 2/7/23 10:51 AM, Peter Krempa wrote:
On Fri, Jan 20, 2023 at 16:03:13 -0600, Jonathon Jongsma wrote:
...
@@ -759,6 +765,29 @@ qemuNbdkitInitStorageSource(qemuNbdkitCaps *caps,
}
+static int
+qemuNbdkitCommandPassDataByPipe(virCommand *cmd,
+const
On 1/27/23 8:40 AM, Christian Nautze wrote:
Hi!
Is it possible to get a review on this patch I send before Christmas? :)
Thank you!
Christian
_
Currently it's only possible to set this parameter during domain
creation via QEMU
://lists.freedesktop.org/archives/dri-devel/2020-August/275972.html
https://www.kraxel.org/blog/2021/05/virtio-gpu-qemu-graphics-update/
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2032406
Signed-off-by: Jonathon Jongsma
Reviewed-by: Ján Tomko
---
docs/formatdomain.rst | 7 +++
src
Factor out a separate function to parse out the element for
video devices.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Ján Tomko
---
src/conf/domain_conf.c | 91 ++
1 file changed, 56 insertions(+), 35 deletions(-)
diff --git a/src/conf/domain_conf.c
Capability to determine whether this qemu supports the 'blob' option for
virtio-gpu.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Ján Tomko
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata
In virDomainVideoModelDefParseXML(), use the virXMLProp* functions
rather than reimplementing them with virXPath* functions.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Ján Tomko
---
src/conf/domain_conf.c | 73 --
1 file changed, 20 insertions(+), 53
This can improve performance for some guests since it reduces copying of
display data between host and guest. Requires udmabuf on the host.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Ján Tomko
---
src/qemu/qemu_cgroup.c| 22 ++---
src/qemu/qemu_command.c
This function allows you to specify a default value to return if the
property is not found rather than always setting *result to 0.
Signed-off-by: Jonathon Jongsma
---
src/conf/cpu_conf.c| 9 +++--
src/conf/domain_conf.c | 6 +-
src/conf/numa_conf.c | 7 +--
src/util
Rather than storing the video type as an integer, use the proper enum
type within the struct.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Ján Tomko
---
src/conf/domain_conf.c | 4 +---
src/conf/domain_conf.h | 2 +-
src/libxl/libxl_conf.c | 10 ++
src/libxl
Ensure that new virDomainVideoDef objects have their 'type' set to
VIR_DOMAIN_VIDEO_TYPE_DEFAULT and remove places that this value is set
after construction. Since virDomainVideoDefNew() uses g_new0() allocate
the instance, all fields are initialized to 0.
Signed-off-by: Jonathon Jongsma
the revised
series. So here's a v6 after rebasing yet again to current master.
changes in v6:
- added two new patches:
- conf: explicitly set VIR_DOMAIN_VIDEO_TYPE_DEFAULT to 0
- util: add virXMLPropUIntDefault() function
- other minor fixes from Jan's review
Jonathon Jongsma (8):
conf
In order to make ssh disks usable, we need to be able to validate a
remote host. To do this, add a xml element for ssh disks to
allow the user to specify a location for a file that contains known host
keys. Implementation to follow.
Signed-off-by: Jonathon Jongsma
---
docs/formatdomain.rst
`nbdkit --version` separately.
Signed-off-by: Jonathon Jongsma
---
meson.build| 6
meson_options.txt | 1 -
src/qemu/qemu_nbdkit.c | 75 +-
3 files changed, 60 insertions(+), 22 deletions(-)
diff --git a/meson.build b/meson.build
index
For virStorageSource objects that contain an nbdkitProcess, start that
nbdkit process to serve that network drive and then pass the nbdkit
socket to qemu rather than sending the network url to qemu directly.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_block.c | 162
Allow to specify a basename for the log file so that
qemuDomainLogContextNew() can be used to create log contexts for
secondary loggers.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_domain.c | 5 +++--
src/qemu/qemu_domain.h | 3 ++-
src/qemu/qemu_process.c | 2 +-
3 files changed, 6
Rather than passing passwords and cookies (which could contain
passwords) to nbdkit via commandline arguments, use the alternate format
that nbdkit supports where we can specify a file descriptor which nbdkit
will read to get the password or cookies.
Signed-off-by: Jonathon Jongsma
---
src/qemu
In future commits, we will optionally use nbdkit to serve some remote
disk sources. This patch queries to see whether nbdkit is installed on
the host and queries it for capabilities. The data will be used in later
commits.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
---
src/qemu
was chosen somewhat
arbitrarily.
Signed-off-by: Jonathon Jongsma
---
meson.build | 7 ++
src/qemu/qemu_nbdkit.c | 166 +++-
src/qemu/qemu_nbdkit.h | 7 +-
src/qemu/qemu_process.c | 4 +-
4 files changed, 177 insertions(+), 7 deletions(-)
diff
This prepares encryption secrets and authentication secrets. When we add
nbdkit-backed network storage sources, we will not need to send
authentication secrets to qemu, since they will be sent to nbdkit
instead. So split this into two different functions.
Signed-off-by: Jonathon Jongsma
Reviewed
For ssh disks that are served by nbdkit, lookup the password from the
configured secret and securely pass it to the nbdkit process using fd
passing.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_nbdkit.c| 87 ++-
.../disk-network-ssh
Signed-off-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
---
tests/qemunbdkitdata/disk-network-source-curl.args.disk1 | 4 +++-
.../disk-network-source-curl.args.disk1.pipe.780 | 2 +-
.../disk-network-source-curl.args.disk1.pipe.782 | 1 +
tests/qemunbdkitdata
authentication. Implementation will follow.
Signed-off-by: Jonathon Jongsma
---
docs/formatdomain.rst | 27 ++-
src/conf/schemas/domaincommon.rng | 23 ++-
2 files changed, 36 insertions(+), 14 deletions(-)
diff --git
Add a private function to peek at the list of send buffers in virCommand
so that it is testable
Signed-off-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/vircommand.c | 17 +
src/util/vircommand.h | 8
src/util
log stderr and stdout from nbdkit into its own log so that
nbdkit-related issues can be debugged more easily.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_nbdkit.c | 28
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_nbdkit.c b/src
adds this key
to an ssh agent, they can configure the disk with the path to the unix
socket for the ssh agent so libvirt can pass this socket path to nbdkit
and we can make use of these keys.
Signed-off-by: Jonathon Jongsma
---
src/conf/domain_conf.c| 36
For ssh disks that are served by nbdkit, use the configured value for
knownHosts and pass it to the nbdkit process.
Signed-off-by: Jonathon Jongsma
---
src/conf/domain_conf.c| 8
src/conf/storage_source_conf.c| 1 +
src
We were testing the arguments that were being passed to qemu when a disk
was being served by nbdkit, but the arguments used to start nbdkit
itself were not testable. This adds a test to ensure that we're invoking
nbdkit correctly for various disk source definitions.
Signed-off-by: Jonathon
eturned error: 404
error: Failed to start domain 'nbdkit-test'
error: internal error: Failed to connect to nbdkit for
'http://localhost:/nonexistent.iso]:
error: problem doing HEAD request to fetch size of URL
[http://localhost:/nonexistent.iso]:
HTTP response code said error:
Add new DO_TEST_CAPS_LATEST_NBDKIT macro to test xml2argv for various
nbdkit capability scenarios.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
---
src/qemu/qemu_nbdkit.c | 20 +---
tests/qemuxml2argvtest.c | 11 +++
tests/testutilsqemu.c| 27
Add xml to the private data for a disk source to represent the nbdkit
process so that the state can be re-created if the libvirt daemon is
restarted. Format:
/path/to/nbdkit.pid
/path/to/nbdkit.socket
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_domain.c
Add some helper functions to build a virCommand object and run the
nbdkit process for a given virStorageSource.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_nbdkit.c | 255 +
src/qemu/qemu_nbdkit.h | 10 ++
2 files changed, 265 insertions(+)
diff
:
...
...
Signed-off-by: Jonathon Jongsma
---
docs/formatdomain.rst | 8
src/conf/schemas/domaincommon.rng | 22 +-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
Add the virFileCache implementation for nbdkit capabilities to the qemu
driver. This allows us to determine whether nbdkit is installed and
which plugins are supported. it also has persistent caching and the
capabilities are re-queried whenever something changes.
Signed-off-by: Jonathon Jongsma
-by: Jonathon Jongsma
---
src/qemu/qemu_conf.c | 22
src/qemu/qemu_conf.h | 2 ++
src/qemu/qemu_domain.c | 31
src/qemu/qemu_domain.h | 4 +++
src/qemu/qemu_nbdkit.c | 82 ++
src/qemu/qemu_nbdkit.h | 26 ++
6 files
This will allow us to use it for nbdkit logging in upcoming commits.
Signed-off-by: Jonathon Jongsma
---
po/POTFILES| 1 +
src/qemu/meson.build | 1 +
src/qemu/qemu_domain.c | 247 ++
src/qemu/qemu_domain.h | 29 +---
src/qemu
This code can be used by the nbdkit implementation for reading back
filtered log data for error reporting. Move it to qemuLogContext so that
it can be shared. Renamed to qemuLogContextReadFiltered().
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_logcontext.c | 65
The only use of this function always passes
QEMU_DOMAIN_LOG_CONTEXT_MODE_START. The other enum values are never used
anywhere in the code. Remove them.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_domain.c | 26 +++---
src/qemu/qemu_domain.h | 9 +
src/qemu
.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
---
meson.build| 6 ++
meson_options.txt | 1 +
src/qemu/qemu_nbdkit.c | 40
3 files changed, 47 insertions(+)
diff --git a/meson.build b/meson.build
index e498b49be4..ca02fde91b
Implement the loadFile and saveFile virFileCacheHandlers callbacks so
that nbdkit capabilities are cached perstistently across daemon
restarts. The format and implementation is modeled on the qemu
capabilities, but simplified slightly.
Signed-off-by: Jonathon Jongsma
---
po/POTFILES
Preparatory step for caching nbdkit capabilities. This patch implements
the newData and isValid virFileCacheHandlers callback functions.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
---
src/qemu/qemu_nbdkit.c | 89 +-
src/qemu/qemu_nbdkit.h
qemu
- nbdkit output logged to a separate file
- add missing support for hotplug
- lots of smaller changes from Peter's review
Jonathon Jongsma (31):
schema: allow 'ssh' as a protocol for network disks
qemu: Add functions for determining nbdkit availability
qemu: expand nbdkit capabilities
Since the libvirt documentation suggests to prefer GObject over
virObject, and since virObject is a GObject, change virFileCache to
allow GObjects as data.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Peter Krempa
---
src/util/virfilecache.c | 14 --
src/util/virfilecache.h | 2
There was support in the code for parsing protocol='ssh' on network disk
sources, but it was not present in the xml schema. Add this to the
schema and mention it in the documentation.
Signed-off-by: Jonathon Jongsma
---
src/conf/schemas/domaincommon.rng | 1 +
tests/qemublocktest.c
-
9 files changed, 223 insertions(+), 359 deletions(-)
See separate emails for a few comments on individual patches
Reviewed-by: Jonathon Jongsma
On 1/17/23 10:20 AM, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/rpc/virnetlibsshsession.c | 57 +--
1 file changed, 7 insertions(+), 50 deletions(-)
diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c
index
not much point making this one any different than the others.
Reviewed-by: Jonathon Jongsma
On 1/17/23 10:20 AM, Peter Krempa wrote:
Rework the code to use the new helper instead of open coding the auth
callback interaction.
Signed-off-by: Peter Krempa
---
src/rpc/virnetlibsshsession.c | 47
On 1/17/23 10:20 AM, Peter Krempa wrote:
The helper uses the user-provided auth callbacks to ask the user. The
helper encapsulates the steps we do to query the user in few places into
a common helper which can be then used further.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms |
On 1/17/23 10:20 AM, Peter Krempa wrote:
With g_strdup not failing we can remove all of the 'error' section.
Signed-off-by: Peter Krempa
---
src/rpc/virnetsshsession.c | 18 +++---
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/src/rpc/virnetsshsession.c
+return g_steal_pointer();
}
Reviewed-by: Jonathon Jongsma
On 1/5/23 10:29 AM, Peter Krempa wrote:
The new APIs store the list of callbacks for a VM inside the
virDomainObj and also allow registering multiple callbacks for a single
domain and also for multiple connections.
For now this code is dormant until each driver using the old APIs is not
ObjListCollect(driver->domains, conn, , ,
+virConnectGetAllDomainStatsCheckACL,
+lflags);
}
tmpstats = g_new0(virDomainStatsRecordPtr, ndoms + 1);
Reviewed-by: Jonathon Jongsma
private.syms
+++ b/src/libvirt_private.syms
@@ -1209,6 +1209,7 @@ virDomainMomentObjNew;
# conf/virdomainobjlist.h
virDomainObjListAdd;
virDomainObjListCollect;
+virDomainObjListCollectAll;
virDomainObjListConvert;
virDomainObjListExport;
virDomainObjListFindByID;
Reviewed-by: Jonathon Jongsma
skip_missing);
Fine with me as long as others don't object to mass reformatting
Reviewed-by: Jonathon Jongsma
by domain driver as it pleases.
* NB: 'private' is a reserved word in C++.
*/
-void *privateData;
+void *privateData;
/*
* Object lock must be acquired before accessing/changing any of
Reviewed-by: Jonathon Jongsma
strdup(name);
ret->conn = virObjectRef(conn);
@@ -306,10 +304,6 @@ virGetDomain(virConnectPtr conn,
memcpy(&(ret->uuid[0]), uuid, VIR_UUID_BUFLEN);
return ret;
-
- error:
-virObjectUnref(ret);
-return NULL;
}
/**
Reviewed-by: Jonathon Jongsma
| 27 ++
src/vmware/vmware_conf.c | 28 ++
src/vz/vz_utils.c | 18 ++--
18 files changed, 237 insertions(+), 452 deletions(-)
noted a couple minor comments in separate emails
Reviewed-by: Jonathon Jongsma
On 1/5/23 6:26 AM, Jiang Jiacheng wrote:
...
@@ -476,33 +459,29 @@ AppArmorGetSecurityProcessLabel(virSecurityManager *mgr
G_GNUC_UNUSED,
{
int rc = -1;
'rc' variable doesn't seem to be used anymore.
int status;
-char *profile_name = NULL;
+g_autofree char
On 1/5/23 6:26 AM, Jiang Jiacheng wrote:
Signed-off-by: Jiang Jiacheng
...
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 9a95ae6c12..39f36ca29d 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
...
@@ -2571,8 +2564,8 @@
On 12/9/22 9:21 AM, Peter Krempa wrote:
On Thu, Oct 20, 2022 at 16:59:00 -0500, Jonathon Jongsma wrote:
Add some helper functions to build a virCommand object and run the
nbdkit process for a given virStorageSource.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_nbdkit.c | 251
On 12/9/22 4:09 AM, Peter Krempa wrote:
On Thu, Oct 20, 2022 at 16:59:00 -0500, Jonathon Jongsma wrote:
Add some helper functions to build a virCommand object and run the
nbdkit process for a given virStorageSource.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_nbdkit.c | 251
On 12/8/22 8:35 AM, Daniel P. Berrangé wrote:
The ETHTOOL_GFEATURES constant has existed since before Linux moved
to git.
^ This sentence mentions the wrong constant name.
This is old enough that all our supported platforms can be assumed
to have this feature.
Signed-off-by: Daniel P.
On 12/8/22 8:35 AM, Daniel P. Berrangé wrote:
The ETH_FLAG_NTUPLE constant was introduced to Linux in
commit 15682bc488d4af8c9bb998844a94281025e0a333
Author: Peter P Waskiewicz Jr
Date: Wed Feb 10 20:03:05 2010 -0800
ethtool: Introduce n-tuple filter programming support
This
On 12/7/22 5:15 AM, Peter Krempa wrote:
On Tue, Nov 15, 2022 at 12:07:18 +0100, Ján Tomko wrote:
On a Thursday in 2022, Jonathon Jongsma wrote:
There was support in the code for parsing protocol='ssh' on network disk
sources, but it was not present in the xml schema. Add this to the
schema
| 10 +-
tests/virnetsockettest.c | 3 +-
tests/virshtest.c| 3 +-
19 files changed, 182 insertions(+), 136 deletions(-)
create mode 100644 tests/commanddata/test29.log
Reviewed-by: Jonathon Jongsma
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_domain.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ef1a9c8c74..8ae458ae45 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -9470,10
On 11/7/22 1:45 AM, Ján Tomko wrote:
On a Friday in 2022, Jonathon Jongsma wrote:
In virDomainVideoModelDefParseXML(), use the virXMLProp* functions
rather than reimplementing them with virXPath* functions.
Signed-off-by: Jonathon Jongsma
---
src/conf/domain_conf.c | 78
Capability to determine whether this qemu supports the 'blob' option for
virtio-gpu.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1
In virDomainVideoModelDefParseXML(), use the virXMLProp* functions
rather than reimplementing them with virXPath* functions.
Signed-off-by: Jonathon Jongsma
---
src/conf/domain_conf.c | 78 +-
1 file changed, 23 insertions(+), 55 deletions(-)
diff --git
This can improve performance for some guests since it reduces copying of
display data between host and guest. Requires udmabuf on the host.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_cgroup.c| 22 ++---
src/qemu/qemu_command.c | 3
Rather than storing the video type as an integer, use the proper enum
type within the struct.
Signed-off-by: Jonathon Jongsma
---
src/conf/domain_conf.c | 4 +---
src/conf/domain_conf.h | 2 +-
src/libxl/libxl_conf.c | 10 ++
src/libxl/libxl_domain.c | 11
changes in v4:
- rebased to latest master
- updated tests
changes in v3:
- rebased to latest master
Changes in v2:
- Added some basic documentation
- add a qemu capability
- Make sure that the /dev/udmabuf device is accessible to qemu (cgroups, etc)
Jonathon Jongsma (6):
conf: Refactor
://lists.freedesktop.org/archives/dri-devel/2020-August/275972.html
https://www.kraxel.org/blog/2021/05/virtio-gpu-qemu-graphics-update/
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2032406
Signed-off-by: Jonathon Jongsma
---
docs/formatdomain.rst | 7 +++
src/conf/domain_conf.c
Factor out a separate function to parse out the element for
video devices.
Signed-off-by: Jonathon Jongsma
---
src/conf/domain_conf.c | 95 ++
1 file changed, 59 insertions(+), 36 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
On 11/1/22 9:01 AM, Peter Krempa wrote:
'abs_top_srcdir' can be prepended to the schema in the macro. Apart from
removing one needles string copy it will also allow pointing to schema
needless
files in the builddir which will come handy in upcoming patches.
Signed-off-by: Peter Krempa
---
(+), 16 deletions(-)
Reviewed-by: Jonathon Jongsma
++-
tools/virsh-nodedev.c| 20 ++--
tools/virsh-volume.c | 14 ++
17 files changed, 128 insertions(+), 35 deletions(-)
Reviewed-by: Jonathon Jongsma
Add xml to the private data for a disk source to represent the nbdkit
process so that the state can be re-created if the libvirt daemon is
restarted. Format:
/path/to/nbdkit.pid
/path/to/nbdkit.socket
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_domain.c | 53
idfile support built into virCommand rather than nbdkit's --pidfile
argument
- added significantly more tests
Jonathon Jongsma (18):
schema: allow 'ssh' as a protocol for network disks
qemu: Add functions for determining nbdkit availability
qemu: expand nbdkit capabilities
util: Allow virFile
Add the virFileCache implementation for nbdkit capabilities to the qemu
driver. This allows us to determine whether nbdkit is installed and
which plugins are supported. it also has persistent caching and the
capabilities are re-queried whenever something changes.
Signed-off-by: Jonathon Jongsma
Rather than passing passwords and cookies (which could contain
passwords) to nbdkit via commandline arguments, use the alternate format
that nbdkit supports where we can specify a file descriptor which nbdkit
will read to get the password or cookies.
Signed-off-by: Jonathon Jongsma
---
build
was chosen somewhat
arbitrarily.
Signed-off-by: Jonathon Jongsma
---
meson.build | 3 +
src/qemu/qemu_nbdkit.c | 220
src/qemu/qemu_nbdkit.h | 10 ++
src/qemu/qemu_process.c | 13 +++
4 files changed, 246 insertions(+)
diff --git
Signed-off-by: Jonathon Jongsma
---
tests/qemunbdkitdata/disk-network-source-curl.args.1.pipe.1 | 1 +
tests/qemunbdkitdata/disk-network-source-curl.args.disk1 | 4 +++-
.../disk-network-source-curl.args.disk1.pipe.1780 | 2 +-
.../disk-network-source-curl.args.disk1.pipe.1782
This prepares encryption secrets and authentication secrets. When we add
nbdkit-backed network storage sources, we will not need to send
authentication secrets to qemu, since they will be sent to nbdkit
instead. So split this into two different functions.
Signed-off-by: Jonathon Jongsma
Reviewed
Add new DO_TEST_CAPS_LATEST_NBDKIT macro to test xml2argv for various
nbdkit capability scenarios.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_nbdkit.c | 20 +---
tests/qemuxml2argvtest.c | 11 +++
tests/testutilsqemu.c| 27 +++
tests
for tests that use sensitive data such as
passwords and cookies.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_nbdkit.c| 4 +-
src/qemu/qemu_nbdkitpriv.h| 31 +++
tests/meson.build | 1 +
.../disk-network-ssh.args.disk0
Add a private function to peek at the list of send buffers in virCommand
so that it is testable
Signed-off-by: Jonathon Jongsma
---
src/libvirt_private.syms | 1 +
src/util/vircommand.c | 16
src/util/vircommand.h | 8
src/util/vircommandpriv.h | 4
4
For virStorageSource objects that contain an nbdkitProcess, start that
nbdkit process to serve that network drive and then pass the nbdkit
socket to qemu rather than sending the network url to qemu directly.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_block.c | 162
.
Signed-off-by: Jonathon Jongsma
---
meson.build| 6 ++
meson_options.txt | 1 +
src/qemu/qemu_nbdkit.c | 40
3 files changed, 47 insertions(+)
diff --git a/meson.build b/meson.build
index 93de355430..e4581e74dd 100644
--- a/meson.build
Preparatory step for caching nbdkit capabilities. This patch implements
the newData and isValid virFileCacheHandlers callback functions.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_nbdkit.c | 93 +-
src/qemu/qemu_nbdkit.h | 4 ++
2 files changed
Add some helper functions to build a virCommand object and run the
nbdkit process for a given virStorageSource.
Signed-off-by: Jonathon Jongsma
---
src/qemu/qemu_nbdkit.c | 251 +
src/qemu/qemu_nbdkit.h | 10 ++
2 files changed, 261 insertions(+)
diff
In future commits, we will optionally use nbdkit to serve some remote
disk sources. This patch queries to see whether nbdkit is installed on
the host and queries it for capabilities. The data will be used in later
commits.
Signed-off-by: Jonathon Jongsma
---
po/POTFILES| 1 +
src
Since the libvirt documentation suggests to prefer GObject over
virObject, and since virObject is a GObject, change virFileCache to
allow GObjects as data.
Signed-off-by: Jonathon Jongsma
---
src/util/virfilecache.c | 14 --
src/util/virfilecache.h | 2 +-
2 files changed, 9
201 - 300 of 1088 matches
Mail list logo