[libvirt] [PATCH 0/2] fix 2 bugs in virHostdevReAttachPCIDevices
by Huanle Han
Fix 1: Fix index error in loop after remove an element from the array
'virPCIDeviceList' is actually an array. Removing one element makes the
rest of the element move. Use while loop, increase index only when not
do 'virPCIDeviceListDel(pcidevs, dev)'
Fix 2:
In such a case:
1. Domain A and B xml contain the same SRIOV net hostdev(<interface
type='hostdev' /> with same pci address).
2. virsh start A (Successfully, and configure the SRIOV net with
custom mac)
3. virsh start B (Fail because of the hostdev used by domain A or other
reason.)
In step 3, 'virHostdevNetConfigRestore' is called for the hostdev
which is still used by domain A. It makes the mac/vlan of the SRIOV net
change.
Code Change in this fix:
1. As the pci used by other domain have been removed from
'pcidevs' in previous loop, we only restore the nic config for
the hostdev still in 'pcidevs'(used by this domain)
2. wrap a function 'virHostdevIsPCINetDevice', which detect whether the
hostdev is a pci net device or not.
3. update the comments to make it more clear
Huanle Han (2):
hostdev: Fix index error in loop after remove an element
hostdev: fix net config restore error
src/util/virhostdev.c | 56 ++++++++++++++++++++++++++++++++++++---------------
1 file changed, 40 insertions(+), 16 deletions(-)
--
1.9.1
9 years, 7 months
[libvirt] [PATCH] Typos: Get rid of dependan(t|cies)
by Martin Kletzander
Dependant is flagged as wrong in US dictionary (only valid in UK
dictionary, and even then, it has only the financial sense and not the
inter-relatedness sense that we are more prone to be wanting throughout
code).
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Pushed as trivial and already decided on in here:
https://www.redhat.com/archives/libvir-list/2015-March/msg01320.html
src/libvirt-domain.c | 4 ++--
src/libvirt-secret.c | 2 +-
src/util/virkmod.c | 2 +-
tools/virsh.pod | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index f1608dc..0d00af8 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -2642,7 +2642,7 @@ virDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
*
* Reads native configuration data describing a domain, and
* generates libvirt domain XML. The format of the native
- * data is hypervisor dependant.
+ * data is hypervisor dependent.
*
* Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case of error.
* the caller must free() the returned value.
@@ -2692,7 +2692,7 @@ virConnectDomainXMLFromNative(virConnectPtr conn,
*
* Reads a domain XML configuration document, and generates
* a native configuration file describing the domain.
- * The format of the native data is hypervisor dependant.
+ * The format of the native data is hypervisor dependent.
*
* Returns a 0 terminated UTF-8 encoded native config datafile, or NULL in case of error.
* the caller must free() the returned value.
diff --git a/src/libvirt-secret.c b/src/libvirt-secret.c
index 946d1b8..e77f223 100644
--- a/src/libvirt-secret.c
+++ b/src/libvirt-secret.c
@@ -452,7 +452,7 @@ virSecretGetUsageType(virSecretPtr secret)
*
* Get the unique identifier of the object with which this
* secret is to be used. The format of the identifier is
- * dependant on the usage type of the secret. For a secret
+ * dependent on the usage type of the secret. For a secret
* with a usage type of VIR_SECRET_USAGE_TYPE_VOLUME the
* identifier will be a fully qualfied path name. The
* identifiers are intended to be unique within the set of
diff --git a/src/util/virkmod.c b/src/util/virkmod.c
index e0bcdfc..219fad6 100644
--- a/src/util/virkmod.c
+++ b/src/util/virkmod.c
@@ -121,7 +121,7 @@ virKModLoad(const char *module, bool useBlacklist)
* Remove or unload a module.
*
* NB: Do not use 'modprobe -r' here as that code will recursively
- * unload any modules that were dependancies of the one being removed
+ * unload any modules that were dependencies of the one being removed
* even if things still require them. e.g. it'll see the 'bridge'
* module has refcount of 0 and remove it, even if there are bridges
* created on the host
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 5d52761..79d50f9 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -3235,7 +3235,7 @@ B<Note>: A storage pool that relies on remote resources such as an
times in order to have all the volumes detected (see B<pool-refresh>).
This is because the corresponding volume devices may not be present in
the host's filesystem during the initial pool startup or the current
-refresh attempt. The number of refresh retries is dependant upon the
+refresh attempt. The number of refresh retries is dependent upon the
network connection and the time the host takes to export the
corresponding devices.
--
2.3.4
9 years, 7 months
[libvirt] [PATCH] docs: Add Host sFlow into monitoring apps
by Martin Kletzander
Reported-by: Peter Phaal <peter.phaal(a)gmail.com>
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
docs/apps.html.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/apps.html.in b/docs/apps.html.in
index 79ee73a..fd45189 100644
--- a/docs/apps.html.in
+++ b/docs/apps.html.in
@@ -321,6 +321,12 @@
For a full description, please refer to the libvirt section in the
collectd.conf(5) manual page.
</dd>
+ <dt><a href="http://host-sflow.sourceforge.net/">Host sFlow</a></dt>
+ <dd>
+ Host sFlow is a lightweight agent running on KVM hypervisors that
+ links to libvirt library and exports standardized cpu, memory, network
+ and disk metrics for all virtual machines.
+ </dd>
<dt><a href="http://honk.sigxcpu.org/projects/libvirt/#munin">Munin</a></dt>
<dd>
The plugins provided by Guido Günther allow to monitor various things
--
2.3.3
9 years, 7 months
[libvirt] [PATCHv3 0/6] Allocate virtio-serial addresses
by Ján Tomko
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1076708
https://bugzilla.redhat.com/show_bug.cgi?id=890606
New in v3:
* preserve the behavior of honoring the controller if a partial address is specified:
<address type='virtio-serial' controller='2'/>
* automatically add a controller if we're out of free ports
and add a test for it
Ján Tomko (6):
Add test for virtio serial port assignment
Add functions to track virtio-serial addresses
Allocate virtio-serial addresses when starting a domain
Expand the address set when attaching a virtio-serial controller
Assign an address when hotplugging a virtio-serial device
Auto add virtio-serial controllers
src/conf/domain_addr.c | 435 +++++++++++++++++++++
src/conf/domain_addr.h | 61 +++
src/conf/domain_conf.c | 48 +--
src/conf/domain_conf.h | 1 +
src/libvirt_private.syms | 11 +
src/qemu/qemu_command.c | 63 +++
src/qemu/qemu_domain.c | 1 +
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_hotplug.c | 32 +-
src/qemu/qemu_process.c | 2 +
tests/qemuhotplugtest.c | 2 +-
.../qemuxml2argv-channel-virtio-auto.args | 2 +-
.../qemuxml2argv-channel-virtio-autoadd.args | 33 ++
.../qemuxml2argv-channel-virtio-autoadd.xml | 45 +++
.../qemuxml2argv-channel-virtio-autoassign.args | 20 +
.../qemuxml2argv-channel-virtio-autoassign.xml | 50 +++
tests/qemuxml2argvtest.c | 4 +
.../qemuxml2xmlout-channel-virtio-auto.xml | 9 +-
18 files changed, 777 insertions(+), 43 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-autoadd.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-autoadd.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-autoassign.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-autoassign.xml
--
2.0.5
9 years, 7 months
[libvirt] [PATCH v2 0/6] storage: handle scsi/iscsi error paths better
by John Ferlan
v1 here:
http://www.redhat.com/archives/libvir-list/2015-March/msg01562.html
changes:
1/6: Removed the virGetLastError() == NULL check
2/6: New - reading more closely showed an error path without a goto
3/6: New - Adjust return for virStorageBackendSCSINewLun to be able
to differentiate real error vs. deciding to return because
a stable path could not be determined
4/6: New - Found an unused variable in processLU
5/6: Adjust the logic to return -1 for "real" errors and -2 for errors
that are "recoverable". Removed the need for goto cleanup.
6/6: Add check for non-existent stable path at startup (and fail). Add
check during refresh for a found non standard stable path that returns
no volumes in the pool
John Ferlan (6):
iscsi: Use error message from virStorageBackendSCSIFindLUs
iscsi: Fix exit path for virStorageBackendISCSIFindLUs failure
scsi: Adjust return value for virStorageBackendSCSINewLun
scsi: Remove unused 'type_path' in processLU
scsi: Adjust return values from processLU
iscsi: Add checks for non standard stable target.path
src/storage/storage_backend_iscsi.c | 33 ++++++++++++++++-----
src/storage/storage_backend_scsi.c | 59 ++++++++++++++++++++++++-------------
2 files changed, 64 insertions(+), 28 deletions(-)
--
2.1.0
9 years, 7 months
[libvirt] [PATCH 0/7] Introduce storage pool status XML
by Erik Skultety
All of the commits resolve BZ https://bugzilla.redhat.com/show_bug.cgi?id=1177733
Erik Skultety (7):
storage: Remove unused attribute conn from 'checkPool' callback
conf: Add support for storage state directory
conf: Add/modify storage formatting functions
storage: Modify stateInitialize to support storage state XML
conf: Introduce virStoragePoolLoadAllState && virStoragePoolLoadState
storage: Introduce storagePoolUpdateAllState function
storage: Create/Delete pool status XML
src/conf/storage_conf.c | 229 ++++++++++++++++++++++++++++------
src/conf/storage_conf.h | 14 ++-
src/libvirt_private.syms | 2 +
src/storage/storage_backend.h | 3 +-
src/storage/storage_backend_fs.c | 3 +-
src/storage/storage_backend_iscsi.c | 3 +-
src/storage/storage_backend_logical.c | 3 +-
src/storage/storage_backend_mpath.c | 3 +-
src/storage/storage_backend_scsi.c | 3 +-
src/storage/storage_backend_zfs.c | 3 +-
src/storage/storage_driver.c | 166 +++++++++++++++++++-----
11 files changed, 348 insertions(+), 84 deletions(-)
--
1.9.3
9 years, 7 months
[libvirt] [PATCH] virsh: remove stale comment
by Ján Tomko
Copied from the vcpupin command, which has two modes of operation.
---
Pushed as trivial.
tools/virsh-domain.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index eee441f..e7b5eeb 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -6961,7 +6961,6 @@ cmdIOThreadPin(vshControl *ctl, const vshCmd *cmd)
goto cleanup;
cpumaplen = VIR_CPU_MAPLEN(maxcpu);
- /* Pin mode: pinning specified vcpu to specified physical cpus*/
if (!(cpumap = vshParseCPUList(ctl, cpulist, maxcpu, cpumaplen)))
goto cleanup;
--
2.0.5
9 years, 7 months
[libvirt] [python PATCH] Post-release version bump to 1.2.15
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
Pushed as trivial.
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 00e6d75..79b048f 100755
--- a/setup.py
+++ b/setup.py
@@ -309,7 +309,7 @@ class my_clean(clean):
_c_modules, _py_modules = get_module_lists()
setup(name = 'libvirt-python',
- version = '1.2.14',
+ version = '1.2.15',
url = 'http://www.libvirt.org',
maintainer = 'Libvirt Maintainers',
maintainer_email = 'libvir-list(a)redhat.com',
--
2.3.5
9 years, 7 months
[libvirt] [PATCH 0/2] qemu: Finish fixing of interlocking domain ops with blockjobs
by Peter Krempa
Peter Krempa (1):
qemu: snapshot: Check for block jobs individually
Shanzhi Yu (1):
conf: Rename virDomainHasDiskMirror and detect block jobs properly
src/conf/domain_conf.c | 25 ++++++++++++++++++++-----
src/conf/domain_conf.h | 3 ++-
src/libvirt_private.syms | 2 +-
src/qemu/qemu_driver.c | 19 +++++++++++--------
src/qemu/qemu_migration.c | 2 +-
5 files changed, 35 insertions(+), 16 deletions(-)
--
2.2.2
9 years, 7 months
[libvirt] [PATCH 0/6] Cleanups
by Ján Tomko
First two patches are a result of compiling with -Wunused-macros.
They reduce the number of infractions from 111 to 82.
The remaining cases are:
* unused VIR_FROM_THIS
* copies of other headers
* in drivers I'm not familiar with enough
The next two were found randomly, which lead me to look
into virutil.h as well, because just like virsh.c,
the util files were split as well.
Ján Tomko (6):
Remove unused macros
Use the DEFAULT_DRIVER_DIR macro
Do not include cpu_map.h in libvirtd.c
Clean up headers in src/util/virutil.h
Remove unused includes from virsh
Remove unnecessary includes from virsh.h
daemon/libvirtd.c | 2 --
src/conf/network_conf.c | 1 -
src/driver.c | 4 ++--
src/locking/lock_daemon.c | 1 -
src/locking/lock_driver_lockd.c | 4 ----
src/openvz/openvz_driver.c | 4 ----
src/qemu/qemu_driver.c | 2 --
src/qemu/qemu_monitor_text.c | 3 ---
src/test/test_driver.c | 1 -
src/uml/uml_driver.c | 3 ---
src/util/virutil.c | 4 ----
src/util/virutil.h | 2 --
tests/sockettest.c | 10 ----------
tests/testutils.c | 5 -----
tools/virsh-domain.c | 1 +
tools/virsh-network.c | 7 +------
tools/virsh-nodedev.c | 7 +------
tools/virsh-nwfilter.c | 6 ------
tools/virsh-pool.c | 6 ------
tools/virsh-secret.c | 6 ------
tools/virsh-snapshot.c | 1 +
tools/virsh.c | 10 ----------
tools/virsh.h | 3 ---
23 files changed, 6 insertions(+), 87 deletions(-)
--
2.0.5
9 years, 7 months