This is a subset of v9 of incremental backup, fixing most of the
review comments that Peter gave on v8.5. The qemu portions in
patch 11 and 12 could probably still use some cleanups to address
feedback in v8 and v8.5; and I also intend to post a followup
series for the backup APIs on Monday to form the full backup-v9
tag.
Here's a comparison of these patches to v8.5:
- rebase on top of master, and on top of my series '[0/8] more
snapshot improvements':
https://www.redhat.com/archives/libvir-list/2019-July/msg00224.html
- add interlock error between snapshots and checkpoints: until we
finish the design of how those two will interact, it's easier to
ensure we don't let the user get into a weird state that we will
then be stuck with supporting down the road
- avoid some technical debt; Peter pointed out several places to
improve, and I've done a lot of those (there's probably still more
that can be done, but at least 1-10 feel more polished)
- Rework the notion of a current checkpoint. We are stuck with a
domain having a single current snapshot, and my implementation for
qemu happens to use a single current checkpoint, but Peter pointed
out that other hypervisors might have multiple current snapshots.
As such, I deleted the API virDomainSnapshotCurrent (which could
only report just one) and instead replaced it with new filter
flags for virDomainListAllSnapshots
- With a current checkpoint being exposed in the XML, there were lots
of simplifications to virsh (no longer possible to change which
checkpoint is current by abuse of redefine)
- With current checkpoint in the public XML, there is no longer a need
for a PARSE_INTERNAL or FORMAT_INTERNAL flag
- Add testsuite coverage of the test_driver checkpoint implementation
(which in turn allowed me to fine-tune several of the other patches
based on what it turned up) (see patch 10)
- Fix several typos/grammars/copy-paste leftovers
- defer virDomainCheckpointIsCurrent to a later patch (see patch 13);
we may decide we don't need the API and that parsing XML frrom
virDomainCheckpointGetXMLDesc is sufficient
001/13:[0068] [FC] 'backup: Document new XML for checkpoints'
002/13:[0186] [FC] 'backup: Introduce virDomainCheckpoint APIs'
003/13:[0021] [FC] 'backup: Document nuances between different state capture
APIs'
004/13:[0099] [FC] 'backup: Parse and output checkpoint XML'
005/13:[0070] [FC] 'backup: Allow for lists of checkpoint objects'
006/13:[----] [--] 'backup: Add new domain:checkpoint access control'
007/13:[0072] [FC] 'backup: Implement checkpoint APIs for remote driver'
008/13:[0527] [FC] 'backup: Implement virsh support for checkpoints'
009/13:[0097] [FC] 'backup: test: Implement metadata tracking for checkpoint
APIs'
010/13:[down] 'backup: Add virsh-checkpoints test'
011/13:[0132] [FC] 'backup: qemu: Implement metadata tracking for checkpoint
APIs'
012/13:[----] [-C] 'backup: Wire up qemu checkpoint commands over QMP'
013/13:[down] 'backup: Add virDomainCheckpointIsCurrent API'
Eric Blake (13):
backup: Document new XML for checkpoints
backup: Introduce virDomainCheckpoint APIs
backup: Document nuances between different state capture APIs
backup: Parse and output checkpoint XML
backup: Allow for lists of checkpoint objects
backup: Add new domain:checkpoint access control
backup: Implement checkpoint APIs for remote driver
backup: Implement virsh support for checkpoints
backup: test: Implement metadata tracking for checkpoint APIs
backup: Add virsh-checkpoints test
backup: qemu: Implement metadata tracking for checkpoint APIs
backup: Wire up qemu checkpoint commands over QMP
backup: Add virDomainCheckpointIsCurrent API
include/libvirt/libvirt-domain-checkpoint.h | 147 ++
include/libvirt/libvirt-domain.h | 6 +
include/libvirt/libvirt.h | 5 +-
src/access/viraccessperm.h | 6 +
src/conf/checkpoint_conf.h | 93 ++
src/conf/domain_conf.h | 2 +
src/conf/virconftypes.h | 9 +
src/conf/virdomaincheckpointobjlist.h | 74 +
src/conf/virdomainmomentobjlist.h | 5 +-
src/conf/virdomainobjlist.h | 7 +-
src/driver-hypervisor.h | 43 +
src/qemu/qemu_block.h | 3 +
src/qemu/qemu_conf.h | 2 +
src/qemu/qemu_domain.h | 15 +
tools/virsh-checkpoint.h | 26 +
tools/virsh-completer.h | 4 +
tools/virsh-util.h | 3 +
tools/virsh.h | 1 +
docs/Makefile.am | 3 +
docs/apibuild.py | 2 +
docs/docs.html.in | 9 +-
docs/domainstatecapture.html.in | 314 +++++
docs/format.html.in | 1 +
docs/formatcheckpoint.html.in | 220 +++
docs/formatsnapshot.html.in | 6 +-
docs/index.html.in | 3 +-
docs/schemas/domaincheckpoint.rng | 95 ++
libvirt.spec.in | 2 +
mingw-libvirt.spec.in | 4 +
po/POTFILES | 3 +
src/Makefile.am | 2 +
src/access/viraccessperm.c | 3 +-
src/conf/Makefile.inc.am | 4 +
src/conf/checkpoint_conf.c | 630 +++++++++
src/conf/domain_conf.c | 6 +
src/conf/virdomaincheckpointobjlist.c | 232 ++++
src/conf/virdomainmomentobjlist.c | 2 +-
src/conf/virdomainobjlist.c | 11 +
src/libvirt-domain-checkpoint.c | 624 +++++++++
src/libvirt-domain.c | 19 +-
src/libvirt_private.syms | 26 +
src/libvirt_public.syms | 17 +
src/qemu/qemu_block.c | 12 +
src/qemu/qemu_conf.c | 5 +
src/qemu/qemu_domain.c | 182 +++
src/qemu/qemu_driver.c | 787 +++++++++++
src/remote/remote_daemon_dispatch.c | 20 +
src/remote/remote_driver.c | 25 +-
src/remote/remote_protocol.x | 139 +-
src/remote_protocol-structs | 77 ++
src/rpc/gendispatch.pl | 32 +-
src/test/test_driver.c | 415 ++++++
tests/Makefile.am | 12 +-
tests/qemudomaincheckpointxml2xmlin/empty.xml | 1 +
.../qemudomaincheckpointxml2xmlin/sample.xml | 7 +
tests/qemudomaincheckpointxml2xmlin/size.xml | 4 +
.../qemudomaincheckpointxml2xmlout/empty.xml | 8 +
.../internal-active-invalid.xml | 53 +
.../internal-inactive-invalid.xml | 53 +
.../redefine.xml | 64 +
.../qemudomaincheckpointxml2xmlout/sample.xml | 13 +
tests/qemudomaincheckpointxml2xmlout/size.xml | 12 +
tests/qemudomaincheckpointxml2xmltest.c | 213 +++
tests/virschematest.c | 2 +
tests/virsh-checkpoint | 181 +++
tests/virsh-snapshot | 12 +-
tools/Makefile.am | 1 +
tools/virsh-checkpoint.c | 1215 +++++++++++++++++
tools/virsh-completer.c | 51 +
tools/virsh-domain-monitor.c | 23 +
tools/virsh-domain.c | 7 +
tools/virsh-util.c | 11 +
tools/virsh.c | 2 +
tools/virsh.pod | 221 ++-
74 files changed, 6508 insertions(+), 41 deletions(-)
create mode 100644 include/libvirt/libvirt-domain-checkpoint.h
create mode 100644 src/conf/checkpoint_conf.h
create mode 100644 src/conf/virdomaincheckpointobjlist.h
create mode 100644 tools/virsh-checkpoint.h
create mode 100644 docs/domainstatecapture.html.in
create mode 100644 docs/formatcheckpoint.html.in
create mode 100644 docs/schemas/domaincheckpoint.rng
create mode 100644 src/conf/checkpoint_conf.c
create mode 100644 src/conf/virdomaincheckpointobjlist.c
create mode 100644 src/libvirt-domain-checkpoint.c
create mode 100644 tests/qemudomaincheckpointxml2xmlin/empty.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlin/sample.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlin/size.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/empty.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/internal-active-invalid.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/internal-inactive-invalid.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/redefine.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/sample.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/size.xml
create mode 100644 tests/qemudomaincheckpointxml2xmltest.c
create mode 100755 tests/virsh-checkpoint
create mode 100644 tools/virsh-checkpoint.c
--
2.20.1