[libvirt] [RFC PATCH REBASE 00/10] introduce push backups
by Nikolay Shirokovskiy
Push backup is a backup when hypervisor itself copy backup data to destination
in contrast to pull backup when hypervisor exports backup data thru some
interface and mgmt itself make a copy.
This patch series basically adds creating backup to API/remote/qemu/virsh and
initial backup XML definition.
Just like other blockjobs backup creation is asynchronous. That is creation is
merely a backup start and client should track backup error/completion thru
blockjob events. As backup is done transactionally all individual disk backup
jobs will be aborted by qemu itself in case of error, client need not to do it
manually. Client can cancel the backup by aborting blockjob on any disk being
backed up.
Backup xml desription is similar to snapshot one with some exceptions and is
described in more details in definition patch [1].
I guess good client will track progress for every disk in backup to report
progress and detect hangs so it don't need extra backup complete/error event
that aggregate the overall backup result. However it looks like aborting backup
can be implemented in libvirt as code will be common for all clients. We need
to abort some of not yet completed per disk backups and retry if job to be
aborted is completed meanwhile.
Of coures this series is far from being complete. Incremental backups and
backup persistent metadata is to be implemented. Let's just start work in this
direction.
Nikolay Shirokovskiy (10):
api: backup: add api to create backup
api: backup: add driver based implementation
remote: backup: add create backup implementation
backup: qemu: monitor: add drive-backup command
backup: misc: add backup block job type
conf: backup: add backup xml definition [1]
qemu: backup: add qemuDomainBackupCreateXML implementation
qemu: backup: check backup destination before start
qemu: backup: prepare backup destination
virsh: backup: add backup-create command
Links:
In [1] we came to agreement to create distinct API to support backup operations
and there is a discussion of pull backup series in [2]. The latter is blocked
as some necessary operations are still experimental in qemu.
[1] https://www.redhat.com/archives/libvir-list/2016-March/msg00937.html
[2] https://www.redhat.com/archives/libvir-list/2016-September/msg00192.html
daemon/remote.c | 8 +
examples/object-events/event-test.c | 3 +
include/libvirt/libvirt-domain-backup.h | 59 +++++++
include/libvirt/libvirt-domain.h | 3 +
include/libvirt/libvirt.h | 1 +
include/libvirt/virterror.h | 2 +
po/POTFILES.in | 2 +
src/Makefile.am | 3 +
src/access/viraccessperm.c | 3 +-
src/access/viraccessperm.h | 6 +
src/conf/backup_conf.c | 299 ++++++++++++++++++++++++++++++++
src/conf/backup_conf.h | 70 ++++++++
src/conf/domain_conf.c | 2 +-
src/datatypes.c | 60 +++++++
src/datatypes.h | 29 ++++
src/driver-hypervisor.h | 5 +
src/libvirt-domain-backup.c | 202 +++++++++++++++++++++
src/libvirt_private.syms | 9 +
src/libvirt_public.syms | 10 ++
src/qemu/qemu_conf.h | 1 +
src/qemu/qemu_driver.c | 239 ++++++++++++++++++++++++-
src/qemu/qemu_monitor.c | 14 ++
src/qemu/qemu_monitor.h | 5 +
src/qemu/qemu_monitor_json.c | 36 ++++
src/qemu/qemu_monitor_json.h | 5 +
src/remote/remote_driver.c | 7 +
src/remote/remote_protocol.x | 23 ++-
src/rpc/gendispatch.pl | 29 +++-
src/util/virerror.c | 6 +
tools/Makefile.am | 1 +
tools/virsh-backup.c | 100 +++++++++++
tools/virsh-backup.h | 29 ++++
tools/virsh-domain.c | 3 +-
tools/virsh-util.c | 11 ++
tools/virsh-util.h | 3 +
tools/virsh.c | 2 +
tools/virsh.h | 1 +
37 files changed, 1279 insertions(+), 12 deletions(-)
create mode 100644 include/libvirt/libvirt-domain-backup.h
create mode 100644 src/conf/backup_conf.c
create mode 100644 src/conf/backup_conf.h
create mode 100644 src/libvirt-domain-backup.c
create mode 100644 tools/virsh-backup.c
create mode 100644 tools/virsh-backup.h
--
1.8.3.1
7 years, 11 months
[libvirt] [PATCH] spec: Update version check for maint Source URL
by Cole Robinson
New maint release version numbers of just A.B.C format, not the old
A.B.C.D format. Adjust the check that dynamically changes the Source
URL for maint releases
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index b249224..734b187 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -233,7 +233,7 @@ Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
URL: http://libvirt.org/
-%if %(echo %{version} | grep -o \\. | wc -l) == 3
+%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
%define mainturl stable_updates/
%endif
Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
--
2.9.3
7 years, 11 months
[libvirt] [PATCH] conf: Check CPU cache for ABI stability
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/conf/cpu_conf.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 1b098c476..194f03faf 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -915,6 +915,16 @@ virCPUDefIsEqual(virCPUDefPtr src,
}
}
+ if ((src->cache && !dst->cache) ||
+ (!src->cache && dst->cache) ||
+ (src->cache && dst->cache &&
+ (src->cache->level != dst->cache->level ||
+ src->cache->mode != dst->cache->mode))) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ "Target CPU cache does not match source");
+ goto cleanup;
+ }
+
identical = true;
cleanup:
--
2.12.2
7 years, 11 months
[libvirt] [PATCH 0/3] Add support for CPU cache specification
by Jiri Denemark
Apparently setting a guest CPU cache (even faked) can dramatically
increase performance in some use cases [1]. This series adds support for
specifying the guest CPU cache in domain XML. See patch 2/3 for more
details and documentation.
[1] https://patchwork.kernel.org/patch/9308401/
Jiri Denemark (3):
conf: Rename mode parameter in virCPUDefParseXML
Add support for CPU cache specification
qemu: Add support for guest CPU cache
docs/formatdomain.html.in | 35 +++++++++++
docs/schemas/cputypes.rng | 21 +++++++
docs/schemas/domaincommon.rng | 3 +
src/conf/cpu_conf.c | 68 +++++++++++++++++++++-
src/conf/cpu_conf.h | 19 ++++++
src/libvirt_private.syms | 2 +
src/qemu/qemu_capabilities.c | 8 +++
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_command.c | 37 ++++++++++++
src/qemu/qemu_domain.c | 54 +++++++++++++++++
.../generic-cpu-cache-disable.xml | 20 +++++++
.../generic-cpu-cache-emulate.xml | 20 +++++++
.../generic-cpu-cache-passthrough.xml | 20 +++++++
.../generic-cpu-cache-disable.xml | 20 +++++++
.../generic-cpu-cache-emulate.xml | 20 +++++++
.../generic-cpu-cache-passthrough.xml | 20 +++++++
tests/genericxml2xmltest.c | 4 ++
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 2 +
.../qemuxml2argv-cpu-cache-disable.args | 21 +++++++
.../qemuxml2argv-cpu-cache-disable.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-disable2.args | 21 +++++++
.../qemuxml2argv-cpu-cache-disable2.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-disable3.args | 22 +++++++
.../qemuxml2argv-cpu-cache-disable3.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-emulate-l2.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-emulate-l3.args | 21 +++++++
.../qemuxml2argv-cpu-cache-emulate-l3.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-passthrough-l3.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-passthrough.args | 21 +++++++
.../qemuxml2argv-cpu-cache-passthrough.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-passthrough2.args | 21 +++++++
.../qemuxml2argv-cpu-cache-passthrough2.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-passthrough3.xml | 20 +++++++
tests/qemuxml2argvtest.c | 16 +++++
34 files changed, 695 insertions(+), 3 deletions(-)
create mode 100644 tests/genericxml2xmlindata/generic-cpu-cache-disable.xml
create mode 100644 tests/genericxml2xmlindata/generic-cpu-cache-emulate.xml
create mode 100644 tests/genericxml2xmlindata/generic-cpu-cache-passthrough.xml
create mode 100644 tests/genericxml2xmloutdata/generic-cpu-cache-disable.xml
create mode 100644 tests/genericxml2xmloutdata/generic-cpu-cache-emulate.xml
create mode 100644 tests/genericxml2xmloutdata/generic-cpu-cache-passthrough.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable2.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable2.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable3.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-emulate-l2.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-emulate-l3.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-emulate-l3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough-l3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough2.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough2.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough3.xml
--
2.12.2
7 years, 11 months
[libvirt] [PATCH] Adding POWER9 cpu model to cpu_map.xml
by Kothapally Madhu Pavan
As POWER9 model is not available in cpu_map.xml virsh capabilities
donot display the cpu model and vendor details. This patch
provides those details
---
src/cpu/cpu_map.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
index 7d5540a..29b5b59 100644
--- a/src/cpu/cpu_map.xml
+++ b/src/cpu/cpu_map.xml
@@ -1571,6 +1571,11 @@
<pvr value='0x004d0000' mask='0xffff0000'/>
</model>
+ <model name='POWER9'>
+ <vendor name='IBM'/>
+ <pvr value='0x004e0000' mask='0xffff0000'/>
+ </model>
+
<!-- Freescale-based CPU models -->
<model name='POWERPC_e5500'>
<vendor name='Freescale'/>
7 years, 11 months
[libvirt] [PATCH v3 0/6] Add mdev reporting capability to the nodedev driver
by Erik Skultety
since v1:
- dropped the <description> element from the parent device nested capability
- added missing RNG schema and tests
- updated the documentation to describe the MDEV elements in both the parent
and the child
since v2:
- I further split our PCI sub-capability parser into more blocks as suggested
- instead of one capability 'mdev' for both mdev device and physical parent I
introduced 2, so we can do virsh nodedev-list --cap 'mdev_types' | 'mdev' to
see either parent devices or the mediated devices themselves
- other minor adjustments pointed out during review.
Erik
Erik Skultety (6):
mdev: Pass a uuidstr rather than an mdev object to some util functions
nodedev: conf: Split PCI sub-capability parsing to separate methods
nodedev: Introduce new mdev_types and mdev nodedev capabilities
nodedev: Introduce the mdev capability to a PCI parent device
nodedev: Introduce mdev capability for mediated devices
docs: Document the mediated devices within the nodedev driver
docs/drvnodedev.html.in | 164 +++++++++++-
docs/schemas/nodedev.rng | 43 ++++
include/libvirt/libvirt-nodedev.h | 2 +
src/conf/node_device_conf.c | 279 +++++++++++++++++----
src/conf/node_device_conf.h | 29 ++-
src/conf/virnodedeviceobj.c | 11 +-
src/libvirt-nodedev.c | 2 +
src/libvirt_private.syms | 1 +
src/node_device/node_device_driver.c | 2 +
src/node_device/node_device_udev.c | 165 +++++++++++-
src/qemu/qemu_domain.c | 8 +-
src/security/security_apparmor.c | 10 +-
src/security/security_dac.c | 20 +-
src/security/security_selinux.c | 20 +-
src/util/virmdev.c | 21 +-
src/util/virmdev.h | 4 +-
.../mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml | 8 +
.../pci_0000_02_10_7_mdev_types.xml | 32 +++
tests/nodedevxml2xmltest.c | 2 +
tools/virsh-nodedev.c | 6 +
20 files changed, 712 insertions(+), 117 deletions(-)
create mode 100644 tests/nodedevschemadata/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml
create mode 100644 tests/nodedevschemadata/pci_0000_02_10_7_mdev_types.xml
--
2.12.2
7 years, 11 months
[libvirt] [PATCH] tests: fix virfilewrapper
by Roman Bogorodskiy
If __lxstat() and __xstat() functions are not available, build fails with:
CC virfilewrapper.o
virfilewrapper.c:180:5: error: no previous prototype for function '__lxstat' [-Werror,-Wmissing-prototypes]
int __lxstat(int ver, const char *path, struct stat *sb)
^
virfilewrapper.c:208:5: error: no previous prototype for function '__xstat' [-Werror,-Wmissing-prototypes]
int __xstat(int ver, const char *path, struct stat *sb)
Luckily, we already check presence of these functions in configure
using AC_CHECK_FUNCS, so just don't wrap these if they're not available.
Signed-off-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
---
Pushed under build-breaker fix.
tests/virfilewrapper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c
index 75c32bfca..5ea70b34d 100644
--- a/tests/virfilewrapper.c
+++ b/tests/virfilewrapper.c
@@ -177,6 +177,7 @@ int access(const char *path, int mode)
return ret;
}
+#ifdef HAVE___LXSTAT
int __lxstat(int ver, const char *path, struct stat *sb)
{
int ret = -1;
@@ -190,6 +191,7 @@ int __lxstat(int ver, const char *path, struct stat *sb)
return ret;
}
+#endif /* HAVE___LXSTAT */
int lstat(const char *path, struct stat *sb)
{
@@ -205,6 +207,7 @@ int lstat(const char *path, struct stat *sb)
return ret;
}
+#ifdef HAVE___XSTAT
int __xstat(int ver, const char *path, struct stat *sb)
{
int ret = -1;
@@ -218,6 +221,7 @@ int __xstat(int ver, const char *path, struct stat *sb)
return ret;
}
+#endif /* HAVE___XSTAT */
int stat(const char *path, struct stat *sb)
{
--
2.12.1
7 years, 11 months
[libvirt] [PATCH] util: Define SYSFS_SYSTEM_PATH unconditionally in virhostcpu
by Martin Kletzander
The code is already prepared to handle the non-existence of it.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Pushed under the build-breaker rule.
src/util/virhostcpu.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 317c52410a0b..aa9cfeac203c 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -188,10 +188,15 @@ virHostCPUGetStatsFreeBSD(int cpuNum,
#endif /* __FreeBSD__ */
+/*
+ * Even though it doesn't exist on some platforms, the code is adjusted for
+ * graceful handling of that so that we don't have too many stub functions.
+ */
+#define SYSFS_SYSTEM_PATH "/sys/devices/system"
+
#ifdef __linux__
# define CPUINFO_PATH "/proc/cpuinfo"
# define PROCSTAT_PATH "/proc/stat"
-# define SYSFS_SYSTEM_PATH "/sys/devices/system"
# define VIR_HOST_CPU_MASK_LEN 1024
# define LINUX_NB_CPU_STATS 4
--
2.12.2
7 years, 11 months
[libvirt] [PATCH] Don't use ceph-devel on Fedora
by Daniel P. Berrange
A previous commit changed the spec to use librbd1-devel on
RHEL-7, since this replaces ceph-devel from RHEL-6:
commit 6cfc8834c858849cc74c3082078dc91fb1cbae38
Author: Peter Krempa <pkrempa(a)redhat.com>
Date: Thu Mar 5 11:40:54 2015 +0100
spec: Enable RBD storage driver in RHEL-7
Use correct package names too as they differ.
RHEL-7 inherited this split from Fedora though, so it should
have also made Fedora use the new names.
This was missed, because Fedora still provides a (deprecated)
back-compat RPM for ceph-devel that just pulls in librbd1-devel
(and others).
Fixing this stops libvirt pulling Java into the build root in
Fedora.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index b249224..4c7b658 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -359,7 +359,7 @@ BuildRequires: parted-devel
# For Multipath support
BuildRequires: device-mapper-devel
%if %{with_storage_rbd}
- %if 0%{?rhel} >= 7
+ %if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: librados2-devel
BuildRequires: librbd1-devel
%else
--
2.9.3
7 years, 11 months