[libvirt] [PATCH v2 0/2] Yet another namespace fix, kinda
by Martin Kletzander
Fixing easy problem (patch 1) lead me to finding out that there is yet
another problem that needs fixing (patch 2). For more information
read the code.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1443434
Martin Kletzander (2):
qemu: Don't mangle the storage format for type='dir'
qemu: Also treat directories properly when using namespaces
src/qemu/qemu_domain.c | 40 +++++++++++++++++++++++++++++++++++-----
src/storage/storage_source.c | 12 +++++++++---
tests/virstoragetest.c | 11 +++++++++--
3 files changed, 53 insertions(+), 10 deletions(-)
--
2.14.1
7 years, 1 month
[libvirt] [PATCH v5 0/7] Add managed save XML modification APIs (pushed)
by Peter Krempa
This is the version I've pushed. I'm sending it in for a reference of
the modifications I've made as part of the review.
Kothapally Madhu Pavan (7):
lib: Add API to dump xml configuration of managed save state domain
lib: Add API to edit domain's managed save state xml configuration
qemu: Implement qemuDomainManagedSaveGetXMLDesc
qemu: Implement qemuDomainManagedSaveDefineXML
virsh: Implement managedsave-define command
virsh: Implement managedsave-dumpxml command
virsh: Implement managedsave-edit command
include/libvirt/libvirt-domain.h | 6 ++
src/driver-hypervisor.h | 11 +++
src/libvirt-domain.c | 106 ++++++++++++++++++++
src/libvirt_public.syms | 2 +
src/qemu/qemu_driver.c | 79 +++++++++++++++
src/remote/remote_driver.c | 2 +
src/remote/remote_protocol.x | 30 +++++-
src/remote_protocol-structs | 14 +++
tools/virsh-domain.c | 204 +++++++++++++++++++++++++++++++++++++++
tools/virsh.pod | 39 ++++++++
10 files changed, 492 insertions(+), 1 deletion(-)
--
2.14.1
7 years, 1 month
[libvirt] [PATCH v2] qemu: Honour <on_reboot/>
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1476866
For some reason, we completely ignore <on_reboot/> setting for
domains. The implementation is simply not there. It never was.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
diff to v1:
- dropped the spoofed logic
- Switch from qemuProcessShutdownOrReboot() to qemuPrcoessStop() because that's
what <on_crash/> impl does too.
src/qemu/qemu_process.c | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index fed2bc588..3df6c320e 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -484,6 +484,7 @@ qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
virObjectEventPtr event;
qemuDomainObjPrivatePtr priv;
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
+ int ret = -1;
virObjectLock(vm);
@@ -495,12 +496,32 @@ qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0)
VIR_WARN("Failed to save status on vm %s", vm->def->name);
+ if (vm->def->onReboot == VIR_DOMAIN_LIFECYCLE_DESTROY ||
+ vm->def->onReboot == VIR_DOMAIN_LIFECYCLE_PRESERVE) {
+
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
+ goto cleanup;
+
+ if (!virDomainObjIsActive(vm)) {
+ VIR_DEBUG("Ignoring RESET event from inactive domain %s",
+ vm->def->name);
+ goto endjob;
+ }
+
+ qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_DESTROYED,
+ QEMU_ASYNC_JOB_NONE, 0);
+ virDomainAuditStop(vm, "destroyed");
+ qemuDomainRemoveInactive(driver, vm);
+ endjob:
+ qemuDomainObjEndJob(driver, vm);
+ }
+
+ ret = 0;
+ cleanup:
virObjectUnlock(vm);
-
qemuDomainEventQueue(driver, event);
-
virObjectUnref(cfg);
- return 0;
+ return ret;
}
--
2.13.0
7 years, 1 month
[libvirt] [PATCH 0/5] introduce reconnect feature for chardev devices
by Pavel Hrdina
Pavel Hrdina (5):
qemu: introduce QEMU_CAPS_CHARDEV_RECONNECT
conf: introduce reconnect element for chardev source
tests: add generic xml chardev reconnect tests
qemu: implement chardev source reconnect
tests: add qemu chardev srouce reconnect tests
docs/formatdomain.html.in | 11 ++
docs/schemas/domaincommon.rng | 12 +++
src/conf/domain_conf.c | 119 +++++++++++++++++++--
src/conf/domain_conf.h | 11 ++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 17 +++
src/qemu/qemu_domain.c | 101 +++++++++++++++++
.../generic-chardev-reconnect-invalid-mode.xml | 26 +++++
.../generic-chardev-reconnect-missing-timeout.xml | 26 +++++
.../generic-chardev-reconnect.xml | 32 ++++++
.../generic-chardev-reconnect.xml | 33 ++++++
tests/genericxml2xmltest.c | 5 +
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 +
.../caps_2.6.0-gicv2.aarch64.xml | 1 +
.../caps_2.6.0-gicv3.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.ppc64le.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
.../qemuxml2argv-channel-reconnect.args | 31 ++++++
...uxml2argv-chardev-reconnect-invalid-timeout.xml | 23 ++++
.../qemuxml2argv-chardev-reconnect.args | 40 +++++++
.../qemuxml2argv-chardev-reconnect.xml | 46 ++++++++
tests/qemuxml2argvtest.c | 11 ++
31 files changed, 552 insertions(+), 8 deletions(-)
create mode 100644 tests/genericxml2xmlindata/generic-chardev-reconnect-invalid-mode.xml
create mode 100644 tests/genericxml2xmlindata/generic-chardev-reconnect-missing-timeout.xml
create mode 100644 tests/genericxml2xmlindata/generic-chardev-reconnect.xml
create mode 100644 tests/genericxml2xmloutdata/generic-chardev-reconnect.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-reconnect.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect-invalid-timeout.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect.xml
--
2.13.5
7 years, 1 month
[libvirt] [PATCH v2 0/2] Have qemuDomainUndefineFlags grab a job
by Michal Privoznik
This is v2 to:
https://www.redhat.com/archives/libvir-list/2017-August/msg00222.html
diff to v1:
- Split qemuDomainRemoveInactive into two functions so that its safe to call it
from places where we already have a job.
Michal Privoznik (2):
qemu: Introduce and use qemuDomainRemoveInactiveJob
qemuDomainUndefineFlags: Grab QEMU_JOB_MODIFY
src/qemu/qemu_domain.c | 36 +++++++++++++++++++++++++++---------
src/qemu/qemu_domain.h | 3 +++
src/qemu/qemu_driver.c | 47 ++++++++++++++++++++++++++---------------------
src/qemu/qemu_migration.c | 10 +++++-----
src/qemu/qemu_process.c | 10 +++++-----
5 files changed, 66 insertions(+), 40 deletions(-)
--
2.13.0
7 years, 1 month
[libvirt] [libvirt-php][PATCH 0/3] Couple of trivial fixes/improvements
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (3):
Shut up automake
libvirt-php.c: Reorder includes
examples: Initialize $ret in index.php
configure.ac | 4 ++++
examples/index.php | 1 +
src/libvirt-php.c | 8 ++++----
3 files changed, 9 insertions(+), 4 deletions(-)
--
2.13.5
7 years, 1 month
[libvirt] [PATCH v4 0/3] Add support for Veritas HyperScale (VxHS) block device protocol
by Ashish Mittal
From: Ashish Mittal <ashish.mittal(a)veritas.com>
QEMU changes for VxHS (including TLS support) are already upstream.
This series of patches adds support for VxHS block devices in libvirt.
Patch 1 adds the base functionality for supporting VxHS protocol.
Patch 2 adds two new configuration options in qemu.conf to enable TLS
for VxHS devices.
Patch 3 implements the main TLS functionality.
Ashish Mittal (3):
Add support for Veritas HyperScale (VxHS) block device protocol
conf: Introduce TLS options for VxHS block device clients
Add TLS support for Veritas HyperScale (VxHS) block device protocol
docs/formatdomain.html.in | 31 ++++-
docs/schemas/domaincommon.rng | 18 +++
src/conf/domain_conf.c | 19 +++
src/libxl/libxl_conf.c | 1 +
src/qemu/libvirtd_qemu.aug | 4 +
src/qemu/qemu.conf | 23 +++
src/qemu/qemu_command.c | 155 +++++++++++++++++++++
src/qemu/qemu_conf.c | 7 +
src/qemu/qemu_conf.h | 3 +
src/qemu/qemu_driver.c | 3 +
src/qemu/qemu_parse_command.c | 25 ++++
src/qemu/test_libvirtd_qemu.aug.in | 2 +
src/util/virstoragefile.c | 77 +++++++++-
src/util/virstoragefile.h | 10 ++
src/xenconfig/xen_xl.c | 1 +
.../qemuargv2xml-disk-drive-network-vxhs-fail.args | 24 ++++
tests/qemuargv2xmltest.c | 17 ++-
...ml2argv-disk-drive-network-tlsx509-err-vxhs.xml | 34 +++++
...-disk-drive-network-tlsx509-multidisk-vxhs.args | 41 ++++++
...k-drive-network-tlsx509-multidisk-vxhs.args.new | 41 ++++++
...v-disk-drive-network-tlsx509-multidisk-vxhs.xml | 56 ++++++++
...muxml2argv-disk-drive-network-tlsx509-vxhs.args | 28 ++++
...emuxml2argv-disk-drive-network-tlsx509-vxhs.xml | 34 +++++
.../qemuxml2argv-disk-drive-network-vxhs.args | 25 ++++
.../qemuxml2argv-disk-drive-network-vxhs.xml | 34 +++++
tests/qemuxml2argvtest.c | 10 ++
tests/virstoragetest.c | 30 ++++
27 files changed, 748 insertions(+), 5 deletions(-)
create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-vxhs-fail.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-err-vxhs.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-multidisk-vxhs.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-multidisk-vxhs.args.new
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-multidisk-vxhs.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-vxhs.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-vxhs.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.xml
--
2.5.5
7 years, 1 month
[libvirt] [PATCH v2 0/3] Some domain name handling improvements
by Martin Kletzander
*** BRULB THERE ***
Martin Kletzander (3):
conf: Properly truncate wide character names in
virDomainObjGetShortName
qemu: Use short domain name in qemuDomainGetPreservedMountPath
docs: Update news with domain name bug fixes
docs/news.xml | 20 ++++++++++++++++++++
src/conf/domain_conf.c | 45 ++++++++++++++++++++++++++++++++++++++++++---
src/qemu/qemu_domain.c | 10 ++++++++--
3 files changed, 70 insertions(+), 5 deletions(-)
--
2.14.1
7 years, 1 month
[libvirt] [PATCH 0/2] Alter refresh algorithm for volWipe
by John Ferlan
Alter wipeVol to do same refresh operation as pool refresh would do.
John Ferlan (2):
storage: Introduce virStorageBackendRefreshVolTargetUpdate
storage: Use virStorageBackendRefreshVolTargetUpdate after wipeVol
src/storage/storage_driver.c | 7 ++--
src/storage/storage_util.c | 82 +++++++++++++++++++++++++++++---------------
src/storage/storage_util.h | 3 ++
3 files changed, 62 insertions(+), 30 deletions(-)
--
2.9.5
7 years, 1 month
[libvirt] [libvirt-go PATCH] Add MigrateGetMaxDowntime API
by John Ferlan
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
This is a "best guess" effort - basically copied some previous examples
from recent comments, built, and ran the same test that the CI build test
runs.
domain.go | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/domain.go b/domain.go
index cc786dd..f83aa31 100644
--- a/domain.go
+++ b/domain.go
@@ -2319,6 +2319,21 @@ func (d *Domain) MigrateSetMaxSpeed(speed uint64, flags uint32) error {
return nil
}
+func (d *Domain) MigrateGetMaxDowntime(flags uint32) (uint64, error) {
+ var downtime C.ulonglong
+
+ if C.LIBVIR_VERSION_NUMBER < 3007000 {
+ return 0, GetNotImplementedError("virDomainMigrateGetMaxDowntime")
+ }
+
+ ret := C.virDomainMigrateGetMaxDowntime(d.ptr, &downtime, C.uint(flags))
+ if ret == -1 {
+ return 0, GetLastError()
+ }
+
+ return uint64(downtime), nil
+}
+
func (d *Domain) MigrateSetMaxDowntime(downtime uint64, flags uint32) error {
ret := C.virDomainMigrateSetMaxDowntime(d.ptr, C.ulonglong(downtime), C.uint(flags))
if ret == -1 {
--
2.9.5
7 years, 1 month