[libvirt] [java] Build Sources with plain Maven
by philipp.haussleiter@yahoo.de
Hi all,
i recently tried to use the libvirt-java Bindings. Since the Build with autobuild / ant / maven seems a little bit odd to me, i started with porting the Build to plain maven.
The only hard dependency is a installed libvirt. I currently tested it on MacOS and Linux (i used maven os switches to link in the necessary JNA Lib Paths).
Are there any people interested in this Changes?
I will also try to contact the last contributors for that repository.
ATM the whole thing is a WIP, but Sources compile correct and all existing tests run without any problems.
KR,
Philipp
11 years, 4 months
[libvirt] [PATCH] Add a couple of debug statements to LXC driver
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
When failing to start a container due to inaccessible root
filesystem path, we did not log any meaningful error. Add a
few debug statements to assist diagnosis
Pushed under trivial rule
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/lxc/lxc_container.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index fcd9b74..940233b 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -1762,6 +1762,8 @@ static int lxcContainerSetupPivotRoot(virDomainDefPtr vmDef,
char *sec_mount_options;
char *stateDir = NULL;
+ VIR_DEBUG("Setup pivot root");
+
if (!(sec_mount_options = virSecurityManagerGetMountOptions(securityDriver, vmDef)))
return -1;
@@ -1864,12 +1866,16 @@ static int lxcContainerResolveSymlinks(virDomainDefPtr vmDef)
char *newroot;
size_t i;
+ VIR_DEBUG("Resolving symlinks");
+
for (i = 0; i < vmDef->nfss; i++) {
virDomainFSDefPtr fs = vmDef->fss[i];
if (!fs->src)
continue;
- if (virFileResolveAllLinks(fs->src, &newroot) < 0)
+ if (virFileResolveAllLinks(fs->src, &newroot) < 0) {
+ VIR_DEBUG("Fail to resolve link %s", fs->src);
return -1;
+ }
VIR_DEBUG("Resolved '%s' to %s", fs->src, newroot);
--
1.8.3.1
11 years, 4 months
[libvirt] invoking qemu with -readconfig
by Jim Fehlig
Hi All,
I was recently asked about the possibility of libvirt creating a config
file and then invoking qemu with '-readconfig <file>' instead of passing
all arguments on the command line. The primary reason for this request
is a more readable ps output and the ability to inspect the arguments in
a file (with one arg per line) instead of one long line.
I was certain there was a similar request in the past, but haven't had
much luck searching the mail archives or with google. Has this been
discussed previously? If so, any pointers or summary of the outcome?
If not, what are folks' opinion about this?
Regards,
Jim
11 years, 4 months
[libvirt] [PATCH] storage: silently ignore missing files on pool refresh
by Ján Tomko
From: Wei Zhou <w.zhou(a)leaseweb.com>
Make virStorageBackendVolOpenCheckMode return -2 instead of
-1 if volume file is missing.
https://bugzilla.redhat.com/show_bug.cgi?id=977706
---
src/storage/storage_backend.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index e2527c9..f063601 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -1084,7 +1084,7 @@ virStorageBackendForType(int type)
* Allows caller to silently ignore files with improper mode
*
* Returns -1 on error, -2 if file mode is unexpected or the
- * volume is a dangling symbolic link.
+ * volume is a dangling symbolic link or file is missing.
*/
int
virStorageBackendVolOpenCheckMode(const char *path, unsigned int flags)
@@ -1097,7 +1097,7 @@ virStorageBackendVolOpenCheckMode(const char *path, unsigned int flags)
virReportSystemError(errno,
_("cannot stat file '%s'"),
path);
- return -1;
+ return -2;
}
if (S_ISFIFO(sb.st_mode)) {
--
1.8.1.5
11 years, 4 months
[libvirt] [PATCH 0/3] libssh2: improve authentication options
by Peter Krempa
This series adds the ability to use tunelled password authentication
and enables to store credentials for such authentication in libvirts
credential storage configuration.
Peter Krempa (3):
virAuth: Don't require virConnectPtr to retrieve authentication creds
libssh2: Improve password based authentication
remote: Improve libssh2 password authentication
src/remote/remote_driver.c | 3 +-
src/rpc/virnetclient.c | 11 ++---
src/rpc/virnetclient.h | 4 +-
src/rpc/virnetsocket.c | 8 ++--
src/rpc/virnetsocket.h | 3 +-
src/rpc/virnetsshsession.c | 110 ++++++++++++++++++++++++++++++++-------------
src/rpc/virnetsshsession.h | 5 ++-
src/util/virauth.c | 107 ++++++++++++++++++++++++++++++-------------
src/util/virauth.h | 17 ++++++-
9 files changed, 191 insertions(+), 77 deletions(-)
--
1.8.2.1
11 years, 4 months
[libvirt] [PATCH] nodeinfo: Don't fail on non-contiguous NUMA topologies
by Peter Krempa
From: hejia hejia <jiakernel(a)gmail.com>
nodeGetFreeMemory and nodeGetCellsFreeMemory assumed that the NUMA nodes
are contiguous and starting from 0. Unfortunately there are machines
that don't match this assumption:
available: 1 nodes (1)
node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
node 1 size: 16340 MB
node 1 free: 11065 MB
Before this patch:
error: internal error Failed to query NUMA free memory
error: internal error Failed to query NUMA free memory for node: 0
After this patch:
Total: 15772580 KiB
0: 0 KiB
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/nodeinfo.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index a2a2f73..4df4851 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -1686,12 +1686,9 @@ nodeGetCellsFreeMemory(unsigned long long *freeMems,
for (numCells = 0, n = startCell; n <= lastCell; n++) {
long long mem;
- if (numa_node_size64(n, &mem) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to query NUMA free memory for node: %d"),
- n);
- goto cleanup;
- }
+ if (numa_node_size64(n, &mem) < 0)
+ mem = 0;
+
freeMems[numCells++] = mem;
}
ret = numCells;
@@ -1712,15 +1709,12 @@ nodeGetFreeMemory(void)
for (n = 0; n <= numa_max_node(); n++) {
long long mem;
- if (numa_node_size64(n, &mem) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- "%s", _("Failed to query NUMA free memory"));
- goto cleanup;
- }
+ if (numa_node_size64(n, &mem) < 0)
+ continue;
+
freeMem += mem;
}
-cleanup:
return freeMem;
}
--
1.8.3.2
11 years, 4 months
[libvirt] [PATCHv2 0/3] avoid deadlock in child setting supplemental groups
by Eric Blake
v1 was here:
https://www.redhat.com/archives/libvir-list/2013-May/msg01600.html
changes since then: new patch 1, patch 2 (old patch 1/2) is greatly
simplified by gnulib, and patch 3 (old patch 2/2) is rebased to
pick up an additional call added in lxc.
Eric Blake (3):
util: grab primary group when doing user lookup
util: add virGetGroupList
util: make virSetUIDGID async-signal-safe
.gnulib | 2 +-
bootstrap.conf | 1 +
configure.ac | 4 +-
src/libvirt_private.syms | 1 +
src/lxc/lxc_container.c | 9 ++-
src/security/security_dac.c | 16 +++--
src/util/vircommand.c | 10 ++-
src/util/virfile.c | 30 ++++++++-
src/util/virutil.c | 149 +++++++++++++++++++++-----------------------
src/util/virutil.h | 7 ++-
10 files changed, 135 insertions(+), 94 deletions(-)
--
1.8.1.4
11 years, 4 months
[libvirt] [PATCH v2 0/7] Resolve Coverity issues
by John Ferlan
v1:
https://www.redhat.com/archives/libvir-list/2013-July/msg00691.html
Changes over v1:
* Add additional files to patch #2 to include other places were
sysconf(_SC_OPEN_MAX) was used within libvirt sources.
* Change for loop end conditions to use "<variable> != -1" (should have
looked deeper at other changes - wasn't even thinking of that option)
John Ferlan (7):
hellolibvirt: Resolve Coverity issues
testutils: Resolve Coverity issues
virsh-domain-monitor: Resolve Coverity issues
virsh-interface: Resolve Coverity issues
virsh-nodedev: Resolve Coverity issues
storage_backend: Resolve Coverity issue
qemu_hostdev: Resolve Coverity issue
examples/hellolibvirt/hellolibvirt.c | 7 +++++++
src/lxc/lxc_container.c | 5 +++++
src/qemu/qemu_hostdev.c | 3 ++-
src/storage/storage_backend.c | 1 +
src/util/vircommand.c | 5 +++++
tests/commandhelper.c | 6 +++++-
tests/testutils.c | 3 +++
tools/virsh-domain-monitor.c | 2 +-
tools/virsh-interface.c | 4 ++--
tools/virsh-nodedev.c | 2 +-
10 files changed, 32 insertions(+), 6 deletions(-)
--
1.8.1.4
11 years, 4 months
[libvirt] [PATCH] util: add rebase fix that was accidentally omitted from previous patch
by Laine Stump
I had made the change locally, so make check and make syntax-check
were successful, but forgot to add/commit. Unfortunately, git allows a
push when the local directory is dirty, so it didn't catch my mistake.
---
Pushed under the build breaker rule.
git *was* very informative when I tried to switch branches - *then* it
complained about the uncommitted local changes. No problem to push
with outstanding local changes though. That seems like a bug to me; is
there any situation where that would be a desired thing?
src/util/virpci.c | 2 +-
src/util/virusb.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index ed55b80..3fa4a35 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -1669,7 +1669,7 @@ virPCIDeviceListAdd(virPCIDeviceListPtr list,
_("Device %s is already in use"), dev->name);
return -1;
}
- return VIR_APPEND_ELEMENT(list->devs, list->count, dev, true);
+ return VIR_APPEND_ELEMENT(list->devs, list->count, dev);
}
diff --git a/src/util/virusb.c b/src/util/virusb.c
index 60222f4..e901618 100644
--- a/src/util/virusb.c
+++ b/src/util/virusb.c
@@ -450,7 +450,7 @@ virUSBDeviceListAdd(virUSBDeviceListPtr list,
dev->name);
return -1;
}
- return VIR_APPEND_ELEMENT(list->devs, list->count, dev, true);
+ return VIR_APPEND_ELEMENT(list->devs, list->count, dev);
}
virUSBDevicePtr
--
1.7.11.7
11 years, 4 months
[libvirt] [PATCH] maint: update to latest gnulib
by Eric Blake
Future patches need LGPLv2+ versions of some modules that had
recent license changes; but separating the gnulib update from
the actual use of the modules makes it easier to backport to
an older version while avoiding a submodule update (assuming,
of course, that the backport is to a system where glibc provides
adequate functionaliy without needing the gnulib module).
* .gnulib: Update to latest, for modules needed in later patches.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the trivial gnulib rule.
* .gnulib b72ff2a...da8d59e (9):
> regex: port to --with-included-regex --enable-gcc-warnings non-threaded
> accept4, dup3, pipe2: port to Cygwin
> mountlist: add support for deallocating returned list entries
> stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11
> fnmatch: don't goto over declaration
> pipe2: decouple from binary-io a bit
> mgetgroups: relax license to LGPLv2+
> xalloc-oversized: relax license to LGPLv2+
> nproc: relax license to LGPLv2+
.gnulib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gnulib b/.gnulib
index b72ff2a..da8d59e 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit b72ff2a45efde544c406804186d37a3254728571
+Subproject commit da8d59ee79138b85daee1ad5b22ea12e4fb6ce47
--
1.8.1.4
11 years, 4 months