[libvirt] Plans for next release
by Daniel Veillard
Happy New Year everybody,
as planned we should release 5.0.0 around Jan 15. This means that
the best to meet that deadline would be to enter freeze tomorrow Thur,
then have an RC2 over the w.e. and then if all goes well we can roll
out the release next Tuesday.
If there is no issue with this plan I will then release RC1 tomorrow
probably in the evening european time,
thanks,
Daniel
--
Daniel Veillard | Red Hat Developers Tools http://developer.redhat.com/
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
5 years, 10 months
[libvirt] [PATCH 0/7] Various cleanups to the build system
by Andrea Bolognani
Came for 6/7, stayed for the yak shaving.
Andrea Bolognani (7):
remote: Move polkitdir definition
remote: Define polkit{actions,rules}dir
remote: Define sysctldir
remote: Define sasldir
src: Simplify installing/uninstalling data
apparmor: Move static data out of examples/
src: Add Vim modeline to Makefile.am snippets
examples/Makefile.am | 40 ----------
src/Makefile.am | 54 ++++++-------
src/access/Makefile.inc.am | 2 +
src/admin/Makefile.inc.am | 2 +
src/bhyve/Makefile.inc.am | 2 +
src/conf/Makefile.inc.am | 2 +
src/cpu/Makefile.inc.am | 2 +
src/cpu_map/Makefile.inc.am | 2 +
src/esx/Makefile.inc.am | 2 +
src/hyperv/Makefile.inc.am | 2 +
src/interface/Makefile.inc.am | 2 +
src/libxl/Makefile.inc.am | 2 +
src/locking/Makefile.inc.am | 2 +
src/logging/Makefile.inc.am | 2 +
src/lxc/Makefile.inc.am | 2 +
src/network/Makefile.inc.am | 2 +
src/node_device/Makefile.inc.am | 2 +
src/nwfilter/Makefile.inc.am | 2 +
src/openvz/Makefile.inc.am | 2 +
src/phyp/Makefile.inc.am | 2 +
src/qemu/Makefile.inc.am | 2 +
src/remote/Makefile.inc.am | 75 +++++++++----------
src/rpc/Makefile.inc.am | 2 +
src/secret/Makefile.inc.am | 2 +
src/security/Makefile.inc.am | 42 +++++++++++
.../security}/apparmor/TEMPLATE.lxc | 0
.../security}/apparmor/TEMPLATE.qemu | 0
.../security}/apparmor/libvirt-lxc | 0
.../security}/apparmor/libvirt-qemu | 0
.../apparmor/usr.lib.libvirt.virt-aa-helper | 0
.../security}/apparmor/usr.sbin.libvirtd | 0
src/storage/Makefile.inc.am | 2 +
src/test/Makefile.inc.am | 2 +
src/util/Makefile.inc.am | 2 +
src/vbox/Makefile.inc.am | 2 +
src/vmware/Makefile.inc.am | 2 +
src/vmx/Makefile.inc.am | 2 +
src/vz/Makefile.inc.am | 2 +
src/xenapi/Makefile.inc.am | 2 +
src/xenconfig/Makefile.inc.am | 2 +
40 files changed, 161 insertions(+), 110 deletions(-)
rename {examples => src/security}/apparmor/TEMPLATE.lxc (100%)
rename {examples => src/security}/apparmor/TEMPLATE.qemu (100%)
rename {examples => src/security}/apparmor/libvirt-lxc (100%)
rename {examples => src/security}/apparmor/libvirt-qemu (100%)
rename {examples => src/security}/apparmor/usr.lib.libvirt.virt-aa-helper (100%)
rename {examples => src/security}/apparmor/usr.sbin.libvirtd (100%)
--
2.20.1
5 years, 10 months
[libvirt] [PATCH v2] network: remove stale function
by Laine Stump
networkMigrateStateFiles was added nearly 5 years ago when the network
state directory was moved from /var/lib/libvirt to /var/run/libvirt
just prior to libvirt-1.2.4). It was only required to maintain proper
state information for networks that were active during an upgrade that
didn't involve rebooting the host. At this point the likelyhood of
anyone upgrading their libvirt from pre-1.2.4 directly to 5.0.0 or
later *without rebooting the host* is probably so close to 0 that no
properly informed bookie would take *any* odds on it happening, so it
seems appropriate to remove this pointless code.
Signed-off-by: Laine Stump <laine(a)laine.org>
---
Change from V1 - the now-unused #include <dirent.h> was causing make
syntax-check to fail.
src/network/bridge_driver.c | 93 -------------------------------------
1 file changed, 93 deletions(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index aed80c04d5..660a93666c 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -33,7 +33,6 @@
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <net/if.h>
-#include <dirent.h>
#if HAVE_SYS_SYSCTL_H
# include <sys/sysctl.h>
#endif
@@ -559,92 +558,6 @@ firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED,
#endif
-static int
-networkMigrateStateFiles(virNetworkDriverStatePtr driver)
-{
- /* Due to a change in location of network state xml beginning in
- * libvirt 1.2.4 (from /var/lib/libvirt/network to
- * /var/run/libvirt/network), we must check for state files in two
- * locations. Anything found in the old location must be written
- * to the new location, then erased from the old location. (Note
- * that we read/write the file rather than calling rename()
- * because the old and new state directories are likely in
- * different filesystems).
- */
- int ret = -1;
- const char *oldStateDir = LOCALSTATEDIR "/lib/libvirt/network";
- DIR *dir;
- int direrr;
- struct dirent *entry;
- char *oldPath = NULL, *newPath = NULL;
- char *contents = NULL;
- int rc;
-
- if ((rc = virDirOpenIfExists(&dir, oldStateDir)) <= 0)
- return rc;
-
- if (virFileMakePath(driver->stateDir) < 0) {
- virReportSystemError(errno, _("cannot create directory %s"),
- driver->stateDir);
- goto cleanup;
- }
-
- while ((direrr = virDirRead(dir, &entry, oldStateDir)) > 0) {
- if (entry->d_type != DT_UNKNOWN &&
- entry->d_type != DT_REG)
- continue;
-
- if (virAsprintf(&oldPath, "%s/%s",
- oldStateDir, entry->d_name) < 0)
- goto cleanup;
-
- if (entry->d_type == DT_UNKNOWN) {
- struct stat st;
-
- if (lstat(oldPath, &st) < 0) {
- virReportSystemError(errno,
- _("failed to stat network status file '%s'"),
- oldPath);
- goto cleanup;
- }
-
- if (!S_ISREG(st.st_mode)) {
- VIR_FREE(oldPath);
- continue;
- }
- }
-
- if (virFileReadAll(oldPath, 1024*1024, &contents) < 0)
- goto cleanup;
-
- if (virAsprintf(&newPath, "%s/%s",
- driver->stateDir, entry->d_name) < 0)
- goto cleanup;
- if (virFileWriteStr(newPath, contents, S_IRUSR | S_IWUSR) < 0) {
- virReportSystemError(errno,
- _("failed to write network status file '%s'"),
- newPath);
- goto cleanup;
- }
-
- unlink(oldPath);
- VIR_FREE(oldPath);
- VIR_FREE(newPath);
- VIR_FREE(contents);
- }
- if (direrr < 0)
- goto cleanup;
-
- ret = 0;
- cleanup:
- VIR_DIR_CLOSE(dir);
- VIR_FREE(oldPath);
- VIR_FREE(newPath);
- VIR_FREE(contents);
- return ret;
-}
-
-
/**
* networkStateInitialize:
*
@@ -691,12 +604,6 @@ networkStateInitialize(bool privileged,
LOCALSTATEDIR "/lib/libvirt/radvd") < 0)
goto error;
- /* migration from old to new location is only applicable for
- * privileged mode - unprivileged mode directories haven't
- * changed location.
- */
- if (networkMigrateStateFiles(network_driver) < 0)
- goto error;
} else {
configdir = virGetUserConfigDirectory();
rundir = virGetUserRuntimeDirectory();
--
2.20.1
5 years, 10 months
[libvirt] [PATCH] network: remove stale function
by Laine Stump
networkMigrateStateFiles was added nearly 5 years ago when the network
state directory was moved from /var/lib/libvirt to /var/run/libvirt
just prior to libvirt-1.2.4). It was only required to maintain proper
state information for networks that were active during an upgrade that
didn't involve rebooting the host. At this point the likelyhood of
anyone upgrading their libvirt from pre-1.2.4 directly to 5.0.0 or
later *without rebooting the host* is probably so close to 0 that no
properly informed bookie would take *any* odds on it happening, so it
seems appropriate to remove this pointless code.
Signed-off-by: Laine Stump <laine(a)laine.org>
---
src/network/bridge_driver.c | 92 -------------------------------------
1 file changed, 92 deletions(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index aed80c04d5..8a16e50feb 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -559,92 +559,6 @@ firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED,
#endif
-static int
-networkMigrateStateFiles(virNetworkDriverStatePtr driver)
-{
- /* Due to a change in location of network state xml beginning in
- * libvirt 1.2.4 (from /var/lib/libvirt/network to
- * /var/run/libvirt/network), we must check for state files in two
- * locations. Anything found in the old location must be written
- * to the new location, then erased from the old location. (Note
- * that we read/write the file rather than calling rename()
- * because the old and new state directories are likely in
- * different filesystems).
- */
- int ret = -1;
- const char *oldStateDir = LOCALSTATEDIR "/lib/libvirt/network";
- DIR *dir;
- int direrr;
- struct dirent *entry;
- char *oldPath = NULL, *newPath = NULL;
- char *contents = NULL;
- int rc;
-
- if ((rc = virDirOpenIfExists(&dir, oldStateDir)) <= 0)
- return rc;
-
- if (virFileMakePath(driver->stateDir) < 0) {
- virReportSystemError(errno, _("cannot create directory %s"),
- driver->stateDir);
- goto cleanup;
- }
-
- while ((direrr = virDirRead(dir, &entry, oldStateDir)) > 0) {
- if (entry->d_type != DT_UNKNOWN &&
- entry->d_type != DT_REG)
- continue;
-
- if (virAsprintf(&oldPath, "%s/%s",
- oldStateDir, entry->d_name) < 0)
- goto cleanup;
-
- if (entry->d_type == DT_UNKNOWN) {
- struct stat st;
-
- if (lstat(oldPath, &st) < 0) {
- virReportSystemError(errno,
- _("failed to stat network status file '%s'"),
- oldPath);
- goto cleanup;
- }
-
- if (!S_ISREG(st.st_mode)) {
- VIR_FREE(oldPath);
- continue;
- }
- }
-
- if (virFileReadAll(oldPath, 1024*1024, &contents) < 0)
- goto cleanup;
-
- if (virAsprintf(&newPath, "%s/%s",
- driver->stateDir, entry->d_name) < 0)
- goto cleanup;
- if (virFileWriteStr(newPath, contents, S_IRUSR | S_IWUSR) < 0) {
- virReportSystemError(errno,
- _("failed to write network status file '%s'"),
- newPath);
- goto cleanup;
- }
-
- unlink(oldPath);
- VIR_FREE(oldPath);
- VIR_FREE(newPath);
- VIR_FREE(contents);
- }
- if (direrr < 0)
- goto cleanup;
-
- ret = 0;
- cleanup:
- VIR_DIR_CLOSE(dir);
- VIR_FREE(oldPath);
- VIR_FREE(newPath);
- VIR_FREE(contents);
- return ret;
-}
-
-
/**
* networkStateInitialize:
*
@@ -691,12 +605,6 @@ networkStateInitialize(bool privileged,
LOCALSTATEDIR "/lib/libvirt/radvd") < 0)
goto error;
- /* migration from old to new location is only applicable for
- * privileged mode - unprivileged mode directories haven't
- * changed location.
- */
- if (networkMigrateStateFiles(network_driver) < 0)
- goto error;
} else {
configdir = virGetUserConfigDirectory();
rundir = virGetUserRuntimeDirectory();
--
2.20.1
5 years, 10 months
[libvirt] [PATCH v2 0/6] Allow adding mountOpts to the storage pool mount command
by John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2018-December/msg00558.html
Kept the subject the same, but the concept has been adjusted to follow
issues pointed out by jtomko vis-a-vis allowing arbitrary options via XML.
This series adds both the NFS and the RBD adjustments that were essentially
in the referenced series from review.
Changes since v1:
* Patch 1: (NEW) Implements a bare-bones infrastructure for storage pool
XML namespace. Could be split again, but separately the patches
were too small IMO.
* Patch 2: (NEW) Implementation of providing XML Namespace functions. The
details of the operation are in the subsequent patch. I could
combine 2 and 3, but perhaps it's easier to review separated.
* Patch 3: (REWORK) Rework the previous series patch1 in order to utilize
the Storage Pool XML Namespace. Adjust the description of the
configuration and modify the storagepoolxml2xmltest appropriately.
* Patch 4: (REWORK) Utilize the XML Namespace data to generate the command
line which doesn't change since v1.
* Patch 5: (REWORK) Rework the virsh code in order to generate the proper
syntax to utilize Storage Pool XML Namespaces.
* Patch 6: (NEW) Well, new as in this series, but it's essentially a rework
of what was posted in the series jtomko referenced. The code will
"prove" (to a degree) that the concept can work for multiple pool
types. The "downside" is that there's no (easy) way that I could
find to generate output to show the commands are executed.
John Ferlan (6):
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 mount options to command line
virsh: Add source-mount-opts for pool commands
rbd: Utilize storage pool namespace to manage config options
docs/formatstorage.html.in | 87 ++++++++++
docs/schemas/storagepool.rng | 43 +++++
src/conf/storage_conf.c | 51 +++++-
src/conf/storage_conf.h | 24 +++
src/libvirt_private.syms | 1 +
src/storage/storage_backend_fs.c | 127 ++++++++++++++
src/storage/storage_backend_rbd.c | 159 +++++++++++++++++-
src/storage/storage_util.c | 36 ++++
src/storage/storage_util.h | 14 ++
tests/Makefile.am | 4 +-
.../pool-netfs-mountopts.argv | 1 +
tests/storagepoolxml2argvtest.c | 4 +
.../pool-netfs-mountopts.xml | 24 +++
.../pool-rbd-configopts.xml | 17 ++
.../pool-netfs-mountopts.xml | 24 +++
.../pool-rbd-configopts.xml | 20 +++
tests/storagepoolxml2xmltest.c | 7 +
tools/virsh-pool.c | 39 ++++-
tools/virsh.pod | 5 +
19 files changed, 680 insertions(+), 7 deletions(-)
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-mountopts.argv
create mode 100644 tests/storagepoolxml2xmlin/pool-netfs-mountopts.xml
create mode 100644 tests/storagepoolxml2xmlin/pool-rbd-configopts.xml
create mode 100644 tests/storagepoolxml2xmlout/pool-netfs-mountopts.xml
create mode 100644 tests/storagepoolxml2xmlout/pool-rbd-configopts.xml
--
2.20.1
5 years, 10 months
[libvirt] [PATCH 0/4] util: Fixing libvirt errors on cavium/thunder-nicvf
by Radoslaw Biernacki
ThunderX is Cavium SoC. This platform contain SRIOV NIC.
Unlike other commonly known network devices it does not have VF functionality
duplicated in its PF. PF is purely management device (on HW level).
This creates several problems with existing libvirt code as in many places
libvirt assumes that each VF netdev has PF netdev assigned.
This patch series trying to address issues which can be easily fixed.
(mostly bug fixes found while working on full featured solution)
First patch in series is most important as it allows to unblock the netdev
detection and use <hostdev> on this platform.
More details about those issues can be found at:
https://bugs.linaro.org/show_bug.cgi?id=3778
https://bugs.launchpad.net/charm-nova-compute/+bug/1771662
Radoslaw Biernacki (4):
util: fixing wrong assumption that PF has to have netdev assigned
util: Code simplification
util: Fix for NULL dereference
util: Fixing invalid error checking from virPCIGetNetname()
src/qemu/qemu_domain_address.c | 11 ++---
src/util/virhostdev.c | 2 +-
src/util/virnetdev.c | 50 ++++----------------
3 files changed, 16 insertions(+), 47 deletions(-)
--
2.14.1
5 years, 10 months
[libvirt] [PATCH] src/qemu: Fix indentation in Makefile.inc.am
by Michal Privoznik
Three lines are a bit off there.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/Makefile.inc.am | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am
index 2afa67f195..0b2bc074c0 100644
--- a/src/qemu/Makefile.inc.am
+++ b/src/qemu/Makefile.inc.am
@@ -35,9 +35,9 @@ QEMU_DRIVER_SOURCES = \
qemu/qemu_migration.h \
qemu/qemu_migration_cookie.c \
qemu/qemu_migration_cookie.h \
- qemu/qemu_migration_params.c \
- qemu/qemu_migration_params.h \
- qemu/qemu_migration_paramspriv.h \
+ qemu/qemu_migration_params.c \
+ qemu/qemu_migration_params.h \
+ qemu/qemu_migration_paramspriv.h \
qemu/qemu_monitor.c \
qemu/qemu_monitor.h \
qemu/qemu_monitor_priv.h \
--
2.19.2
5 years, 10 months
[libvirt] [PATCH 0/3] Fix examples/ under mingw
by Eric Blake
My recent patch to make all of the examples work independently of
gnulib worked fine on Linux, but failed on mingw:
https://travis-ci.org/libvirt/libvirt/jobs/476898635
The whole point of gnulib is to work around portability pitfalls so
we don't have to bend over backwards thinking about it in our code;
and it would be possible to fix this bug by linking the problematic
example binaries against gnulib after all. But since the examples
are still small and self-contained enough that using manual
workarounds wasn't too daunting, that's the approach I took here.
I'm pushing this series as a build-breaker fix in a couple of hours,
or sooner if I get a review.
Eric Blake (3):
examples: Work around mingw printf() weakness
examples: Work around lack of mingw sigaction()
examples: Work around lack of mingw localtime_r()
cfg.mk | 2 +-
examples/admin/client_info.c | 6 +++++-
examples/admin/list_clients.c | 6 +++++-
examples/domtop/domtop.c | 13 ++++++-------
examples/object-events/event-test.c | 16 +++++++---------
5 files changed, 24 insertions(+), 19 deletions(-)
--
2.20.1
5 years, 10 months
[libvirt] [PATCH] qemu: Use ULL instead of uint64_t for RDMA GID event
by Michal Privoznik
In the previous commit we are using uint64_t for storing subnet
prefix and interface id that qemu reports in
RDMA_GID_STATUS_CHANGED event. We also report them in some debug
messages. This poses a problem because uint64_t can be UL or ULL
depending on the host architecture and hence we wouldn't know
which format to use. Switch to ULL which is big enough and
doesn't suffer from the issue.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under build breaker and trivial rules.
src/qemu/qemu_monitor.c | 6 +++---
src/qemu/qemu_monitor.h | 12 +++++++-----
src/qemu/qemu_process.c | 6 +++---
3 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 419ea66a6a..7ce5bd668e 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -1688,11 +1688,11 @@ int
qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon,
const char *netdev,
bool gid_status,
- uint64_t subnet_prefix,
- uint64_t interface_id)
+ unsigned long long subnet_prefix,
+ unsigned long long interface_id)
{
int ret = -1;
- VIR_DEBUG("netdev=%s, gid_status=%d, subnet_prefix=0x%lx, interface_id=0x%lx",
+ VIR_DEBUG("netdev=%s, gid_status=%d, subnet_prefix=0x%llx, interface_id=0x%llx",
netdev, gid_status, subnet_prefix, interface_id);
QEMU_MONITOR_CALLBACK(mon, ret, domainRdmaGidStatusChanged, mon->vm,
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 93804233db..8fcac8850f 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -294,8 +294,8 @@ typedef int (*qemuMonitorDomainRdmaGidStatusChangedCallback)(qemuMonitorPtr mon,
virDomainObjPtr vm,
const char *netdev,
bool gid_status,
- uint64_t subnet_prefix,
- uint64_t interface_id,
+ unsigned long long subnet_prefix,
+ unsigned long long interface_id,
void *opaque);
typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks;
@@ -466,9 +466,11 @@ int qemuMonitorEmitPRManagerStatusChanged(qemuMonitorPtr mon,
const char *prManager,
bool connected);
-int qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon, const char *netdev,
- bool gid_status, uint64_t subnet_prefix,
- uint64_t interface_id);
+int qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon,
+ const char *netdev,
+ bool gid_status,
+ unsigned long long subnet_prefix,
+ unsigned long long interface_id);
int qemuMonitorStartCPUs(qemuMonitorPtr mon);
int qemuMonitorStopCPUs(qemuMonitorPtr mon);
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 83a054663f..aad6c12552 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1720,8 +1720,8 @@ qemuProcessHandleRdmaGidStatusChanged(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
virDomainObjPtr vm,
const char *netdev,
bool gid_status,
- uint64_t subnet_prefix,
- uint64_t interface_id,
+ unsigned long long subnet_prefix,
+ unsigned long long interface_id,
void *opaque)
{
virQEMUDriverPtr driver = opaque;
@@ -1731,7 +1731,7 @@ qemuProcessHandleRdmaGidStatusChanged(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
virObjectLock(vm);
- VIR_DEBUG("netdev=%s,gid_status=%d,subnet_prefix=0x%lx,interface_id=0x%lx",
+ VIR_DEBUG("netdev=%s,gid_status=%d,subnet_prefix=0x%llx,interface_id=0x%llx",
netdev, gid_status, subnet_prefix, interface_id);
if (VIR_ALLOC(info) < 0 ||
--
2.19.2
5 years, 10 months
[libvirt] [PATCH 0/2] Fix build on FreeBSD
by Ján Tomko
The recent gnulib update pulled in a commit that broke the build
of examples on FreeBSD
Ján Tomko (2):
examples: add spaces after #include
examples: include config.h
examples/admin/client_close.c | 10 ++++++----
examples/admin/client_info.c | 13 +++++++------
examples/admin/client_limits.c | 8 +++++---
examples/admin/list_clients.c | 10 ++++++----
examples/admin/list_servers.c | 8 +++++---
examples/admin/logging.c | 17 +++++++++--------
examples/admin/threadpool_params.c | 8 +++++---
examples/dommigrate/dommigrate.c | 2 ++
examples/hellolibvirt/hellolibvirt.c | 2 ++
examples/openauth/openauth.c | 2 ++
examples/rename/rename.c | 2 ++
11 files changed, 51 insertions(+), 31 deletions(-)
--
2.16.4
5 years, 10 months