[libvirt] [PATCH v2] utiltest: Use int8_t instead of char.
by Michal Privoznik
Not every architecture out there has 'char' signed by default.
For instance, my arm box has it unsigned by default:
$ gcc -dM -E - < /dev/null | grep __CHAR_UNSIGNED__
#define __CHAR_UNSIGNED__ 1
Therefore, after 65c61e50 the test if failing for me. Problem is,
we are trying to assign couple of negative values into char
assuming some will overflow and some don't. That can't be the
case if 'char' is unsigned by default. Lets use more explicit types
instead: int8_t and uint8_t where is no ambiguity.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/utiltest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/utiltest.c b/tests/utiltest.c
index 3a1f8eb..98c689d 100644
--- a/tests/utiltest.c
+++ b/tests/utiltest.c
@@ -184,8 +184,8 @@ static int
testOverflowCheckMacro(const void *data ATTRIBUTE_UNUSED)
{
long long tmp;
- unsigned char luchar;
- char lchar;
+ uint8_t luchar;
+ int8_t lchar;
TEST_OVERFLOW(luchar, 254, false);
TEST_OVERFLOW(luchar, 255, false);
--
2.3.6
9 years, 11 months
[libvirt] [PATCH] apibuild: Fix indentation
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
docs/apibuild.py | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/docs/apibuild.py b/docs/apibuild.py
index 9fa9361..18278db 100755
--- a/docs/apibuild.py
+++ b/docs/apibuild.py
@@ -1356,32 +1356,32 @@ class CParser:
token = self.token()
return token
elif token[0] == "name":
- self.cleanupComment()
- if name is not None:
- if self.comment is not None:
- comment = string.strip(self.comment)
- self.comment = None
- self.enums.append((name, value, comment))
- name = token[1]
- comment = ""
+ self.cleanupComment()
+ if name is not None:
+ if self.comment is not None:
+ comment = string.strip(self.comment)
+ self.comment = None
+ self.enums.append((name, value, comment))
+ name = token[1]
+ comment = ""
+ token = self.token()
+ if token[0] == "op" and token[1][0] == "=":
+ value = ""
+ if len(token[1]) > 1:
+ value = token[1][1:]
token = self.token()
- if token[0] == "op" and token[1][0] == "=":
- value = ""
- if len(token[1]) > 1:
- value = token[1][1:]
- token = self.token()
- while token[0] != "sep" or (token[1] != ',' and
- token[1] != '}'):
- value = value + token[1]
- token = self.token()
- else:
- try:
- value = "%d" % (int(value) + 1)
- except:
- self.warning("Failed to compute value of enum %s" % (name))
- value=""
- if token[0] == "sep" and token[1] == ",":
+ while token[0] != "sep" or (token[1] != ',' and
+ token[1] != '}'):
+ value = value + token[1]
token = self.token()
+ else:
+ try:
+ value = "%d" % (int(value) + 1)
+ except:
+ self.warning("Failed to compute value of enum %s" % (name))
+ value=""
+ if token[0] == "sep" and token[1] == ",":
+ token = self.token()
else:
token = self.token()
return token
--
2.4.2
9 years, 11 months
[libvirt] [PATCH 0/2] Couple of unrelated fixes
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (2):
utils: Return proper value for virGet{User,Group}ID
utiltest: Don't assume 'char' is always signed
src/util/virutil.c | 4 ++--
tests/utiltest.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.3.6
9 years, 11 months
[libvirt] the error is bug?
by cloudbuglist
Hi dear!
Today I came across a problem, the following is a log and software versions.
soft version:
os:centos 6.5
libvirt:0.10.29
qemu:0.12.415
2015-05-28 03:28:58.001+0000: 20919: error : qemuDomainObjBeginJobInternal:843 : Timed out during operation: cannot acquire state change lock
2015-05-28 03:30:37.000+0000: 20918: warning : qemuDomainObjBeginJobInternal:839 : Cannot start job (query, none) for domain i-2-437-VM; current job is (query, none) owned by (20917, 0)
2015-05-28 03:30:37.000+0000: 20918: error : qemuDomainObjBeginJobInternal:843 : Timed out during operation: cannot acquire state change lock
2015-05-28 03:31:01.000+0000: 20919: warning : qemuDomainObjBeginJobInternal:839 : Cannot start job (query, none) for domain i-2-437-VM; current job is (query, none) owned by (20917, 0)
2015-05-28 03:31:01.000+0000: 20919: error : qemuDomainObjBeginJobInternal:843 : Timed out during operation: cannot acquire state change lock
2015-05-28 03:32:40.000+0000: 20921: warning : qemuDomainObjBeginJobInternal:839 : Cannot start job (query, none) for domain i-2-437-VM; current job is (query, none) owned by (20917, 0)
2015-05-28 03:32:40.000+0000: 20921: error : qemuDomainObjBeginJobInternal:843 : Timed out during operation: cannot acquire state change lock
2015-05-28 03:33:06.000+0000: 20918: warning : qemuDomainObjBeginJobInternal:839 : Cannot start job (query, none) for domain i-2-437-VM; current job is (query, none) owned by (20917, 0)
2015-05-28 03:33:06.000+0000: 20918: error : qemuDomainObjBeginJobInternal:843 : Timed out during operation: cannot acquire state change lock
2015-05-28 03:33:42.009+0000: 20916: error : virNetSocketReadWire:1194 : End of file while reading data: Input/output error
2015-05-28 03:34:02.000+0000: 20921: warning : qemuDomainObjBeginJobInternal:839 : Cannot start job (query, none) for domain i-2-437-VM; current job is (query, none) owned by (20917, 0)
2015-05-28 03:34:02.000+0000: 20921: error : qemuDomainObjBeginJobInternal:843 : Timed out during operation: cannot acquire state change lock
2015-05-28 03:34:19.001+0000: 20920: warning : qemuDomainObjBeginJobInternal:839 : Cannot start job (query, none) for domain i-2-437-VM; current job is (query, none) owned by (20917, 0)
2015-05-28 03:34:19.001+0000: 20920: error : qemuDomainObjBeginJobInternal:843 : Timed out during operation: cannot acquire state change lock
2015-05-28 03:34:43.384+0000: 20916: error : virNetSocketReadWire:1194 : End of file while reading data: Input/output error
2015-05-28 03:34:47.000+0000: 20918: warning : qemuDomainObjBeginJobInternal:839 : Cannot start job (query, none) for domain i-2-437-VM; current job is (query, none) owned by (20917, 0)
2015-05-28 03:34:47.000+0000: 20918: error : qemuDomainObjBeginJobInternal:843 : Timed out during operation: cannot acquire state change lock
2015-05-28 03:34:52.000+0000: 20920: warning : qemuDomainObjBeginJobInternal:839 : Cannot start job (query, none) for domain i-2-437-VM; current job is (query, none) owned by (20917, 0)
2015-05-28 03:34:52.000+0000: 20920: error : qemuDomainObjBeginJobInternal:843 : Timed out during operation: cannot acquire state change lock
2015-05-28 03:35:09.001+0000: 20921: warning : qemuDomainObjBeginJobInternal:839 : Cannot start job (query, none) for domain i-2-437-VM; current job is (query, none) owned by (20917, 0)
2015-05-28 03:35:09.001+0000: 20921: error : qemuDomainObjBeginJobInternal:843 : Timed out during operation: cannot acquire state change lock
9 years, 11 months
[libvirt] [PATCH] util: Properly return error from virGetUserID and virGetGroupID stubs
by Peter Krempa
The stubs for the two functions that are compiled on platforms that
don't have HAVE_GETPWUID_R and friends defined do not return error but
report an error message. The calling code then assumes that the @uid or
@gid arguments were filled, which is not the case in the stubs.
---
This should fix the mingw build that complains that @theuid in one of the
callers is not initialized.
src/util/virutil.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virutil.c b/src/util/virutil.c
index e479cce..cddc78a 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -1316,7 +1316,7 @@ int virGetUserID(const char *name ATTRIBUTE_UNUSED,
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("virGetUserID is not available"));
- return 0;
+ return -1;
}
@@ -1326,7 +1326,7 @@ int virGetGroupID(const char *name ATTRIBUTE_UNUSED,
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("virGetGroupID is not available"));
- return 0;
+ return -1;
}
int
--
2.4.1
9 years, 11 months
[libvirt] [PATCH] util: process: fix build on FreeBSD
by Roman Bogorodskiy
Commit 825df8c3 refactored virProcess{Set,Get}Affinity routines,
however broke BSD implementation because of the incorrect variable
name. Fix build by using a proper variable name.
Pushing as trivial and build break fix.
---
src/util/virprocess.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index a38cb75..59598ed 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -566,7 +566,7 @@ virProcessGetAffinity(pid_t pid)
return NULL;
}
- if (!(*map = virBitmapNew(sizeof(mask) * 8)))
+ if (!(ret = virBitmapNew(sizeof(mask) * 8)))
return NULL;
for (i = 0; i < sizeof(mask) * 8; i++)
--
2.4.2
9 years, 11 months
[libvirt] bulk stats for block and cpu
by Vasiliy Tolstov
Hi. Is i remember sometimes ago someone implements bulk stats for
libvirt (cpu, block, network..?) to able to get all needed info with
one api call. But i can't find api in libvirt docs, does anybody helps
me and send link to docs, ii want to get info about block stats for
100-200 domains.
--
Vasiliy Tolstov,
e-mail: v.tolstov(a)selfip.ru
9 years, 11 months
[libvirt] ANNOUNCE: virt-manager 1.2.1 released
by Cole Robinson
I'm happy to announce the release of virt-manager 1.2.1!
virt-manager is a desktop application for managing KVM, Xen, and LXC
virtualization via libvirt.
The release can be downloaded from:
http://virt-manager.org/download/
The direct download links are:
http://virt-manager.org/download/sources/virt-manager/virt-manager-1.2.1....
This release is mostly for bug scooping up some bugfixes. Including:
- Fix connecting to older libvirt versions (Michał Kępień)
- Fix connecting to VM console with non-IP hostname (Giuseppe Scrivano)
- Fix addhardware/create wizard errors when a nodedev disappears
- Fix adding a second cdrom via customize dialog
Thanks to everyone who has contributed to this release through testing,
bug reporting, submitting patches, and otherwise sending in feedback!
Thanks,
Cole
9 years, 11 months
[libvirt] [RFC] driver's persistent connection closed event
by Nikolay Shirokovskiy
Hello.
I have a question concerning hypervisor driver "persistent connection
closed" event mechanics.
Currently the only driver that have such a connection (or at least
notify of such event) is the remote driver. Accordingly we don't
have interface for this event at driver level.
Parallels driver actually have a persistent connection. Imagine
we have a libvirt connection to parallels driver through remote driver,
if parallels internal connection is closed we can catch it in daemon
but the only option to notify remote driver of this event would
be closing of remote driver to daemon connection which will
in turn trigger connection closed event deliver to client. Thus
event will be delivered but at cost of forcedly closed connection
to daemon.
I suspect the described solution have architectural flaws so
i suggest move interface of "persistent connection closed" event
to driver level which will give us a chance to deliver this
event without side effects. We don't need to implement this
interface for most drivers and clients could handle this
well as in this case "unimplemented" would be a synonym
of "have not persistent connection". Alternatively
we could silently do nothing if driver does not support
this interface so clients would not break.
9 years, 11 months
[libvirt] [PATCH 00/10] qemu: balloon QOM-path related cleanups
by Ján Tomko
While reviewing the patch adding virtio-balloon-ccw,
I found that we are not reporting errors consistently.
This turned out to be on purpose.
This series
* moves the object path search into qemu_monitor_json
* reduces the number of allocations during search
(more a cosmetic chagne than optimization)
* moves the balloon model checking out of the monitor code
* vm->def should not be accessed without a virDomainObj lock
* this should also get rid of the errors on dommemstat with
'none' balloon reported by:
https://www.redhat.com/archives/libvir-list/2015-May/msg01110.html
* changes qemuMonitorFindBalloonObjectPath to void
to make it obvious that errors are ignored
Ján Tomko (10):
Move qemuMonitorFindObjectPath to qemu_monitor_json
Introduce qemuMonitorJSONFindLinkPath
Remove path argument from qemuMonitorJSONFindLinkPath
Add endjob label to qemuDomainMemoryStats
Invert the condition in qemuDomainMemoryStats
Only call qemuMonitorGetMemoryStats for virtio memballoon
Check for balloon model in qemuDomainSetMemoryStatsPeriod
Only call SetMemoryStatsPeriod for virtio memballoon
Do not access the domain definition in
qemuMonitorFindBalloonObjectPath
Turn qemuMonitorFindBalloonObjectPath into a void function
src/qemu/qemu_driver.c | 49 +++++++++++++-----
src/qemu/qemu_monitor.c | 116 +++++--------------------------------------
src/qemu/qemu_monitor_json.c | 92 ++++++++++++++++++++++++++++++++++
src/qemu/qemu_monitor_json.h | 3 ++
src/qemu/qemu_process.c | 4 +-
5 files changed, 146 insertions(+), 118 deletions(-)
--
2.3.6
9 years, 11 months