[libvirt] [libvirt-sandbox PATCH] docker: Don't ignore qemu-img errors
by Guido Günther
---
libvirt-sandbox/image/sources/docker.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-sandbox/image/sources/docker.py b/libvirt-sandbox/image/sources/docker.py
index 43e9c32..aa5675e 100755
--- a/libvirt-sandbox/image/sources/docker.py
+++ b/libvirt-sandbox/image/sources/docker.py
@@ -662,7 +662,7 @@ class DockerSource(base.Source):
cmd.append("-o")
cmd.append("backing_fmt=qcow2,backing_file=%s" % diskfile)
cmd.append(tempfile)
- subprocess.call(cmd)
+ subprocess.check_call(cmd)
return tempfile
def get_command(self, template, templatedir, userargs):
--
2.11.0
7 years, 5 months
[libvirt] [PATCH] tools: make setvcpus --maximum imply --config
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
Currently --maximum was possible if and only if
--config was specified.
This patch makes setvcpus --maximum imply --config.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
tools/virsh-domain.c | 7 ++++---
tools/virsh.pod | 9 +++++----
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 5c42021..04ef816 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -6819,8 +6819,8 @@ cmdSetvcpus(vshControl *ctl, const vshCmd *cmd)
VSH_EXCLUSIVE_OPTIONS_VAR(current, live);
VSH_EXCLUSIVE_OPTIONS_VAR(current, config);
VSH_EXCLUSIVE_OPTIONS_VAR(guest, config);
-
- VSH_REQUIRE_OPTION_VAR(maximum, config);
+ VSH_EXCLUSIVE_OPTIONS_VAR(maximum, live);
+ VSH_EXCLUSIVE_OPTIONS_VAR(maximum, current);
if (config)
flags |= VIR_DOMAIN_AFFECT_CONFIG;
@@ -6829,7 +6829,8 @@ cmdSetvcpus(vshControl *ctl, const vshCmd *cmd)
if (guest)
flags |= VIR_DOMAIN_VCPU_GUEST;
if (maximum)
- flags |= VIR_DOMAIN_VCPU_MAXIMUM;
+ flags |= VIR_DOMAIN_VCPU_MAXIMUM |
+ VIR_DOMAIN_AFFECT_CONFIG;
if (hotpluggable)
flags |= VIR_DOMAIN_VCPU_HOTPLUGGABLE;
diff --git a/tools/virsh.pod b/tools/virsh.pod
index e7c513b..bc8b539 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -2501,10 +2501,11 @@ flag. Vcpus added to live domains supporting vcpu unplug are automatically
marked as hotpluggable.
The I<--maximum> flag controls the maximum number of virtual cpus that can
-be hot-plugged the next time the domain is booted. As such, it must only be
-used with the I<--config> flag, and not with the I<--live> or the I<--current>
-flag. Note that it may not be possible to change the maximum vcpu count if
-the processor topology is specified for the guest.
+be hot-plugged the next time the domain is booted. As such, it implies
+I<--config> be set. Also it can be used with the I<--config> flag,
+but not with the I<--live> or the I<--current> flag. Note that it may not
+be possible to change the maximum vcpu count if the processor topology
+is specified for the guest.
=item B<setvcpu> I<domain> I<vcpulist> [I<--enable>] | [I<--disable>]
[[I<--live>] [I<--config>] | [I<--current>]]
--
2.7.4
7 years, 5 months
[libvirt] [PATCH] virCapabilitiesInitCaches: Don't leak @cpus
by Michal Privoznik
The @cpus is allocated by virFileReadValueBitmap() but never
freed:
==21274== 40 (32 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record 808 of 1,004
==21274== at 0x4C2E080: calloc (vg_replace_malloc.c:711)
==21274== by 0x54BA561: virAlloc (viralloc.c:144)
==21274== by 0x54BC604: virBitmapNewEmpty (virbitmap.c:126)
==21274== by 0x54BD059: virBitmapParseUnlimited (virbitmap.c:570)
==21274== by 0x54EECE9: virFileReadValueBitmap (virfile.c:4113)
==21274== by 0x5563132: virCapabilitiesInitCaches (capabilities.c:1548)
==21274== by 0x2BB86E59: virQEMUCapsInit (qemu_capabilities.c:1132)
==21274== by 0x2BBEC067: virQEMUDriverCreateCapabilities (qemu_conf.c:928)
==21274== by 0x2BC3DEAA: qemuStateInitialize (qemu_driver.c:845)
==21274== by 0x5625AAC: virStateInitialize (libvirt.c:770)
==21274== by 0x124519: daemonRunStateInit (libvirtd.c:881)
==21274== by 0x554C927: virThreadHelper (virthread.c:206)
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/capabilities.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index a91a72a35..43b15761a 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -1643,5 +1643,6 @@ virCapabilitiesInitCaches(virCapsPtr caps)
VIR_FREE(path);
VIR_DIR_CLOSE(dirp);
virCapsHostCacheBankFree(bank);
+ virBitmapFree(cpus);
return ret;
}
--
2.13.0
7 years, 5 months
[libvirt] [PATCH] fix memory leak in daemonUnixSocketPaths and qemuMonitorJSONAttachCharDevCommand
by Yi Wang
From: Xi Xu <xu.xi8(a)zte.com.cn>
The @rundir is allocated in virGetUserRuntimeDirectory, may lost
when virFileMakePath failed.
The tlsalias allocated in qemuAliasTLSObjFromSrcAlias may lost
when append string to json.
---
daemon/libvirtd.c | 1 +
src/qemu/qemu_monitor_json.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 891238b..2447d78 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -288,6 +288,7 @@ daemonUnixSocketPaths(struct daemonConfig *config,
old_umask = umask(077);
if (virFileMakePath(rundir) < 0) {
umask(old_umask);
+ VIR_FREE(rundir);
goto error;
}
umask(old_umask);
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 0837290..66f3f87 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -6481,6 +6481,8 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
if (virJSONValueObjectAppendString(data, "tls-creds", tlsalias) < 0)
goto error;
+
+ VIR_FREE(tlsalias);
}
break;
--
1.8.3.1
7 years, 5 months
[libvirt] [PATCH] util: fix virfcp build on non-Linux
by Roman Bogorodskiy
- Include virerror.h for virReportSystemError
- Rename stub functions to match original function names
---
Pushed under the build breaker rule.
src/util/virfcp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/util/virfcp.c b/src/util/virfcp.c
index 3c7fab917..7660ba720 100644
--- a/src/util/virfcp.c
+++ b/src/util/virfcp.c
@@ -26,6 +26,7 @@
#include "viralloc.h"
#include "virfile.h"
+#include "virerror.h"
#include "virstring.h"
#include "virfcp.h"
@@ -80,14 +81,14 @@ virFCReadRportValue(const char *rport,
#else
bool
-virSysfsIsCapableFCRport(const char *rport ATTRIBUTE_UNUSED)
+virFCIsCapableRport(const char *rport ATTRIBUTE_UNUSED)
{
virReportSystemError(ENOSYS, "%s", _("Not supported on this platform"));
return false;
}
int
-virSysfsReadFCRport(const char *rport ATTRIBUTE_UNUSED,
+virFCReadRportValue(const char *rport ATTRIBUTE_UNUSED,
const char *entry ATTRIBUTE_UNUSED,
char **result ATTRIBUTE_UNUSED)
{
--
2.13.0
7 years, 5 months
[libvirt] [PATCH] CI: show the log in case of failure
by claudioandre.br@gmail.com
From: Claudio André <claudioandre.br(a)gmail.com>
Disclosure the content of the 'test-suite.log' file (if available) in case of failures inside Travis-CI. This is needed to understand what happened and to provide hints about the proper fix (if applicable).
---
.travis.yml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 266ffff..5a3e765 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -83,3 +83,11 @@ matrix:
# many unit tests fail & so does syntax-check, so skip for now
# one day we must fix it though....
- make -j3
+
+after_failure:
+ - echo '============================================================================'
+ - 'if [ -f $(pwd)/tests/test-suite.log ]; then
+ cat $(pwd)/tests/test-suite.log;
+ else
+ echo "=== NO LOG FILE FOUND ===";
+ fi'
--
2.11.0
7 years, 6 months
[libvirt] [libvirt-php PATCH] use proper arginfo for libvirt_domain_create
by Dawid Zamirski
this function takes only resource argument.
---
src/libvirt-php.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libvirt-php.c b/src/libvirt-php.c
index bfc9b7d..99d6397 100644
--- a/src/libvirt-php.c
+++ b/src/libvirt-php.c
@@ -629,7 +629,7 @@ static zend_function_entry libvirt_functions[] = {
PHP_FE(libvirt_domain_lookup_by_uuid, arginfo_libvirt_conn_uuid)
PHP_FE(libvirt_domain_lookup_by_uuid_string, arginfo_libvirt_conn_uuid)
PHP_FE(libvirt_domain_destroy, arginfo_libvirt_conn)
- PHP_FE(libvirt_domain_create, arginfo_libvirt_conn_xml)
+ PHP_FE(libvirt_domain_create, arginfo_libvirt_conn)
PHP_FE(libvirt_domain_resume, arginfo_libvirt_conn)
PHP_FE(libvirt_domain_core_dump, arginfo_libvirt_domain_core_dump)
PHP_FE(libvirt_domain_shutdown, arginfo_libvirt_conn)
--
2.13.0
7 years, 6 months
[libvirt] libvirt-php changing release strategy
by Michal Privoznik
Dear list,
as you've noticed, libvirt changed the versioning strategy and slowly
other subprojects are adapting it too. I mean, the version number is
changed right after the release and not just before it. It makes sense
and therefore I'm letting you know that libvirt-php is adapting this
scheme too:
commit 3bdbd3175d159a96731bbb95bfd4bbeff7952f16
Author: Michal Privoznik <mprivozn(a)redhat.com>
AuthorDate: Sat May 27 11:25:47 2017 +0200
Commit: Michal Privoznik <mprivozn(a)redhat.com>
CommitDate: Sat May 27 11:25:47 2017 +0200
Post-release version bump to 0.5.4
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
Michal
7 years, 6 months
[libvirt] [PATCH 0/7] extend node_device for CCW and fc_remote_port
by Bjoern Walk
Let's introduce two new capabilities to the node_device driver and fix two
smaller issues on the way.
The first is for CCW devices, most common on the S390 architecture. We expose
the relevant cssid, ssid and devno values.
The second is for fibre channel-backed SCSI devices, where we introduce the
fc_remote_port subcapability for SCSI targets. Here we expose the relevant
rport name as well as the port_name (WWPN).
Bjoern Walk (5):
node_device: detect CCW devices
virsh: nodedev: ability to filter CCW capabilities
util: helper functions for fibre channel devices
node_device: introduce new capability FC_RPORT
docs: update news.xml
Marc Hartmayer (2):
node_device: Use the iterator variable
node_device: Unlock obj in case of an error too
docs/formatnode.html.in | 12 ++
docs/news.xml | 11 ++
docs/schemas/basictypes.rng | 31 +++++
docs/schemas/domaincommon.rng | 30 -----
docs/schemas/nodedev.rng | 36 ++++++
include/libvirt/libvirt-nodedev.h | 1 +
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/conf/node_device_conf.c | 150 +++++++++++++++++++++-
src/conf/node_device_conf.h | 21 ++-
src/conf/virnodedeviceobj.c | 3 +-
src/libvirt-nodedev.c | 1 +
src/libvirt_private.syms | 5 +
src/node_device/node_device_driver.c | 16 ++-
src/node_device/node_device_linux_sysfs.c | 56 ++++++++
src/node_device/node_device_linux_sysfs.h | 2 +
src/node_device/node_device_udev.c | 39 +++++-
src/util/virfcp.c | 96 ++++++++++++++
src/util/virfcp.h | 32 +++++
tests/nodedevschemadata/ccw_0_0_10000-invalid.xml | 10 ++
tests/nodedevschemadata/ccw_0_0_ffff.xml | 10 ++
tests/nodedevschemadata/scsi_target1_0_0.xml | 12 ++
tests/nodedevxml2xmltest.c | 2 +
tools/virsh-nodedev.c | 3 +
tools/virsh.pod | 2 +-
25 files changed, 539 insertions(+), 44 deletions(-)
create mode 100644 src/util/virfcp.c
create mode 100644 src/util/virfcp.h
create mode 100644 tests/nodedevschemadata/ccw_0_0_10000-invalid.xml
create mode 100644 tests/nodedevschemadata/ccw_0_0_ffff.xml
create mode 100644 tests/nodedevschemadata/scsi_target1_0_0.xml
--
2.11.2
7 years, 6 months
[libvirt] [PATCH v2 00/11] Multiple cleanups within interfaceobj and interface driver
by John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2017-April/msg01225.html
I've been informed via internal IRC that the patches 9, 10, and 11 don't
apply cleanly - so here's a clean series.
John
John Ferlan (11):
interface: Consistently use 'obj' for a virInterfaceObjPtr
interface: Remove some unnecessary goto's for Interface tests
interface: Use virInterfaceDefPtr rather than deref from
virInterfaceObjPtr
interface: Make _virInterfaceObj struct private
interface: Make _virInterfaceObjList struct private
interface: Rename some virInterfaceObj* API's
interface: Clean up virInterfaceObjListFindByMACString
interface: Introduce virInterfaceObjNew
interface: Introduce virInterfaceObjEndAPI
interface: Convert virInterfaceObj to use virObjectLockable
interface: Alter virInterfaceObjListAssignDef @def param
po/POTFILES.in | 1 -
src/conf/virinterfaceobj.c | 277 +++++++++++++++++++++++++++++----------------
src/conf/virinterfaceobj.h | 72 ++++++------
src/libvirt_private.syms | 19 ++--
src/test/test_driver.c | 145 ++++++++++++------------
5 files changed, 295 insertions(+), 219 deletions(-)
--
2.9.4
7 years, 6 months