[libvirt] [PATCH] storage: Fix volStorageBackendRBDRefreshVolInfo
by Yi Li
Fix the return value status comparison checking for call to
volStorageBackendRBDRefreshVolInfo introduced by commit id f46d137e.
we only should fail when the return is < 0. -ENOENT, -ETIMEDOUT will
ignore according commit id f46d137e.
Signed-off-by: Yi Li <yili(a)winhong.com>
---
src/storage/storage_backend_rbd.c | 40 ++++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 15 deletions(-)
diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c
index 7ce26ed..1551cf4 100644
--- a/src/storage/storage_backend_rbd.c
+++ b/src/storage/storage_backend_rbd.c
@@ -411,6 +411,7 @@ volStorageBackendRBDGetFeatures(rbd_image_t image,
int r, ret = -1;
if ((r = rbd_get_features(image, features)) < 0) {
+ ret = r;
virReportSystemError(-r, _("failed to get the features of RBD image "
"%s"), volname);
goto cleanup;
@@ -427,16 +428,19 @@ volStorageBackendRBDGetFlags(rbd_image_t image,
const char *volname,
uint64_t *flags)
{
- int rc;
+ int r, ret = -1;
- if ((rc = rbd_get_flags(image, flags)) < 0) {
- virReportSystemError(-rc,
+ if ((r = rbd_get_flags(image, flags)) < 0) {
+ ret = r;
+ virReportSystemError(-r,
_("failed to get the flags of RBD image %s"),
volname);
- return -1;
+ goto cleanup;
}
+ ret = 0;
- return 0;
+ cleanup:
+ return ret;
}
static bool
@@ -470,6 +474,7 @@ virStorageBackendRBDSetAllocation(virStorageVolDefPtr vol,
if ((r = rbd_diff_iterate2(image, NULL, 0, info->size, 0, 1,
&virStorageBackendRBDRefreshVolInfoCb,
&allocation)) < 0) {
+ ret = r;
virReportSystemError(-r, _("failed to iterate RBD image '%s'"),
vol->name);
goto cleanup;
@@ -525,24 +530,28 @@ volStorageBackendRBDRefreshVolInfo(virStorageVolDefPtr vol,
uint64_t flags;
if ((r = rbd_open_read_only(ptr->ioctx, vol->name, &image, NULL)) < 0) {
- ret = -r;
+ ret = r;
virReportSystemError(-r, _("failed to open the RBD image '%s'"),
vol->name);
goto cleanup;
}
if ((r = rbd_stat(image, &info, sizeof(info))) < 0) {
- ret = -r;
+ ret = r;
virReportSystemError(-r, _("failed to stat the RBD image '%s'"),
vol->name);
goto cleanup;
}
- if (volStorageBackendRBDGetFeatures(image, vol->name, &features) < 0)
+ if ((r = volStorageBackendRBDGetFeatures(image, vol->name, &features)) < 0) {
+ ret = r;
goto cleanup;
+ }
- if (volStorageBackendRBDGetFlags(image, vol->name, &flags) < 0)
+ if ((r = volStorageBackendRBDGetFlags(image, vol->name, &flags)) < 0) {
+ ret = r;
goto cleanup;
+ }
vol->target.capacity = info.size;
vol->type = VIR_STORAGE_VOL_NETWORK;
@@ -555,8 +564,11 @@ volStorageBackendRBDRefreshVolInfo(virStorageVolDefPtr vol,
"Querying for actual allocation",
def->source.name, vol->name);
- if (virStorageBackendRBDSetAllocation(vol, image, &info) < 0)
+ if ((r = virStorageBackendRBDSetAllocation(vol, image, &info) < 0)) {
+ ret = r;
goto cleanup;
+ }
+
} else {
vol->target.allocation = info.obj_size * info.num_objs;
}
@@ -734,12 +746,10 @@ virStorageBackendRBDRefreshPool(virStoragePoolObjPtr pool)
*
* Do not error out and simply ignore the volume
*/
- if (r < 0) {
- if (r == -ENOENT || r == -ETIMEDOUT)
- continue;
-
+ if (r == -ENOENT || r == -ETIMEDOUT)
+ continue;
+ else if (r < 0)
goto cleanup;
- }
if (virStoragePoolObjAddVol(pool, vol) < 0)
goto cleanup;
--
2.7.5
4 years, 11 months
[libvirt] virsh blockresize syntax is inconsistent with vol-resize and somewhat dangerous
by Tim Small
Hello,
virsh has two commands which can be used to resize block devices -
"blockresize" for volumes in use by and active guest, and "vol-resize"
for volumes which are not in use.
The vol-resize syntax allows to specify the size as a delta (increase or
decrease vs. the current size), and also refuses to shrink a volume
unless the "--shrink" argument is also passed.
Most other tools which can be used for block device resizing (outside of
libvirt) also have similar "--shrink" argument requirements when
reducing the size of an existing block device. e.g. ceph requires
"--allow-shrink" when using the "rbd resize" command.
The lack of such a safety device makes "blockresize" a foot-gun (which I
recently found to great effect when I typoed the domain name to another
valid domain).
It seems I am not alone in making this error e.g.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902171
One possible solution would be to make a new command e.g. "domblkresize"
or perhaps "live-resize", which implement the "--shrink" and "--delta"
behaviour to make it consistent with "vol-resize" syntax, and mark the
"blockresize" command as deprecated in the documentation and help (so
that existing automation which depends on the current behaviour doesn't
break).
Any thoughts? Should I open this as an RFE?
Thanks,
Tim.
--
South East Open Source Solutions Limited
Registered in England and Wales with company number 06134732.
Registered Office: 2 Powell Gardens, Redhill, Surrey, RH1 1TQ
VAT number: 900 6633 53 http://seoss.co.uk/ +44-(0)1273-808309
4 years, 11 months
[libvirt] [PATCH 1/1] qemu: hide details of fake reboot
by Nikolay Shirokovskiy
If we use fake reboot then domain goes thru running->shutdown->running
state changes with shutdown state only for short period of time. At
least this is implementation details leaking into API. And also there is
one real case when this is not convinient. I'm doing a backup with the
help of temporary block snapshot (with the help of qemu's API which is
used in the newly created libvirt's backup API). If guest is shutdowned
I want to continue to backup so I don't kill the process and domain is
in shutdown state. Later when backup is finished I want to destroy qemu
process. So I check if it is in shutdowned state and destroy it if it
is. Now if instead of shutdown domain got fake reboot then I can destroy
process in the middle of fake reboot process.
After shutdown event we also get stop event and now as domain state is
running it will be transitioned to paused state and back to running
later. Though this is not critical for the described case I guess it is
better not to leak these details to user too. So let's leave domain in
running state on stop event if fake reboot is in process.
As we don't know when stop event really arrive let's move resetting flag
after starting CPUs - at this point stop event should be handled.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
src/qemu/qemu_process.c | 57 ++++++++++++++++++++++-------------------
1 file changed, 31 insertions(+), 26 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index ed8666e9d1..2d37f92724 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -500,6 +500,8 @@ qemuProcessFakeReboot(void *opaque)
goto endjob;
}
+ qemuDomainSetFakeReboot(driver, vm, false);
+
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0) {
VIR_WARN("Unable to save status on vm %s after state change",
vm->def->name);
@@ -525,7 +527,6 @@ qemuProcessShutdownOrReboot(virQEMUDriverPtr driver,
qemuDomainObjPrivatePtr priv = vm->privateData;
if (priv->fakeReboot) {
- qemuDomainSetFakeReboot(driver, vm, false);
virObjectRef(vm);
virThread th;
if (virThreadCreate(&th,
@@ -534,6 +535,7 @@ qemuProcessShutdownOrReboot(virQEMUDriverPtr driver,
vm) < 0) {
VIR_ERROR(_("Failed to create reboot thread, killing domain"));
ignore_value(qemuProcessKill(vm, VIR_QEMU_PROCESS_KILL_NOWAIT));
+ qemuDomainSetFakeReboot(driver, vm, false);
virObjectUnref(vm);
}
} else {
@@ -595,35 +597,37 @@ qemuProcessHandleShutdown(qemuMonitorPtr mon G_GNUC_UNUSED,
goto unlock;
}
- VIR_DEBUG("Transitioned guest %s to shutdown state",
- vm->def->name);
- virDomainObjSetState(vm,
- VIR_DOMAIN_SHUTDOWN,
- VIR_DOMAIN_SHUTDOWN_UNKNOWN);
+ if (!priv->fakeReboot) {
+ VIR_DEBUG("Transitioned guest %s to shutdown state",
+ vm->def->name);
+ virDomainObjSetState(vm,
+ VIR_DOMAIN_SHUTDOWN,
+ VIR_DOMAIN_SHUTDOWN_UNKNOWN);
- switch (guest_initiated) {
- case VIR_TRISTATE_BOOL_YES:
- detail = VIR_DOMAIN_EVENT_SHUTDOWN_GUEST;
- break;
+ switch (guest_initiated) {
+ case VIR_TRISTATE_BOOL_YES:
+ detail = VIR_DOMAIN_EVENT_SHUTDOWN_GUEST;
+ break;
- case VIR_TRISTATE_BOOL_NO:
- detail = VIR_DOMAIN_EVENT_SHUTDOWN_HOST;
- break;
+ case VIR_TRISTATE_BOOL_NO:
+ detail = VIR_DOMAIN_EVENT_SHUTDOWN_HOST;
+ break;
- case VIR_TRISTATE_BOOL_ABSENT:
- case VIR_TRISTATE_BOOL_LAST:
- default:
- detail = VIR_DOMAIN_EVENT_SHUTDOWN_FINISHED;
- break;
- }
+ case VIR_TRISTATE_BOOL_ABSENT:
+ case VIR_TRISTATE_BOOL_LAST:
+ default:
+ detail = VIR_DOMAIN_EVENT_SHUTDOWN_FINISHED;
+ break;
+ }
- event = virDomainEventLifecycleNewFromObj(vm,
- VIR_DOMAIN_EVENT_SHUTDOWN,
- detail);
+ event = virDomainEventLifecycleNewFromObj(vm,
+ VIR_DOMAIN_EVENT_SHUTDOWN,
+ detail);
- if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0) {
- VIR_WARN("Unable to save status on vm %s after state change",
- vm->def->name);
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0) {
+ VIR_WARN("Unable to save status on vm %s after state change",
+ vm->def->name);
+ }
}
if (priv->agent)
@@ -657,7 +661,8 @@ qemuProcessHandleStop(qemuMonitorPtr mon G_GNUC_UNUSED,
reason = priv->pausedReason;
priv->pausedReason = VIR_DOMAIN_PAUSED_UNKNOWN;
- if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
+ if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING &&
+ !priv->fakeReboot) {
if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_OUT) {
if (priv->job.current->status == QEMU_DOMAIN_JOB_STATUS_POSTCOPY)
reason = VIR_DOMAIN_PAUSED_POSTCOPY;
--
2.23.0
4 years, 11 months
[libvirt] [PATCH] security: apparmor: Label externalDataStore
by Cole Robinson
Teach virt-aa-helper how to label a qcow2 data_file, tracked internally
as externalDataStore. It should be treated the same as its sibling
disk image
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
Compiled but not runtime tested, I don't have an apparmor setup
src/security/virt-aa-helper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 509187ac36..fe6fa12550 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -949,6 +949,10 @@ storage_source_add_files(virStorageSourcePtr src,
if (add_file_path(tmp, depth, buf) < 0)
return -1;
+ if (src->externalDataStore &&
+ storage_source_add_files(src->externalDataStore, buf, depth) < 0)
+ return -1;
+
depth++;
}
--
2.23.0
4 years, 11 months
[libvirt] [PATCH 0/2] qemu: cold-plug and cold-unplug of sound
by Jidong Xia
With this patch users can cold plug and unplug some sound devices.
Jidong Xia (2):
qemu: cold-plug of sound
qemu: cold-unplug of sound
src/conf/domain_conf.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++
src/conf/domain_conf.h | 2 ++
src/libvirt_private.syms | 2 ++
src/qemu/qemu_driver.c | 18 ++++++++++++--
4 files changed, 81 insertions(+), 2 deletions(-)
--
1.8.3.1
5 years
[libvirt] [ruby PATCH] Fix default values for node_cpu_stats() and node_memory_stats()
by Stefano Garzarella
ruby_libvirt_value_to_int() returns 0 if the optional value is
not defined, but in node_cpu_stats() and node_memory_stats()
the default value of cpuNum and cellNum is -1.
Reported-by: Charlie Smurthwaite <charlie(a)atech.media>
Signed-off-by: Stefano Garzarella <sgarzare(a)redhat.com>
---
ext/libvirt/connect.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/ext/libvirt/connect.c b/ext/libvirt/connect.c
index 5932535..b2d041b 100644
--- a/ext/libvirt/connect.c
+++ b/ext/libvirt/connect.c
@@ -2079,7 +2079,12 @@ static VALUE libvirt_connect_node_cpu_stats(int argc, VALUE *argv, VALUE c)
rb_scan_args(argc, argv, "02", &intparam, &flags);
- tmp = ruby_libvirt_value_to_int(intparam);
+ if (NIL_P(intparam)) {
+ tmp = -1;
+ }
+ else {
+ tmp = ruby_libvirt_value_to_int(intparam);
+ }
return ruby_libvirt_get_parameters(c, ruby_libvirt_value_to_uint(flags),
(void *)&tmp, sizeof(virNodeCPUStats),
@@ -2139,7 +2144,12 @@ static VALUE libvirt_connect_node_memory_stats(int argc, VALUE *argv, VALUE c)
rb_scan_args(argc, argv, "02", &intparam, &flags);
- tmp = ruby_libvirt_value_to_int(intparam);
+ if (NIL_P(intparam)) {
+ tmp = -1;
+ }
+ else {
+ tmp = ruby_libvirt_value_to_int(intparam);
+ }
return ruby_libvirt_get_parameters(c, ruby_libvirt_value_to_uint(flags),
(void *)&tmp, sizeof(virNodeMemoryStats),
--
2.21.0
5 years
[libvirt] [PATCH 0/2] Deprecate implicit filters
by Vladimir Sementsov-Ogievskiy
Hi all!
Max's series to fix some problems around filters consists of 42 patches.
I'm sure that we didn't find all bugs around filters, and that filters
would be a constant source of bugs in future, as during developing new
feature nobody will consider all possible cases of dealing with filters
(OK, somebody will, but it's hard).
So, I'm thinking about starting some deprecations which will help us to
simplify all the picture at least in not far future. So, I'd really want
to deprecate implicit filters, ->file child based filters (move all
filters to use backing child), filename based interfaces (use node-names).
Most simple thing is implicit filters, so let's start from them.
drive-mirror don't support filter-node-name, so I propose to deprecate
it at all, together with drive-backup, instead of adding support of
filter-node-name, what do you think?
Vladimir Sementsov-Ogievskiy (2):
qapi: deprecate drive-mirror and drive-backup
qapi: deprecate implicit filters
qemu-deprecated.texi | 11 +++++++++++
qapi/block-core.json | 10 ++++++++--
qapi/transaction.json | 2 +-
include/block/block_int.h | 10 +++++++++-
blockdev.c | 20 ++++++++++++++++++++
5 files changed, 49 insertions(+), 4 deletions(-)
--
2.18.0
5 years
[libvirt] [PATCH RFC 00/40] qemu: Add support for incremental backups
by Peter Krempa
This series is my attempt to clean up and finish incremental backup as
it was last posted in v10 here:
https://www.redhat.com/archives/libvir-list/2019-August/msg01018.html
Out of that series, patch 1 was dropped for now and I'll revisit it
later. The patches adding docs, xml parsing and job plumbing were
partially modified and stripped of currently unimplemented
functionality.
The qemu implementation was completely rewritten.
Of the new series first 28 patches are cleanups and can be reviewed for
pushing.
The main incremental backup functionality is not complete yet and should
not be pushed right now not even in experimental (disabled [1]) state
due to possible API changes:
- figure out whether we want our own event for the backup job or want to
deal with the domain job event
- if we go with the domain job event everything must be rewritten as a
single domain job
- otherwise plumbing for the event must be added
- documentation must reflect the above
after that will be sorted out the following needs to be done until we
can finally enable it:
- more testing. I merely verified that qemu generates files/exports NBD
- blockjob support for bitmaps (for commit/pull/copy)
- snapshot support for bitmaps
- merging of bitmaps accross backing chain entries
- figuring out a more elegant way to do the bitmap for the backup than
creating two, one for the 'store' (for NBD server) and one for the disk
itself.
- ...
Until then the following XML can be used to enable the functionality for
testing without any guarantee [1]:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
...
<qemu:capabilities>
<qemu:add capability='blockdev'/>
<qemu:add capability='incremental-backup'/>
</qemu:capabilities>
</domain>
Eric Blake (5):
backup: Document new XML for backups
backup: Introduce virDomainBackup APIs
backup: Implement backup APIs for remote driver
backup: Parse and output backup XML
backup: Implement virsh support for backup
Peter Krempa (35):
util: hash: Add possibility to use simpler data free function in
virHash
util: hash: Add new constructor 'virHashNew'
util: hash: Introduce virHashHasEntry
qemu: domain: Split out setup of virStorageSource from qemu driver
config
qemu: domain: Remove pointless return value in
qemuDomainPrepareDiskSourceData
qemu: domain: clarify sematics of qemuDomainPrepareDiskSourceData
qemu: domain: Tolerate NULL @disk in qemuDomainPrepareDiskSourceData
conf: Remove virDomainDiskPathByName
conf: Introduce virDomainDiskByTarget
qemu: Replace use of virDomainDiskFindByBusAndDst with
virDomainDiskByTarget
conf: Remove unused virDomainDiskFindByBusAndDst
Replace virDomainDiskByName by virDomainDiskByTarget in appropriate
cases
qemu: monitor: Introduce new interface to query-named-block-nodes
qemu: block: Don't query monitor in
qemuBlockStorageSourceCreateDetectSize
qemu: checkpoint: Fix rollback and access to unlocked 'vm' when
deleting checkpoints
qemu: monitor: Remove non-transaction based dirty bitmap APIs
conf: snapshot: Don't clear current snapshot when redefining an
existing one
conf: snapshot: Remove 'update_current' parameter from
virDomainSnapshotRedefinePrep
conf: Don't reuse variable for different object in
virDomainCheckpointRedefinePrep
conf: checkpoint: Don't clear current checkpoint when redefining an
existing one
conf: checkpoint: Don't clear current checkpoint when redefining
qemu: checkpoint: Enforce that 'bitmap' name must match checkpoint
name
qemu: checkpoint: Split out checkpoint creation code
qemu: checkpoint: Extract finalizing steps of checkpoint creation
qemu: monitor: Add helper for generating data for block bitmap merging
qemu: checkpoint: Use qemuMonitorTransactionBitmapMergeSourceAddBitmap
qemu: blockjob: Refactor qemuBlockJobEventProcessConcludedTransition
qemu: blockjob: Use 'g_free' in qemuBlockJobDataDispose
Add 'backup' block job type
qemu: monitor: Add support for blockdev-backup via 'transaction'
qemu: domain: Track backup job data in the status XML
qemu: blockjob: Track internal data for 'backup' blockjob
tests: qemustatusxml2xml: Add test for 'pull' type backup job
qemu: Implement backup job APIs and qemu handling
qemu: blockjob: Implement concluded blockjob handler for backup
blockjobs
docs/docs.html.in | 3 +-
docs/format.html.in | 1 +
docs/formatbackup.html.in | 168 ++++
docs/formatcheckpoint.html.in | 12 +-
docs/index.html.in | 3 +-
docs/schemas/domainbackup.rng | 219 +++++
examples/c/misc/event-test.c | 3 +
include/libvirt/libvirt-domain.h | 29 +-
libvirt.spec.in | 1 +
mingw-libvirt.spec.in | 2 +
src/conf/Makefile.inc.am | 2 +
src/conf/backup_conf.c | 518 ++++++++++
src/conf/backup_conf.h | 102 ++
src/conf/checkpoint_conf.c | 17 +-
src/conf/domain_addr.c | 4 +-
src/conf/domain_conf.c | 50 +-
src/conf/domain_conf.h | 8 +-
src/conf/snapshot_conf.c | 6 -
src/conf/snapshot_conf.h | 1 -
src/conf/virconftypes.h | 3 +
src/driver-hypervisor.h | 20 +
src/libvirt-domain-checkpoint.c | 7 +-
src/libvirt-domain.c | 191 ++++
src/libvirt_private.syms | 13 +-
src/libvirt_public.syms | 8 +
src/libxl/libxl_driver.c | 2 +-
src/qemu/Makefile.inc.am | 2 +
src/qemu/qemu_backup.c | 895 ++++++++++++++++++
src/qemu/qemu_backup.h | 41 +
src/qemu/qemu_block.c | 26 +-
src/qemu/qemu_block.h | 5 +-
src/qemu/qemu_blockjob.c | 171 ++--
src/qemu/qemu_blockjob.h | 19 +
src/qemu/qemu_checkpoint.c | 232 +++--
src/qemu/qemu_checkpoint.h | 15 +
src/qemu/qemu_domain.c | 161 +++-
src/qemu/qemu_domain.h | 11 +-
src/qemu/qemu_driver.c | 116 ++-
src/qemu/qemu_hotplug.c | 2 +-
src/qemu/qemu_migration.c | 3 +-
src/qemu/qemu_monitor.c | 91 +-
src/qemu/qemu_monitor.h | 49 +-
src/qemu/qemu_monitor_json.c | 242 ++---
src/qemu/qemu_monitor_json.h | 33 +-
src/remote/remote_driver.c | 3 +
src/remote/remote_protocol.x | 53 +-
src/remote_protocol-structs | 28 +
src/test/test_driver.c | 2 +-
src/util/vircgroup.c | 2 +-
src/util/virhash.c | 85 +-
src/util/virhash.h | 12 +
tests/Makefile.am | 2 +
tests/domainbackupxml2xmlin/backup-pull.xml | 9 +
tests/domainbackupxml2xmlin/backup-push.xml | 9 +
tests/domainbackupxml2xmlin/empty.xml | 1 +
tests/domainbackupxml2xmlout/backup-pull.xml | 9 +
tests/domainbackupxml2xmlout/backup-push.xml | 9 +
tests/domainbackupxml2xmlout/empty.xml | 7 +
tests/qemublocktest.c | 3 +-
tests/qemumonitorjsontest.c | 53 +-
.../qemustatusxml2xmldata/backup-pull-in.xml | 607 ++++++++++++
.../qemustatusxml2xmldata/backup-pull-out.xml | 1 +
tests/qemuxml2xmltest.c | 2 +
tests/virschematest.c | 2 +
tools/Makefile.am | 1 +
tools/virsh-backup.c | 209 ++++
tools/virsh-backup.h | 21 +
tools/virsh-domain.c | 8 +-
tools/virsh.c | 2 +
tools/virsh.h | 1 +
tools/virsh.pod | 37 +
71 files changed, 4133 insertions(+), 552 deletions(-)
create mode 100644 docs/formatbackup.html.in
create mode 100644 docs/schemas/domainbackup.rng
create mode 100644 src/conf/backup_conf.c
create mode 100644 src/conf/backup_conf.h
create mode 100644 src/qemu/qemu_backup.c
create mode 100644 src/qemu/qemu_backup.h
create mode 100644 tests/domainbackupxml2xmlin/backup-pull.xml
create mode 100644 tests/domainbackupxml2xmlin/backup-push.xml
create mode 100644 tests/domainbackupxml2xmlin/empty.xml
create mode 100644 tests/domainbackupxml2xmlout/backup-pull.xml
create mode 100644 tests/domainbackupxml2xmlout/backup-push.xml
create mode 100644 tests/domainbackupxml2xmlout/empty.xml
create mode 100644 tests/qemustatusxml2xmldata/backup-pull-in.xml
create mode 120000 tests/qemustatusxml2xmldata/backup-pull-out.xml
create mode 100644 tools/virsh-backup.c
create mode 100644 tools/virsh-backup.h
--
2.21.0
5 years
[libvirt] [PATCH 0/4] apparmor fixes triggered by multi disk snapshots
by Christian Ehrhardt
Hi,
the bugs [1][2] that made me debug into this actually only need the
last patch (one line), but while coming along I found several
opportunities for minor improvements of the apparmor code in libvirt.
But that way it became a 4 patch series around apparmor.
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1746684
[2]: https://bugs.launchpad.net/libvirt/+bug/1845506
Christian Ehrhardt (4):
virt-aa-helper: clarify command line options
apparmor: drop useless call to get_profile_name
apparmor: refactor AppArmorSetSecurityImageLabel
apparmor: let AppArmorSetSecurityImageLabel append rules
src/security/security_apparmor.c | 52 +++++++-------------------------
src/security/virt-aa-helper.c | 14 +++++----
2 files changed, 19 insertions(+), 47 deletions(-)
--
2.23.0
5 years
[libvirt] [PATCH 0/2] virt-aa-helper for shmem device
by Christian Ehrhardt
Cole was recently adding a few of the usual apparmor suspects to BZ 1761645
and I was taking a look at the low hanging fruits of it today. It isn't
perfect, but would resolve the reported issue - so I'd appreciate a
review.
Limitations:
- One could break the path creating elements in qemuBuildShmemBackendMemProps
and qemuDomainPrepareShmemChardev into extra functions and then use those
from virt-aa-helper. But I haven't done so yet and unless it is strictly
required consider it too much for what we want/need to achieve here.
- I haven't covered hotplug of shmem devices yet, it seems there is no
infrastructure for their labels yet and I wasn't sure how important
shmem-hotplug would even be to anyone.
Christian Ehrhardt (2):
virt-aa-helper: add rules for shmem devices
virt-aa-helper: testcase for shmem devices
src/security/virt-aa-helper.c | 35 +++++++++++++++++++++++++++++++++++
tests/virt-aa-helper-test | 15 +++++++++++++++
2 files changed, 50 insertions(+)
--
2.23.0
5 years