Extract the logic to determine which nodeset has to be used for a domain
from the formatting step so that it can be reused separately when the
nodeset is used in a different way.
---
src/conf/numatune_conf.c | 33 ++---
src/conf/numatune_conf.h | 5 +
Unlike -device, qemu uses a JSON object to add backend objects via the
monitor rather than the string that would be passed on the commandline.
To be able to reuse code parts that configure backends for various
devices, this patch adds a helper that will allow generating the command
line
This series was split out from my memory hotplug series that is not quite ready
yet. The aim of this series is to refactor the code that creates commandline
for the memory-backend-* qemu object so that it can be later reused for hotplug
via monitor. Additionally this series also fixes a bug in
Adding or reordering test cases is usually a pain due to static test
case names that are then passed to virtTestRun(). To ease the numbering
of test cases, this patch adds two simple helpers that generate the test
names according to the order they are run. The test name can be
configured via the
To be able to easily represent nodesets and other data stored in
virBitmaps in libvirt, this patch introduces a set of helpers that allow
to convert the bitmap to and from JSON value objects.
---
src/libvirt_private.syms | 2 +
src/util/virjson.c | 113
-Original Message-
From: Ján Tomko [mailto:jto...@redhat.com]
Sent: Tuesday, January 27, 2015 8:46 PM
To: Chen, Hanxiao/陈 晗霄; libvir-list@redhat.com
Subject: Re: [libvirt] [PATCHv2 1/2] storage: introduce btrfsCloneFile() for
COW
copy
On 01/23/2015 11:22 AM, Chen Hanxiao
On 21.01.2015 16:29, Matthias Gatto wrote:
Create virStorageSourceGetBackingStore function in
preparation for quorum:
Actually, if we want to get a backing store inside a virStorageSource
we have to do it manually(src-backingStore = backingStore).
The problem is that with a quorum, a
On 21.01.2015 16:29, Matthias Gatto wrote:
As explained for virStorageSourceGetBackingStore, quorum allows
multiple backing store, this make the operation to set bs complex
because we have to check if the backingStore is used as an array
or a pointer, and set it differently in both case.
In
On 21.01.2015 16:29, Matthias Gatto wrote:
As explain in the former patchs, backingStore can be treat an array or
a pointer.
If we have only one backingStore we have to use it as a normal ptr
but if there is more backing store, we use it as a pointer's array.
Because it would be complicated
On 21.01.2015 16:29, Matthias Gatto wrote:
Uniformize backing store usage by calling virStorageSourceGetBackingStore
instead of setting backing store manually.
Signed-off-by: Matthias Gatto matthias.ga...@outscale.com
---
src/conf/domain_conf.c| 7 ---
Do the allocation first, then add the actual device.
The second part should never fail. This is good
for live hotplug where we don't want to remove the device
on OOM after the monitor command succeeded.
The only change in behavior is that on failure, the
vmdef-consoles array is freed, not just
https://bugzilla.redhat.com/show_bug.cgi?id=1161024
This way the device is in vmdef only if ret = 0 and the caller
(qemuDomainAttachDeviceFlags) does not free it.
Otherwise it might get double freed by qemuProcessStop
and qemuDomainAttachDeviceFlags if the domain crashed
in monitor after we've
An alternative solution that only adds the chardev to the definition
after the command succeeded.
Ján Tomko (2):
Split qemuDomainChrInsert into two parts
hotplug: only add a chardev to vmdef after monitor call
src/conf/domain_conf.c | 18 --
src/conf/domain_conf.h | 7 ++--
On 21.01.2015 16:29, Matthias Gatto wrote:
Replace the parts of the code where a backing store is set manually
with virStorageSourceSetBackingStore
Signed-off-by: Matthias Gatto matthias.ga...@outscale.com
---
src/conf/domain_conf.c | 2 +-
src/conf/storage_conf.c | 4
Change done by commit f309db1f4d51009bad0d32e12efc75530b66836b wrongly
assumes that qemu can start with a combination of NUMA nodes specified
with the memdev option and the appropriate backends, and the legacy
way by specifying only mem as a size argument. QEMU rejects such
commandline though:
$
With the new JSON to argv formatter we are now able to represent the
memory backend definitions in the JSON object format that is reusable
for monitor use (hotplug) and then convert it into the shell string.
This will avoid having two separate instances of the same code that
would create the
QEMU's qapi visitor code allows yes/on/y for true and no/off/n for false
value of boolean properities. Unify the used style so that we can
generate it later and fix test cases.
---
src/qemu/qemu_command.c | 4 ++--
QEMU's command line visitor as well as the JSON interface take bytes by
default for memory object sizes. Convert mebibytes to bytes so that we
can later refactor the existing code for hotplug purposes.
---
src/qemu/qemu_command.c| 2 +-
On 28.01.2015 10:14, Ján Tomko wrote:
An alternative solution that only adds the chardev to the definition
after the command succeeded.
Ján Tomko (2):
Split qemuDomainChrInsert into two parts
hotplug: only add a chardev to vmdef after monitor call
src/conf/domain_conf.c | 18
On Wed, Jan 28, 2015 at 11:10 AM, Michal Privoznik mpriv...@redhat.com wrote:
On 21.01.2015 16:29, Matthias Gatto wrote:
As explain in the former patchs, backingStore can be treat an array or
a pointer.
If we have only one backingStore we have to use it as a normal ptr
but if there is more
To allow constructing of value objects stepwise explode the helper into
separate steps and allow appending into existing value objects.
---
src/libvirt_private.syms | 2 ++
src/util/virjson.c | 74 +++-
src/util/virjson.h | 5
3 files
This helper easies iterating all key=value pairs stored in a JSON
object. Usually we pick only certain known keys from a JSON object, but
this will allow to walk complete objects and have the callback act on
those.
---
src/libvirt_private.syms | 1 +
src/util/virjson.c | 33
Move the alias as the second formated argument and tweak the tests so
that a future refactor that will change the order doesn't break tests.
---
src/qemu/qemu_command.c| 9 -
.../qemuxml2argvdata/qemuxml2argv-hugepages-pages.args | 16
Extract the memory backend device code into a separate function so that
it can be later easily refactored and reused.
Few small changes for future reusability, namely:
- new (currently unused) parameter for user specified page size
- size of the memory is specified in kibibytes, divided up in the
On 28.01.2015 10:14, Ján Tomko wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1161024
This way the device is in vmdef only if ret = 0 and the caller
(qemuDomainAttachDeviceFlags) does not free it.
Otherwise it might get double freed by qemuProcessStop
and qemuDomainAttachDeviceFlags
Hi.
First and foremost, this series fixes a few mistakes in the wrapping
code found by inspecting the org.libvirt.jna.Libvirt interface and the
corresponding C types of the XML API file.
The last two patches add two missing functions introduced in libvirt
0.6.1.
At the end of the day, this
Change the prototypes of the JNA library interface in order to take
advantage of the CString class.
This removes a fair amount of code in the org.libvirt.Library class
and puts the decoding of C string data into a single place.
---
src/main/java/org/libvirt/Connect.java | 20 +++---
On 01/29/2015 12:25 AM, Michal Privoznik wrote:
On 20.01.2015 10:04, Luyao Huang wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1183890
When we try to update a xml to a image file, we will clear the
graphics passwd settings, because we do not pass VIR_DOMAIN_XML_SECURE
to
This wraps the native virDomainGetSecurityLabel libvirt function available
since version 0.6.1.
---
src/main/java/org/libvirt/Domain.java| 18 ++
src/main/java/org/libvirt/SecurityLabel.java | 49
src/main/java/org/libvirt/jna/Libvirt.java | 24
Make use of the CString class introduced recently and get rid of some
boilerplate code required to release memory at the calling side.
---
src/main/java/org/libvirt/Connect.java| 22 +++---
src/main/java/org/libvirt/Domain.java | 33 +++
---
src/main/java/org/libvirt/Connect.java | 15 +++
src/main/java/org/libvirt/SecurityModel.java | 37
src/main/java/org/libvirt/jna/Libvirt.java | 16 +++-
3 files changed, 67 insertions(+), 1 deletion(-)
create mode 100644
Some libvirt functions were wrapped using a Java String as return
type, although they return a char*. That means the memory allocated
by libvirt for those strings is never freed because JNA assumes a
const char*.
Start to refactor the String handling by using a type-safe Pointer for
C Strings,
The functions virEventUpdateTimeout and virConnResetLastError have no
return value, they return void. In Java they had been mistakenly
wrapped as returning int.
---
src/main/java/org/libvirt/jna/Libvirt.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
On 22.01.2015 20:20, John Ferlan wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1138516
v1: http://www.redhat.com/archives/libvir-list/2015-January/msg00465.html
In my previous attempt to resolve the issue, I created a stateDir and
saved the volume XML for each pool in order to attempt
Lots of details here:
https://bugzilla.redhat.com/show_bug.cgi?id=1158034
During my investigation I uncovered some other issues which are covered
by the first 4 patches. The issues are error path related.
The first two patches could be combined, but for now they're apart so
that it's proveable
In the event we're falling into the code that tries to create the file
in a forked environment (VIR_FILE_OPEN_FORK) we pass different mode bits,
but those are never set because the virFileOpenForceOwnerMode has a check
if the OPEN_FORCE_MODE bit is set before attempting to change the mode.
Since
If we're expecting to create a file somewhere and that fails for some
reason during qemuOpenFileAs, then we unlink the path we're attempting
to create leaving no way to determine what the existing privileges,
protections, or labels are that caused the failure (open, change owner
and group, change
https://bugzilla.redhat.com/show_bug.cgi?id=1158034
In qemuOpenFileAs if we fall into the path where we'll be opening / creating
the file using VIR_FILE_OPEN_FORK, we need to first unlink/delete the file
we created in the first path; otherwise, the attempt by the child process
to open as some
If we get to endjob: because of some error earlier such as perhaps
failure from qemuDomainSaveMemory to open/create the save file and
the attempt to restart the CPU's fails, then we get the error from
that restart attempt displayed to the user rather than the error
from the failed attempt to
Rather than have a dummy waitpid loop and return of the failure status
from recvfd, adjust the logic to save the recvfd error fd and then
in priority order:
if waitpid failed, use that
if waitpid succeeded, but the child reported failure, use that
regardless of recvfd status
if waitpid succeeded
A gnulib change (commit id 'beae0bdc') causes ENOTCONN to be returned
from recvfd which causes us to fall into the throwaway waitpid() call
and return ENOTCONN to the caller, this then gets displayed during
a 'virsh save' when using a root squashed NFS environment that's trying
to save the file as
Commit id '540c339a' to fix issues with reference counting and transient
domains moved the qemuDomainObjEndAsyncJob call prior to the attempt to
restart the guest CPU's resulting in an error:
error: Failed to save domain rhel70 to /tmp/pl/rhel70.save
error: internal error: unexpected
--live and --config can't be specified together when querying the
configuration, but are valid when setting. The man page was hinting that
they are valid always.
---
tools/virsh.pod | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index
On 20.01.2015 10:04, Luyao Huang wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1183890
When we try to update a xml to a image file, we will clear the
graphics passwd settings, because we do not pass VIR_DOMAIN_XML_SECURE
to qemuDomainDefCopy, qemuDomainDefFormatBuf won't format the
Commit 55ea7be7 removed separated modules for vbox_network and
vbox_storage drivers but forget to update libvirt.spec.in file. This
patch will fix rpm build.
Signed-off-by: Pavel Hrdina phrd...@redhat.com
---
Pushed under trivial rule.
libvirt.spec.in | 2 --
1 file changed, 2 deletions(-)
On 01/26/2015 10:39 AM, Peter Krempa wrote:
After virBitmapEqual is able to compare NULL bitmaps few bits of code
can be cleaned up.
---
Version 2 cleans up code paths that would do a duplicate check now.
src/conf/domain_conf.c | 40 ++--
There are some interface types (notably 'server' and 'client')
which instead of allowing the default set of elements and
attributes (like the rest do), try to enumerate only the elements
they know of. This way it's, however, easy to miss something. For
instance, the address/ element was not
47 matches
Mail list logo