[libvirt] [PATCH] build: fix build without numactl
by Eric Blake
Under ./configure --without-numactl but with numactl-devel installed,
the build fails with:
../../src/util/virnuma.c: In function 'virNumaNodeIsAvailable':
../../src/util/virnuma.c:407:5: error: implicit declaration of function 'numa_bitmask_isbitset' [-Werror=implicit-function-declaration]
return numa_bitmask_isbitset(numa_nodes_ptr, node);
^
and other failures, all because the configure results for particular
functions were used without regard to whether libnuma was even being
linked in.
* src/util/virnuma.c (virNumaGetPages): Fix message typo.
(virNumaNodeIsAvailable): Correct build when not using numactl.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the build-breaker rule.
src/util/virnuma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virnuma.c b/src/util/virnuma.c
index 46f48d2..7a11a3b 100644
--- a/src/util/virnuma.c
+++ b/src/util/virnuma.c
@@ -390,7 +390,7 @@ virNumaGetMaxCPUs(void)
}
-#ifdef HAVE_NUMA_BITMASK_ISBITSET
+#if WITH_NUMACTL && HAVE_NUMA_BITMASK_ISBITSET
/**
* virNumaNodeIsAvailable:
* @node: node to check
@@ -485,7 +485,7 @@ virNumaGetDistances(int node ATTRIBUTE_UNUSED,
{
*distances = NULL;
*ndistances = 0;
- VIR_DEBUG("NUMA distance information isn't availble on this host");
+ VIR_DEBUG("NUMA distance information isn't available on this host");
return 0;
}
#endif
--
1.9.3
10 years, 9 months
[libvirt] [REPOST 0/8] storage_scsi: Stable SCSI host addressing
by John Ferlan
Reposting of a series from last month changing only the span version
in the docs from 1.2.6 to 1.2.7. Previous posting here:
http://www.redhat.com/archives/libvir-list/2014-June/msg00448.html
The concept still remains the same - rather than rely on the hostNN
numbers for the scsi_host to remain stable and unique across host reboots
and/or kernel rebuilds, allow use a combination of the scsi_host's PCI
address and the value from the hostNN's 'unique_id' file.
John Ferlan (6):
getAdapterName: check for SCSI_HOST
scsi_backend: Use existing LINUX_SYSFS_SCSI_HOST_PREFIX definition
virutil: Introduce virReadSCSIUniqueId
Add unique_id to nodedev output
scsi_host: Introduce virFindSCSIHostByPCI
getAdapterName: Lookup stable scsi_host
Osier Yang (2):
virStoragePoolSourceAdapter: Refine the SCSI_HOST adapter name
storage: Introduce parentaddr into virStoragePoolSourceAdapter
docs/formatnode.html.in | 11 +
docs/formatstorage.html.in | 143 ++++++++--
docs/schemas/basictypes.rng | 24 +-
docs/schemas/nodedev.rng | 6 +
src/conf/node_device_conf.c | 23 +-
src/conf/node_device_conf.h | 1 +
src/conf/storage_conf.c | 111 +++++++-
src/conf/storage_conf.h | 8 +-
src/libvirt_private.syms | 2 +
src/node_device/node_device_linux_sysfs.c | 6 +
src/phyp/phyp_driver.c | 8 +-
src/storage/storage_backend_scsi.c | 53 +++-
src/test/test_driver.c | 5 +-
src/util/virutil.c | 154 +++++++++++
src/util/virutil.h | 8 +
tests/Makefile.am | 7 +
.../pci_8086_27c5_scsi_host_0_unique_id.xml | 8 +
tests/nodedevxml2xmltest.c | 1 +
tests/scsihosttest.c | 308 +++++++++++++++++++++
.../pool-scsi-type-scsi-host-stable.xml | 19 ++
.../pool-scsi-type-scsi-host-stable.xml | 22 ++
tests/storagepoolxml2xmltest.c | 1 +
22 files changed, 868 insertions(+), 61 deletions(-)
create mode 100644 tests/nodedevschemadata/pci_8086_27c5_scsi_host_0_unique_id.xml
create mode 100644 tests/scsihosttest.c
create mode 100644 tests/storagepoolxml2xmlin/pool-scsi-type-scsi-host-stable.xml
create mode 100644 tests/storagepoolxml2xmlout/pool-scsi-type-scsi-host-stable.xml
--
1.9.3
10 years, 9 months
[libvirt] [PATCH] schema: pool: netfs: Don't enforce slash in glusterfs pool source
by Peter Krempa
Gluster volumes don't start with a leading slash. Our schema for netfs
gluster pools enforces it though. Luckily mount.glusterfs skips it.
Allow a slashless volume name for glusterfs netfs mounts in the schema.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1101999
---
docs/schemas/basictypes.rng | 6 +++
docs/schemas/storagepool.rng | 44 +++++++++++++++++-----
.../pool-netfs-gluster-without-slash.xml | 12 ++++++
3 files changed, 53 insertions(+), 9 deletions(-)
create mode 100644 tests/storagepoolxml2xmlin/pool-netfs-gluster-without-slash.xml
diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng
index 5fe3a97..9c9419f 100644
--- a/docs/schemas/basictypes.rng
+++ b/docs/schemas/basictypes.rng
@@ -231,6 +231,12 @@
</data>
</define>
+ <define name="dirPath">
+ <data type="string">
+ <param name="pattern">[a-zA-Z0-9_\.\+\-\\&"'<>/%]*</param>
+ </data>
+ </define>
+
<define name="absFilePath">
<data type="string">
<param name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%,]+</param>
diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng
index 8d7a94d..b2d1473 100644
--- a/docs/schemas/storagepool.rng
+++ b/docs/schemas/storagepool.rng
@@ -327,6 +327,15 @@
</element>
</define>
+ <define name='sourceinfonetfsgluster'>
+ <element name='dir'>
+ <attribute name='path'>
+ <ref name='dirPath'/>
+ </attribute>
+ <empty/>
+ </element>
+ </define>
+
<define name='sourceinfoname'>
<element name='name'>
<text/>
@@ -394,7 +403,6 @@
<value>auto</value>
<value>nfs</value>
<value>cifs</value>
- <value>glusterfs</value>
</choice>
</attribute>
</element>
@@ -468,14 +476,32 @@
<define name='sourcenetfs'>
<element name='source'>
- <interleave>
- <ref name='sourceinfohost'/>
- <ref name='sourceinfodir'/>
- <ref name='sourcefmtnetfs'/>
- <optional>
- <ref name='sourceinfovendor'/>
- </optional>
- </interleave>
+ <choice>
+ <group>
+ <interleave>
+ <ref name='sourceinfohost'/>
+ <ref name='sourceinfodir'/>
+ <ref name='sourcefmtnetfs'/>
+ <optional>
+ <ref name='sourceinfovendor'/>
+ </optional>
+ </interleave>
+ </group>
+ <group>
+ <interleave>
+ <ref name='sourceinfohost'/>
+ <ref name='sourceinfonetfsgluster'/>
+ <element name='format'>
+ <attribute name='type'>
+ <value>glusterfs</value>
+ </attribute>
+ </element>
+ <optional>
+ <ref name='sourceinfovendor'/>
+ </optional>
+ </interleave>
+ </group>
+ </choice>
</element>
</define>
diff --git a/tests/storagepoolxml2xmlin/pool-netfs-gluster-without-slash.xml b/tests/storagepoolxml2xmlin/pool-netfs-gluster-without-slash.xml
new file mode 100644
index 0000000..69a2c6d
--- /dev/null
+++ b/tests/storagepoolxml2xmlin/pool-netfs-gluster-without-slash.xml
@@ -0,0 +1,12 @@
+<pool type='netfs'>
+ <source>
+ <host name='example.com'/>
+ <format type='glusterfs'/>
+ <dir path='volume'/>
+ </source>
+ <name>netfs-gluster</name>
+ <uuid>d5609ced-94b1-489e-b218-eff35c30336a</uuid>
+ <target>
+ <path>/mnt/gluster</path>
+ </target>
+</pool>
--
2.0.0
10 years, 9 months
[libvirt] [PATCH] doc: Explicitly specify how to override spice channel mode
by Peter Krempa
Be more clear that the "<channel mode=" attribute overrides the default
set by "defaultMode".
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1033704
---
docs/formatdomain.html.in | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index bb6f710..8950959 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4191,7 +4191,13 @@ qemu-kvm -net nic,model=? /dev/null
configured, it can be desirable to restrict what
channels can be run on each port. This is achieved by
adding one or more <channel> elements inside the
- main <graphics> element. Valid channel names
+ main <graphics> element and setting the <code>mode</code>
+ attribute to either <code>secure</code> or <code>insecure</code>.
+ Setting the mode attribute overrides the default value as set
+ by the <code>defaultMode</code> attribute. (Note that specifying
+ <code>any</code> as mode discards the entry as the channel would
+ inherit the default mode anyways)
+ Valid channel names
include <code>main</code>, <code>display</code>,
<code>inputs</code>, <code>cursor</code>,
<code>playback</code>, <code>record</code>
--
2.0.0
10 years, 9 months
[libvirt] [PATCH] domtop: Fix build on mingw
by Michal Privoznik
Firstly, there's no sigaction() nor struct sigaction on mingw. We have
to use the one implemented by gnulib (and hence link with gnulib).
Then, for some reason one header file from windows defines ERROR
symbol. Yes it does. Sigh.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
examples/domtop/Makefile.am | 6 ++++--
examples/domtop/domtop.c | 17 +++++++++++++++++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/examples/domtop/Makefile.am b/examples/domtop/Makefile.am
index c5cb6c7..dbebb46 100644
--- a/examples/domtop/Makefile.am
+++ b/examples/domtop/Makefile.am
@@ -16,9 +16,11 @@
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
+INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
+ -I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
+ -I$(top_srcdir)
LDADDS = $(STATIC_BINARIES) $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \
- $(COVERAGE_LDFLAGS)
+ $(top_builddir)/gnulib/lib/libgnu.la $(COVERAGE_LDFLAGS)
noinst_PROGRAMS=domtop
diff --git a/examples/domtop/domtop.c b/examples/domtop/domtop.c
index 4ac7889..af5da46 100644
--- a/examples/domtop/domtop.c
+++ b/examples/domtop/domtop.c
@@ -20,6 +20,8 @@
* Author: Michal Privoznik <mprivozn(a)redhat.com>
*/
+#include <config.h>
+
#include <errno.h>
#include <getopt.h>
#include <libvirt/libvirt.h>
@@ -35,6 +37,21 @@
static bool debug;
static bool run_top;
+/* On mingw, there's a header file that poisons the well:
+ *
+ *
+ * CC domtop.o
+ *domtop.c:40:0: warning: "ERROR" redefined [enabled by default]
+ * #define ERROR(...) \
+ * ^
+ *In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:71:0,
+ * from /usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:23,
+ * from ../../gnulib/lib/unistd.h:48,
+ * from domtop.c:35:
+ * /usr/i686-w64-mingw32/sys-root/mingw/include/wingdi.h:75:0: note: this is the location of the previous definition
+ * #define ERROR 0
+ */
+#undef ERROR
#define ERROR(...) \
do { \
fprintf(stderr, "ERROR %s:%d : ", __FUNCTION__, __LINE__); \
--
1.8.5.5
10 years, 9 months
[libvirt] [PATCH] node_device: HAL: Ignore return value of virStrToLong_ui
by Peter Krempa
Commit 5df813177c3b609a8cf5db26ae94b26d4a40063d forgot to adjust a few
callers of virStrToLong_ui to ignore the returned value in some ancient
parts of the code.
---
Notes:
Pushed under build-braker rule as HAL enabled hosts fail to compile.
src/node_device/node_device_hal.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c
index 8656b5d..cd7d399 100644
--- a/src/node_device/node_device_hal.c
+++ b/src/node_device/node_device_hal.c
@@ -151,10 +151,10 @@ gather_pci_cap(LibHalContext *ctx, const char *udi,
if (get_str_prop(ctx, udi, "pci.linux.sysfs_path", &sysfs_path) == 0) {
char *p = strrchr(sysfs_path, '/');
if (p) {
- (void)virStrToLong_ui(p+1, &p, 16, &d->pci_dev.domain);
- (void)virStrToLong_ui(p+1, &p, 16, &d->pci_dev.bus);
- (void)virStrToLong_ui(p+1, &p, 16, &d->pci_dev.slot);
- (void)virStrToLong_ui(p+1, &p, 16, &d->pci_dev.function);
+ ignore_value(virStrToLong_ui(p+1, &p, 16, &d->pci_dev.domain));
+ ignore_value(virStrToLong_ui(p+1, &p, 16, &d->pci_dev.bus));
+ ignore_value(virStrToLong_ui(p+1, &p, 16, &d->pci_dev.slot));
+ ignore_value(virStrToLong_ui(p+1, &p, 16, &d->pci_dev.function));
}
if (!virPCIGetPhysicalFunction(sysfs_path,
--
2.0.0
10 years, 9 months
[libvirt] [PATCH 0/7] Fix domain state handling when reverting snapshots in PMSUSPENDED state
by Peter Krempa
Unfortunately qemu behaves strangely so it probably can't be fully verified :/
Peter Krempa (7):
event: Add transition reason for PMSUSPENDED state from snapshot ops
lib: Add reason for a domain reaching the PMSUSPENDED state
qemu: snapshot: Convert if-else switch to switch statement
qemu: snapshot: Reject revertion from clearly bad states
qemu: snapshot: Add helper to generate lifecycle events
qemu: snapshot: Refactor event creation when reverting snapshots
qemu: snapshot: Correctly revert snapshots in PMSUSPENDED state
examples/object-events/event-test.c | 3 +
include/libvirt/libvirt.h.in | 6 +
src/conf/domain_conf.c | 3 +-
src/qemu/qemu_driver.c | 301 +++++++++++++++++++++++++-----------
tools/virsh-domain-monitor.c | 3 +-
tools/virsh-domain.c | 3 +-
6 files changed, 228 insertions(+), 91 deletions(-)
--
2.0.0
10 years, 9 months
[libvirt] [PATCH 0/3] Resolve a few coverity issues
by Peter Krempa
Mostly introduced by the "domtop" program.
Peter Krempa (3):
examples: domtop: Fix uninitialized variable use
examples: domtop: Avoid leaking memory
util: Check return value from virStrToLong* functions
examples/domtop/domtop.c | 10 +++-------
src/util/virsexpr.c | 6 +++---
src/util/virstring.h | 30 ++++++++++++++++++++----------
src/vbox/vbox_tmpl.c | 4 ++--
src/xen/xs_internal.c | 2 +-
src/xenxs/xen_xm.c | 9 +++++++--
6 files changed, 36 insertions(+), 25 deletions(-)
--
2.0.0
10 years, 9 months
[libvirt] KVM Reset Password
by Farzad Zarasvand
Hi,
I am using KVM with libvirt and openstack.
I try to reset an instance password. but I received error 501 not implemented. how do I change instance password?
thnx
10 years, 9 months
Re: [libvirt] Enable kvm on aarch64, Cleanup F-16/18 conditionals
by Eric Blake
On 07/15/2014 04:29 PM, Peter Robinson wrote:
>> Doing an out-of-the-box build on RHEL 5 is the oldest configuration
>> still actively (if marginally) supported, ideally for as long as RHEL 5
>> remains a live platform (several more years to go). We have build-bots
>> that ensure that we can build on RHEL 5, although I'm not sure if those
>> buildbots are exercising 'make rpm' to test the older parts of the spec
>> file. Historically, RHEL 5.10 is based off of libvirt-0.8.2, and that
>> was the release in use during Fedora 13. So it's _definitely_ worth
>> culling any conditionals older than F13; but stuff between F13 and F18
>> might be shared with RHEL 5, and therefore more effort to cull the
>> Fedora side while still leaving the RHEL side intact.
>
> Yes, and you'll note in my change that I didn't change anything that
> affected EL based releases. In terms of F-13 style tags you should be
> capturing that in appropriate and equivalent EL tags to ensure you get
> right and consistent conditionals for the appropriate release as
> opposed to relying on a translation as you have EL conditionals there
> already.... why mix the two.
Not sure I follow you here; a patch may be worth more than words (and
I'm planning on posting a tentative patch soon).
>> Anyone else on the libvirt list have an opinion on how far back we can
>> clean without annoying people that are slow on the upgrade to modern Fedora?
>
> You have known users that are actively upgrading to the latest libvirt
> and no other components on old versions of Fedora?
I don't honestly know - which is why I'm asking the list if anyone
reading here would care if we pruned F18 code.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
10 years, 9 months