[libvirt] [PATCH v4 0/6] vz: add migration support
by Nikolay Shirokovskiy
NOTE that minimal command to migrate vz domain is like next:
virsh -c vz:///system migrate 200 vz+ssh://shiny0/system --p2p
--live --compressed --persistent --undefinesource
==Difference from v1:
1. Patch is quite different. First patchset implements migration thru managed
migration scheme. This one goes thru p2p scheme. I belive this is a better
approach. Vz migration is done via vz sdk and first patchset uses 5 phased
migration only to get a token from destination on prepare phase which is kind a
misuse. This patch just adds vz specific function to driver interface
to archive the same goal.
2. Offline migration is supported as there is no more dependency on current
flow of managed migration scheme.
==Difference from v2:
1. Implement thru direct migration instead of p2p. p2p is just managed
5-staged migration when managing is done on daemon side. Vz migration stages
are all hidden in vz sdk and thus it would be more consistent to use direct
scheme.
2. Use existing driver function for prepare migration phase to pass session
uuid from destination to source instead of new one. As vz migration is direct
one we will not use prepare phase function in a straight forward manner
anyway.
==Difference from v3:
Return back to p2p implementation. Difference from p2p implementation
in v2 is that prepare phase driver function is used to pass session_uuid
from destination to source instead of new ad-hoc driver function.
src/vz/vz_driver.c | 342 ++++++++++++++++++++++++++++++++++++++++++++++++++++
src/vz/vz_sdk.c | 86 +++++++++++--
src/vz/vz_sdk.h | 6 +
src/vz/vz_utils.h | 4 +-
4 files changed, 423 insertions(+), 15 deletions(-)
9 years, 3 months
[libvirt] [PATCH V2] libxl: don't overwrite error from virNetSocketNewConnectTCP()
by Jim Fehlig
Remove redundant error reporting in libxlDomainMigrationPerform().
virNetSocketNewConnectTCP() is perfectly capable of reporting
sensible errors.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
V2:
Actually try to compile the code and find saved_errno is no
longer used - remove it.
src/libxl/libxl_migration.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c
index 9609e06..0d23e5f 100644
--- a/src/libxl/libxl_migration.c
+++ b/src/libxl/libxl_migration.c
@@ -472,7 +472,6 @@ libxlDomainMigrationPerform(libxlDriverPrivatePtr driver,
virURIPtr uri = NULL;
virNetSocketPtr sock;
int sockfd = -1;
- int saved_errno = EINVAL;
int ret = -1;
/* parse dst host:port from uri */
@@ -487,12 +486,8 @@ libxlDomainMigrationPerform(libxlDriverPrivatePtr driver,
/* socket connect to dst host:port */
if (virNetSocketNewConnectTCP(hostname, portstr,
AF_UNSPEC,
- &sock) < 0) {
- virReportSystemError(saved_errno,
- _("unable to connect to '%s:%s'"),
- hostname, portstr);
+ &sock) < 0)
goto cleanup;
- }
if (virNetSocketSetBlocking(sock, true) < 0) {
virObjectUnref(sock);
--
2.5.0
9 years, 3 months
[libvirt] [RFC PATCH 0/3] Implement mockup capabilities cache in QEMU tests
by Pavel Fedin
Since commit e8d55172544c1fafe31a9e09346bdebca4f0d6f9 qemu driver checks
emulator capabilities during domain XML post-parse. However, test suite
does not initialize it, therefore a condition to skip all checks if there
is no cache supplied was added. This is actually a hack, whose sole
purpose is to make existing test suite working. Additionally, it prevents
from writing new tests for this particular functionality.
This series attempts to solve this problem by implementing proper cache
mockup in test suite. The main idea is to create a cache in standard way
and put there a pre-defined capabilities set (which tests already have).
The main problem here is to know emulator binary name, which is contained
in the source XML. However, we have to create our cache before reading the
XML. The simplest way to resolve this is to assume particular binary name
from test name. Currently tests which assume cross-architecture binary are
all prefixed with the architecture name (with one exception of "keywrap"
tests which all assume /usr/bin/qemu-system-s390x and do not have "s390-"
prefix in their name).
This scheme works fine, unless we use "native" emulator binary. Here we
have a mess. Most newer tests use /usr/bin/qemu, however there is a large
number of tests which use /usr/libexec/qemu-kvm or /usr/bin/kvm (i guess
these are leftovers from the epoch when qemu-kvm was a separate fork of
qemu). This is currently not handled in any way, and these tests may
report errors due to missing binaries (because virQEMUCapsCacheLookup()
attempts to populate the cache automatically by querying the binary if
not already known).
There are several possible ways to resolve this:
a) Add all possible names as aliases for /usr/bin/qemu
b) Forbid to use oldstyle names at all in these tests
c) Declare some prefix like "kvm-" for those tests who want to use
/usr/libexec/qemu-kvm. Again, this would ban /usr/bin/kvm and
/usr/bin/qemu-kvm (if not using aliases like in (b)
d) Hardcode (optional) emulator name per test. IMHO a bad idea because
number of tests is huge.
e) Do some preparsing of the XML and extract binary name from it. Again,
i disliked it for not being simple enough.
I also thought about an alternate implementation which would patch
postParseCallback and insert own function there which builds a cache. At
this point binary name is already known from the XML. However, such a
design looks like an ugly hack by itself, so i stopped going in this
direction.
Comments and opinions are welcome.
Pavel Fedin (3):
Implement virQEMUCapsCache mockup
Use mockup cache
Removed unneeded check
src/qemu/qemu_capabilities.c | 10 +---------
src/qemu/qemu_capspriv.h | 36 +++++++++++++++++++++++++++++++++++
src/qemu/qemu_domain.c | 5 +----
tests/qemuagenttest.c | 9 ++++++++-
tests/qemuargv2xmltest.c | 5 +++++
tests/qemuhotplugtest.c | 23 ++++++++++++++--------
tests/qemuxml2argvtest.c | 5 +++++
tests/qemuxml2xmltest.c | 6 ++++++
tests/qemuxmlnstest.c | 5 +++++
tests/testutilsqemu.c | 45 ++++++++++++++++++++++++++++++++++++++++++++
tests/testutilsqemu.h | 3 +++
11 files changed, 130 insertions(+), 22 deletions(-)
create mode 100644 src/qemu/qemu_capspriv.h
mode change 100644 => 100755 tests/qemuagenttest.c
mode change 100644 => 100755 tests/qemuhotplugtest.c
mode change 100644 => 100755 tests/qemuxml2xmltest.c
mode change 100644 => 100755 tests/testutilsqemu.c
--
2.1.4
9 years, 3 months
[libvirt] [PATCH] libxl: report correct errno from virNetSocketNewConnectTCP on migration
by Ian Campbell
saved_errno is never written to in this function after it is
initialised and it is only used to log the failure from
virNetSocketNewConnectTCP masking the real errno from that function.
Drop saved_errno and use errno itself.
Signed-off-by: Ian Campbell <ian.campbell(a)citrix.com>
---
src/libxl/libxl_migration.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c
index 39e4a65..e291d71 100644
--- a/src/libxl/libxl_migration.c
+++ b/src/libxl/libxl_migration.c
@@ -480,7 +480,6 @@ libxlDomainMigrationPerform(libxlDriverPrivatePtr driver,
virURIPtr uri = NULL;
virNetSocketPtr sock;
int sockfd = -1;
- int saved_errno = EINVAL;
int ret = -1;
/* parse dst host:port from uri */
@@ -496,7 +495,7 @@ libxlDomainMigrationPerform(libxlDriverPrivatePtr driver,
if (virNetSocketNewConnectTCP(hostname, portstr,
AF_UNSPEC,
&sock) < 0) {
- virReportSystemError(saved_errno,
+ virReportSystemError(errno,
_("unable to connect to '%s:%s'"),
hostname, portstr);
goto cleanup;
--
2.1.4
9 years, 3 months
[libvirt] [sandbox] Add ext4 module to QEMU initrd
by Cédric Bosdonnat
Some distros don't have ext4 built in their kernel, but as a module.
Make sure the ext4 module is loaded or we will fail loading root
host-images on those distros.
---
libvirt-sandbox/libvirt-sandbox-builder-machine.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
index 43372b5..3d3267a 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
@@ -184,6 +184,13 @@ static gchar *gvir_sandbox_builder_machine_mkinitrd(GVirSandboxConfig *config,
/* For dhclient to work */
gvir_sandbox_config_initrd_add_module(initrd, "af_packet.ko");
+ /* In case ext4 is built as a module, include it and its deps
+ * for the root mount */
+ gvir_sandbox_config_initrd_add_module(initrd, "mbcache.ko");
+ gvir_sandbox_config_initrd_add_module(initrd, "jbd2.ko");
+ gvir_sandbox_config_initrd_add_module(initrd, "crc16.ko");
+ gvir_sandbox_config_initrd_add_module(initrd, "ext4.ko");
+
if (!gvir_sandbox_builder_initrd_construct(builder, initrd, targetfile, error))
goto cleanup;
--
2.1.4
9 years, 3 months
[libvirt] Release of libvirt-1.2.19
by Daniel Veillard
It's out ! Tagged in git, signed tarball and rpms are available from the
usual place:
ftp://libvirt.org/libvirt/
I also pushed the python bindings out at:
ftp://libvirt.org/libvirt/python
This is still a relatively small release at around 200 commits, but with
user noticeable features rolled in, as long with the usual set of bug
fixes and improvements:
Features:
- Big improvements on ppc64 support (Andrea Bolognani)
- New virDomainRename API (Tomas Meszaros)
- Support for QEMU new pci emulations (Laine Stump)
Documentation:
- Rename page about vz driver (Sergey Bronnikov)
- docs: Rename 'parallels' to 'vz' (Sergey Bronnikov)
- virDomainRename: Extend API documentation (Tomas Meszaros)
- virt-aa-helper: document --probing and --dry-run (Guido Günther)
- docs: Drop unused rule for internals/%.html.tmp target (Guido Günther)
- api: Adjust comment for virDomainAddIOThread (John Ferlan)
- fix typo in comments (Cao jin)
- virDomainCoreDumpWithFormat: Mention enum for @dumpformat (Michal Privoznik)
Portability:
- lxc: ensure setns() syscall is defined (Daniel P. Berrange)
- selinux: fix compile errors (Guido Günther)
- util: fix build without cgroup (Roman Bogorodskiy)
- build: fix mingw build (Eric Blake)
- protocol: Don't use rename as a variable name (Martin Kletzander)
- Remove static keyword from vshReadline when readline does not exist (Moshe Levi)
- Detect location of qemu-bridge-helper (Guido Günther)
- Check if qemu-bridge-helper exists and is executable (Guido Günther)
- nodeinfo: Fix build failure when KVM headers are not available (Andrea Bolognani)
Bug Fixes:
- apparmor: Adjust path to domain monitor socket (Guido Günther)
- util: fallback to ioctl(SIOCBRDELBR) if netlink RTM_DELLINK fails (Laine Stump)
- util: fallback to ioctl(SIOCBRADDBR) if netlink RTM_NEWLINK fails (Laine Stump)
- Revert "LXC: show used memory as 0 when domain is not active" (Jim Fehlig)
- libxl: acquire a job when receiving a migrating domain (Jim Fehlig)
- libxl: don't attempt to resume domain when suspend fails (Jim Fehlig)
- libxl: fix ref counting of libxlMigrationDstArgs (Jim Fehlig)
- libvirt_lxc: Claim success for --help (Michal Privoznik)
- util: Allow virProcessSetNamespaces() to have sparse FD list (Michal Privoznik)
- virt-aa-helper: Improve valid_path (Michal Privoznik)
- lxc: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- qemu: Emit correct audit message for memory hot unplug (Luyao Huang)
- qemu: Emit correct audit message for memory hot plug (Luyao Huang)
- hostdev: skip ACS check when using VFIO for device assignment (Laine Stump)
- qemu: Label correct per-VM path when starting (Martin Kletzander)
- qemu: Update blkio.weight value after successful set (Luyao Huang)
- Eliminate incorrect and unnecessary check for changed IP address (Vasiliy Tolstov)
- storage: only run safezero if allocation is > 0 (Guido Günther)
- virt-aa-helper: allow access to /usr/share/ovmf/ (intrigeri)
- qemu: Fix access to auto-generated socket paths (Martin Kletzander)
- cpu: Move check for NULL CPU model inside the driver (Andrea Bolognani)
- qemu: Sync BlkioDevice values when setting them in cgroups (Martin Kletzander)
- lxc: Sync BlkioDevice values when setting them in cgroups (Martin Kletzander)
- qemuDomainRename: Don't leave a domain locked uppon fail (Michal Privoznik)
- qemu: Add check for invalid iothread_id in qemuDomainChgIOThread (John Ferlan)
- virsh: Reset global error after successfull domain lookup (Luyao Huang)
- libvirt-domain: forbid use virDomainRename in readonly connection (Luyao Huang)
- virsh: fix always return false in domrename (Luyao Huang)
- qemu: Resolve Coverity UNINIT (John Ferlan)
- qemu: Fix segfault when parsing private domain data (Martin Kletzander)
- conf: Check for hostdev conflicts when assign default disk address (John Ferlan)
- conf: Add SCSI hostdev check for disk drive address already in use (John Ferlan)
- Revert "qemu: Allow to plug virtio-net-pci into PCIe slot" (Laine Stump)
- domain: Fix crash if trying to live update disk <serial> (Cole Robinson)
- util: don't overwrite stack when getting ethtool gfeatures (Laine Stump)
- cpu: Fix segfault in the ppc64 driver (Andrea Bolognani)
- conf: Don't try formating non-existing addresses (Martin Kletzander)
- qemu: fail on attempts to use <filterref> for non-tap network connections (Laine Stump)
- network: validate network NAT range (Laine Stump)
- qemu: Enable ioeventfd usage for virtio-scsi controllers (Martin Kletzander)
- virNetDevBandwidthParseRate: Reject negative values (Michal Privoznik)
- network: verify proper address family in updates to <host> and <range> (Laine Stump)
- virDomainDefParseXML: Check for malicious cpu ids in <numa/> (Michal Privoznik)
- qemu: Fix reporting of physical capacity for block devices (Peter Krempa)
- qemu: Build correct command line for PCI NICs on ARM (Pavel Fedin)
- qemu: Forbid image pre-creation for non-shared storage migration (Peter Krempa)
- conf: Resolve Coverity FORWARD_NULL (John Ferlan)
- virsh: fix domfsinfo output in quiet mode (Luyao Huang)
- Avoid starting a PowerPC VM with floppy disk (Kothapally Madhu Pavan)
- Caps: Disable floppy disk for PowerPC VM (Kothapally Madhu Pavan)
- qemu: fix some api cannot work when disable cpuset in conf (Luyao Huang)
Improvements:
- src: Check for symbols ordering in ADMIN_SYM_FILES (Michal Privoznik)
- src: Cleanup libvirt_admin.syms (Michal Privoznik)
- src: Check libvirt_admin.syms for exported symbols (Michal Privoznik)
- lxc_container: Turn lxcAttachNS into calling virProcessSetNamespaces (Michal Privoznik)
- utils: Remove the logging of errors from virNetDevSendEthtoolIoctl (Moshe Levi)
- Start daemon only after filesystems are mounted (Martin Kletzander)
- virt-aa-helper: add NVRAM store file for read/write (Peter Kieser)
- Fix link to page for Virtuozzo driver (Sergey Bronnikov)
- lxc: Inherit namespace feature (ik.nitk)
- qemu: add a check for nodeset in qemuDomainSetNumaParamsLive (Luyao Huang)
- virt-aa-helper: Simplify restriction logic (Guido Günther)
- tests: Use qemuProcessPrepareMonitorChr in qemuxmlnstest (Martin Kletzander)
- security_dac: Add SetDirLabel support (Martin Kletzander)
- security_selinux: Add SetDirLabel support (Martin Kletzander)
- security_stack: Add SetDirLabel support (Martin Kletzander)
- security: Add virSecurityDomainSetDirLabel (Martin Kletzander)
- security_dac: Label non-listening sockets (Martin Kletzander)
- security_selinux: Use proper structure to access socket data (Martin Kletzander)
- locking: Remove redundant 'srv' element from virLockDaemon (Erik Skultety)
- tests: Add some compatibility-related cases to the CPU tests (Andrea Bolognani)
- cpu: Better support for ppc64 compatibility modes (Andrea Bolognani)
- cpu: Don't update host-model guest CPUs on ppc64 (Andrea Bolognani)
- Add generated libvirt_admin.syms into .gitignore (Martin Kletzander)
- conf: Check for attach disk usage of iothread=0 (John Ferlan)
- libvirt-admin: Generate symbols file (Guido Günther)
- daemon: Use $(NULL) for libvird_admin's flags (Guido Günther)
- virconf: correct code formatting (Cao jin)
- virConfWalk: fix the inconsistent name (Cao jin)
- qemu: Report better error message when renaming to existing domain name (Martin Kletzander)
- util: Add getters for cgroup block device I/O throttling (Martin Kletzander)
- util: Add virCgroupGetBlockDevString (Martin Kletzander)
- util: Add virStringGetFirstWithPrefix (Martin Kletzander)
- api: Remove check on iothread_id arg in virDomainPinIOThread (John Ferlan)
- qemuDomainAddCgroupForThread: Don't overwrite the error (Luyao Huang)
- virconf: fix the inconsistent name (Cao jin)
- qemuDomainRename: Explicitly check if domain is renaming to itself (Michal Privoznik)
- virHashAddEntry: Report error on duplicate key (Michal Privoznik)
- virHashAddOrUpdateEntry: Turn @new_name into void * (Michal Privoznik)
- tools: Introduce new client generic module vsh (Erik Skultety)
- qemu: Implement virDomainRename (Tomas Meszaros)
- Introduce new VIR_DOMAIN_EVENT_DEFINED_RENAMED event (Tomas Meszaros)
- domain_conf: Introducde virDomainObjListRenameAddNew() & virDomainObjListRenameRemove() (Tomas Meszaros)
- virsh: Implement "domrename" command (Tomas Meszaros)
- Introduce virDomainRename API (Tomas Meszaros)
- conf: Remove 'vmdef' from virDomainHostdevDefParseXML (John Ferlan)
- qemu: Use numad information when getting pin information (Martin Kletzander)
- qemu: Keep numad hint after daemon restart (Martin Kletzander)
- conf: Pass private data to Parse function of XML options (Martin Kletzander)
- conf: Create locals for virDomainDiskDefAssignAddress (John Ferlan)
- Drive hot-unplug: reliable parsing of HMP results (Frank Schreuder)
- cmdAttachInterface: Fully implement @floor support (Michal Privoznik)
- networkBandwidthGenericChecks: Drop useless check (Michal Privoznik)
- networkBandwidthUpdate: Don't blindly dereference pointers (Michal Privoznik)
- virsh: Refactor parseRateStr to avoid false-positive uninitialized variable (Peter Krempa)
- qemu: fix qemuDomainSupportsPCI() for ARM machines of "virt" machinetype (Laine Stump)
- virNetSocketCheckProtocols: handle EAI_NONAME as IPv6 unavailable (Guido Günther)
- qemu: Implement VIR_DOMAIN_BANDWIDTH_IN_FLOOR (Michal Privoznik)
- virsh: Implement VIR_DOMAIN_BANDWIDTH_IN_FLOOR (Michal Privoznik)
- Introduce VIR_DOMAIN_BANDWIDTH_IN_FLOOR (Michal Privoznik)
- virsh: Rework parseRateStr (Michal Privoznik)
- qemuDomainSetInterfaceParameters: Use new functions to update bandwidth (Michal Privoznik)
- bridge_driver: Introduce networkBandwidthUpdate (Michal Privoznik)
- bridge_driver: Introduce networkBandwidthChangeAllowed (Michal Privoznik)
- virNetDevBandwidthUpdateRate: turn class_id into integer (Michal Privoznik)
- virNetDevParseMcast: Avoid magic constant (Michal Privoznik)
- tests: Add a bunch of cpu test case for ppc64 (Andrea Bolognani)
- tests: Re-enable ppc64 cpu tests (Andrea Bolognani)
- cpu: Forbid model fallback in the ppc64 driver (Andrea Bolognani)
- cpu: Implement backwards compatibility in the ppc64 driver (Andrea Bolognani)
- cpu: Add POWER8NVL information to CPU map XML (Andrea Bolognani)
- cpu: Parse and use PVR masks in the ppc64 driver (Andrea Bolognani)
- cpu: Simplify ppc64 part of CPU map XML (Andrea Bolognani)
- cpu: Support multiple PVRs in the ppc64 driver (Andrea Bolognani)
- cpu: Align ppc64 CPU data with x86 (Andrea Bolognani)
- tests: Temporarily disable ppc64 cpu tests (Andrea Bolognani)
- cpu: Use ppc64Compute() to implement ppc64DriverCompare() (Andrea Bolognani)
- cpu: CPU model names have to match on ppc64 (Andrea Bolognani)
- cpu: Never skip CPU model name check in ppc64 driver (Andrea Bolognani)
- tests: Improve result handling in cpuTestGuestData() (Andrea Bolognani)
- cpu: Reorder functions in the ppc64 driver (Andrea Bolognani)
- cpu: Simplify ppc64ModelFromCPU() (Andrea Bolognani)
- cpu: Simplify NULL handling in ppc64 driver (Andrea Bolognani)
- cpu: Mark driver functions in ppc64 driver (Andrea Bolognani)
- admin: Drop 'internal.h' include from libvirt-admin.h (Erik Skultety)
- conf: Add ioeventfd option for controllers (Martin Kletzander)
- qemuMonitorOpenInternal: remove redundant code (Cao jin)
- rpc: Remove keepalive_required option (Martin Kletzander)
- qemu: support new pci controller model "pcie-switch-downstream-port" (Laine Stump)
- conf: new pcie-controller model "pcie-switch-downstream-port" (Laine Stump)
- qemu: add capabilities bit for device xio3130-downstream (Laine Stump)
- qemu: support new pci controller model "pcie-switch-upstream-port" (Laine Stump)
- conf: new pci controller model "pcie-switch-upstream-port" (Laine Stump)
- qemu: add capabilities bit for device x3130-upstream (Laine Stump)
- qemu: support new pci controller model "pcie-root-port" (Laine Stump)
- conf: new pci controller model "pcie-root-port" (Laine Stump)
- qemu: add capabilities bit for device ioh3420 (Laine Stump)
- qemu: implement <target chassisNr='n'/> subelement/attribute of <controller> (Laine Stump)
- conf: add new <target> subelement with chassisNr attribute to <controller> (Laine Stump)
- qemu: implement <model> subelement to <controller> (Laine Stump)
- conf: add new <model> subelement with name attribute to <controller> (Laine Stump)
- conf: more useful error message when pci function is out of range (Laine Stump)
- numa_conf: Introduce virDomainNumaGetMaxCPUID (Michal Privoznik)
- Allow vfio hotplug of a device to the domain which owns the iommu (Shivaprasad G Bhat)
- qemuDomainDefPostParse: Adjust indent (Michal Privoznik)
- bootstrap: Don't require python-config (Michal Privoznik)
- qemu: Allow to plug virtio-net-pci into PCIe slot (Pavel Fedin)
- qemu: Add PCI-Express root to ARM virt machine (Pavel Fedin)
- qemu: Introduce QEMU_CAPS_OBJECT_GPEX (Pavel Fedin)
- cpu: Indentation changes in the ppc64 driver (Andrea Bolognani)
- cpu: Rename {powerpc,ppc} => ppc64 (internal symbols) (Andrea Bolognani)
- cpu: Rename {powerpc,ppc} => ppc64 (exported symbols) (Andrea Bolognani)
- cpu: Rename {powerpc,ppc} => ppc64 (filesystem) (Andrea Bolognani)
- tests: extend workaround for gnutls private key loading failure (Daniel P. Berrange)
- conf: Allow error reporting in virDomainDiskSourceIsBlockType (John Ferlan)
- docs: Add Fibre Channel NPIV supported option for volume lun config (John Ferlan)
- conf: Change when virDomainDiskDefAssignAddress is called (John Ferlan)
- conf: Remove unused param from virDomainHostdevDefParseXML (John Ferlan)
- conf: Change when virDomainHostdevAssignAddress is called (John Ferlan)
- conf: Try controller add when searching hostdev bus for unit (John Ferlan)
- conf: Add check for host address type while checking in use (John Ferlan)
- conf: Add xmlopt to virDomainDeviceDefPostParseInternal (John Ferlan)
- conf: Move hostdev and disk address validations (John Ferlan)
- conf: Add 'bus' and 'target' to SCSI address conflict checks (John Ferlan)
- conf: Remove extraneous check in virDomainHostdevAssignAddress (John Ferlan)
- qemu: Remove double unlock for domains (Martin Kletzander)
- tests: Add subcores3 nodeinfo test (Andrea Bolognani)
- tests: Add subcores2 nodeinfo test (Andrea Bolognani)
- tests: Add subcores1 nodeinfo test (Andrea Bolognani)
- tests: Prepare for subcore tests (Shivaprasad G Bhat)
- nodeinfo: Fix output on PPC64 KVM hosts (Shivaprasad G Bhat)
- rpc: Fix slow volume download (virsh vol-download) (Ossi Herrala)
- There is no virDomainFindBy{ID, Name, UUID} anymore (Cao jin)
- Post-release version bump to 1.2.19 (Martin Kletzander)
- Fix a trailing space in spec file (Daniel Veillard)
Cleanups:
- Revert "lxc: ensure setns() syscall is defined" (Michal Privoznik)
- test: Replace tabs with spaces in virnetdaemondata json files (Erik Skultety)
- tests: Remove unused file (Andrea Bolognani)
- cpu: Remove ISA information from CPU map XML (Andrea Bolognani)
So thanks everybody for your contributions to this release, be it bug
reports, patches, new code, dcumentation, etc ...
Enjoy !
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
9 years, 3 months
[libvirt] [PATCH v2] domain-conf: escape string for socket attribute
by Pavel Hrdina
Commit d091518b tried to escape all strings in produced XML, but missed
this one.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/conf/domain_conf.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 69225f4..f95190f 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -21118,9 +21118,7 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
switch (def->type) {
case VIR_DOMAIN_GRAPHICS_TYPE_VNC:
if (def->data.vnc.socket) {
- if (def->data.vnc.socket)
- virBufferAsprintf(buf, " socket='%s'",
- def->data.vnc.socket);
+ virBufferEscapeString(buf, " socket='%s'", def->data.vnc.socket);
} else {
if (def->data.vnc.port &&
(!def->data.vnc.autoport || !(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE)))
--
2.5.1
9 years, 3 months
[libvirt] [PATCH] domain-conf: escape string for socket attribute
by Pavel Hrdina
Commit d091518b tried to escape all strings in produced XML, but missed
this one.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/conf/domain_conf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c5e9653..56f9460 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -21060,8 +21060,8 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
case VIR_DOMAIN_GRAPHICS_TYPE_VNC:
if (def->data.vnc.socket) {
if (def->data.vnc.socket)
- virBufferAsprintf(buf, " socket='%s'",
- def->data.vnc.socket);
+ virBufferEscapeString(buf, " socket='%s'",
+ def->data.vnc.socket);
} else {
if (def->data.vnc.port &&
(!def->data.vnc.autoport || !(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE)))
--
2.5.0
9 years, 3 months
[libvirt] [PATCH] remoteClientCloseFunc: Don't mangle connection object refcount
by Michal Privoznik
Well, in 8ad126e6 we tried to fix a memory corruption problem.
However, the fix was not as good as it could be. I mean, the
commit has one line more than it should. I've noticed this output
just recently:
# ./run valgrind --leak-check=full --show-reachable=yes ./tools/virsh domblklist gentoo
==17019== Memcheck, a memory error detector
==17019== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==17019== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==17019== Command: /home/zippy/work/libvirt/libvirt.git/tools/.libs/virsh domblklist gentoo
==17019==
Target Source
------------------------------------------------
fda /var/lib/libvirt/images/fd.img
vda /var/lib/libvirt/images/gentoo.qcow2
hdc /home/zippy/tmp/install-amd64-minimal-20150402.iso
==17019== Thread 2:
==17019== Invalid read of size 4
==17019== at 0x4EFF5B4: virObjectUnref (virobject.c:258)
==17019== by 0x5038CFF: remoteClientCloseFunc (remote_driver.c:552)
==17019== by 0x5069D57: virNetClientCloseLocked (virnetclient.c:685)
==17019== by 0x506C848: virNetClientIncomingEvent (virnetclient.c:1852)
==17019== by 0x5082136: virNetSocketEventHandle (virnetsocket.c:1913)
==17019== by 0x4ECD64E: virEventPollDispatchHandles (vireventpoll.c:509)
==17019== by 0x4ECDE02: virEventPollRunOnce (vireventpoll.c:658)
==17019== by 0x4ECBF00: virEventRunDefaultImpl (virevent.c:308)
==17019== by 0x130386: vshEventLoop (vsh.c:1864)
==17019== by 0x4F1EB07: virThreadHelper (virthread.c:206)
==17019== by 0xA8462D3: start_thread (in /lib64/libpthread-2.20.so)
==17019== by 0xAB441FC: clone (in /lib64/libc-2.20.so)
==17019== Address 0x139023f4 is 4 bytes inside a block of size 240 free'd
==17019== at 0x4C2B1F0: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==17019== by 0x4EA8949: virFree (viralloc.c:582)
==17019== by 0x4EFF6D0: virObjectUnref (virobject.c:273)
==17019== by 0x4FE74D6: virConnectClose (libvirt.c:1390)
==17019== by 0x13342A: virshDeinit (virsh.c:406)
==17019== by 0x134A37: main (virsh.c:950)
The problem is, when registering remoteClientCloseFunc(), it's
conn->closeCallback which is ref'd. But in the function itself
it's conn->closeCallback->conn what is unref'd. This is causing
imbalance in reference counting. Moreover, there's no need for
the remote driver to increase/decrease conn refcount since it's
not used anywhere. It's just merely passed to client registered
callback. And for that purpose it's correctly ref'd in
virConnectRegisterCloseCallback() and then unref'd in
virConnectUnregisterCloseCallback().
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Not only this is nice because it fixes a bug by removing some lines, it maybe
needs to be backported all the way down to v1.0.5 main branches.
src/remote/remote_driver.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index ec26ebe..aca00c0 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -546,10 +546,6 @@ remoteClientCloseFunc(virNetClientPtr client ATTRIBUTE_UNUSED,
cbdata->freeCallback = NULL;
}
virObjectUnlock(cbdata);
-
- /* free the connection reference that comes along with the callback
- * registration */
- virObjectUnref(cbdata->conn);
}
/* helper macro to ease extraction of arguments from the URI */
--
2.4.6
9 years, 3 months
[libvirt] [PATCH] vshInit: Don't leak @histsize_env
by Michal Privoznik
Caller is responsible for freeing the result of virStringJoin()
when no longer needed:
==10701== 1 bytes in 1 blocks are definitely lost in loss record 1 of 806
==10701== at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==10701== by 0xAADB679: strdup (in /lib64/libc-2.20.so)
==10701== by 0x4F18655: virStrdup (virstring.c:726)
==10701== by 0x4F175AF: virStringJoin (virstring.c:165)
==10701== by 0x131D4D: vshReadlineInit (vsh.c:2572)
==10701== by 0x1322DF: vshInit (vsh.c:2736)
==10701== by 0x1347C1: main (virsh.c:907)
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/vsh.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/vsh.c b/tools/vsh.c
index 1a5b6e8..54c4614 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -2552,8 +2552,8 @@ vshReadlineInit(vshControl *ctl)
char *name_capitalized = NULL;
int max_history = 500;
int ret = -1;
+ char *histsize_env = NULL;
const char *histsize_str = NULL;
- const char *histsize_env = NULL;
const char *strings[] = {
name_capitalized,
"HISTSIZE",
@@ -2613,6 +2613,7 @@ vshReadlineInit(vshControl *ctl)
cleanup:
VIR_FREE(userdir);
VIR_FREE(name_capitalized);
+ VIR_FREE(histsize_env);
return ret;
}
--
2.4.6
9 years, 3 months