Re: [libvirt] [PATCH] storage: Disallow wiping an extended disk partition

2015-06-15 Thread Michal Privoznik
On 10.06.2015 00:19, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1225694 Check if the disk partition to be wiped is the extended partition, if so then disallow it. Do this via changing the wipeVol backend to check the volume before passing to the common

Re: [libvirt] [PATCH] scsi: Adjust return status from getBlockDevice

2015-06-15 Thread Michal Privoznik
On 12.06.2015 13:22, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1224233 Currently it's not possible to determine the difference between a fatal memory allocation or failure to open/read the directory error with a perhaps less fatal, I didn't find the block device in the

Re: [libvirt] [PATCH] storage: Disallow wiping an extended disk partition

2015-06-15 Thread John Ferlan
On 06/15/2015 06:12 AM, Michal Privoznik wrote: On 10.06.2015 00:19, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1225694 Check if the disk partition to be wiped is the extended partition, if so then disallow it. Do this via changing the wipeVol backend to check the

Re: [libvirt] [PATCH] qemu caps: spell queue

2015-06-15 Thread Michal Privoznik
On 15.06.2015 10:58, Daniel P. Berrange wrote: On Mon, Jun 15, 2015 at 10:49:06AM +0200, Ján Tomko wrote: --- src/qemu/qemu_capabilities.c | 4 ++-- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 2 +- tests/qemuxml2argvtest.c | 2 +- 4 files changed, 5

Re: [libvirt] [PATCH] qemu: Do not support 'serial' scsi-block 'lun' devices

2015-06-15 Thread Michal Privoznik
On 09.06.2015 22:54, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1021480 Seems the property has been deprecated for qemu, although seemingly ignored. This patch enforces from a libvirt perspective that a scsi-block 'lun' device should not provide the 'serial' property.

Re: [libvirt] [PATCH] qemu: fix cannot attach a virtio channel

2015-06-15 Thread lhuang
On 06/15/2015 04:25 PM, Ján Tomko wrote: I'd rather be more specific in the commit summary, e.g.: fix address allocation on chardev hotplug good summary, thanks for you help On Wed, Jun 10, 2015 at 10:49:37PM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1230039

Re: [libvirt] [PATCH] configure: Remove check for pkcheck_supports_uid

2015-06-15 Thread Martin Kletzander
On Fri, Jun 05, 2015 at 01:01:34PM +0200, Guido Günther wrote: We're using Polkit's DBus API so no need to check wether this feature is supported. We don't use the result or the path to the pkcheck program anywhere. --- configure.ac | 9 - 1 file changed, 9 deletions(-) ACK, this is

Re: [libvirt] [PATCH] qemu caps: spell queue

2015-06-15 Thread Daniel P. Berrange
On Mon, Jun 15, 2015 at 10:49:06AM +0200, Ján Tomko wrote: --- src/qemu/qemu_capabilities.c | 4 ++-- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 2 +- tests/qemuxml2argvtest.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git

Re: [libvirt] [PATCH] virfile: Report useful error fork approach to create NFS mount point fails

2015-06-15 Thread Ján Tomko
On Thu, Jun 11, 2015 at 11:15:17AM +0200, Erik Skultety wrote: Commit 92d9114e tweaked the way we handle child errors when using fork approach to set specific permissions. The same logic should be used to create directories with specified permissions as well, otherwise the parent process

[libvirt] [PATCH] qemu caps: spell queue

2015-06-15 Thread Ján Tomko
--- src/qemu/qemu_capabilities.c | 4 ++-- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 2 +- tests/qemuxml2argvtest.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt] [PATCH 3/3] scsi: Adjust return status from getBlockDevice

2015-06-15 Thread Michal Privoznik
From: John Ferlan jfer...@redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1224233 Currently it's not possible to determine the difference between a fatal memory allocation or failure to open/read the directory error with a perhaps less fatal, I didn't find the block device in the

[libvirt] [PATCH 2/3] getOldStyleBlockDevice: Adjust formatting

2015-06-15 Thread Michal Privoznik
Instead of initializing return value to zero (success) and overwriting it on every failure just before the control jumps onto 'out' label, let's initialize to an error value and set to zero only when we are sure about the success. Just follow the pattern we have in the rest of the code.

[libvirt] [PATCH 0/3] Couple of storage_backend_scsi.c fixes

2015-06-15 Thread Michal Privoznik
As promised here [1] I'm proposing my own patch to fix the problem referenced here [2]. 1: https://www.redhat.com/archives/libvir-list/2015-June/msg00621.html 2: https://www.redhat.com/archives/libvir-list/2015-June/msg00567.html John Ferlan (1): scsi: Adjust return status from

Re: [libvirt] [PATCH v2] storage: Need to set secrettype for direct iscsi disk volume

2015-06-15 Thread Michal Privoznik
On 09.06.2015 18:03, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1200206 Commit id '1b4eaa61' added the ability to have a mode='direct' for an iscsi disk volume. It relied on virStorageTranslateDiskSourcePool in order to copy any disk source pool authentication

Re: [libvirt] [PATCH v2] storage: Need to set secrettype for direct iscsi disk volume

2015-06-15 Thread John Ferlan
On 06/15/2015 05:44 AM, Michal Privoznik wrote: On 09.06.2015 18:03, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1200206 Commit id '1b4eaa61' added the ability to have a mode='direct' for an iscsi disk volume. It relied on virStorageTranslateDiskSourcePool in order to

[libvirt] [PATCH 1/3] getNewStyleBlockDevice: Adjust formatting

2015-06-15 Thread Michal Privoznik
Instead of initializing return value to zero (success) and overwriting it on every failure just before the control jumps onto 'out' label, let's initialize to an error value and set to zero only when we are sure about the success. Just follow the pattern we have in the rest of the code.

Re: [libvirt] [PATCH 0/3] Couple of storage_backend_scsi.c fixes

2015-06-15 Thread John Ferlan
On 06/15/2015 07:24 AM, Michal Privoznik wrote: As promised here [1] I'm proposing my own patch to fix the problem referenced here [2]. 1: https://www.redhat.com/archives/libvir-list/2015-June/msg00621.html 2: https://www.redhat.com/archives/libvir-list/2015-June/msg00567.html John

[libvirt] [sandbox PATCH 4/4] Add host-image format parameter

2015-06-15 Thread Cédric Bosdonnat
Let the user specify the format of the source disk image in host-image mounts. This will allow us to mount other image types than raw ones. --- .../libvirt-sandbox-builder-container.c| 4 + libvirt-sandbox/libvirt-sandbox-builder-machine.c | 9 +++

Re: [libvirt] Libvirt bite sized tasks

2015-06-15 Thread Dan Mossor
On 06/15/2015 02:59 AM, Michal Privoznik wrote: Dear lists, I've just started new wiki page which aim is to summarize small and trivial tasks, that starting contributors can take, investigate and implement. The aim is to give them something easy to start with while not scaring them out about

[libvirt] [sandbox PATCH 1/4] Make sure the sandbox state dir and config can be accessed

2015-06-15 Thread Cédric Bosdonnat
When running a KVM sandbox as root, the qemu process will run as another user (likely qemu). We need to make sure this user can access the vmlinux and initrd.img, sandbox.cfg and mounts.cfg files. --- libvirt-sandbox/libvirt-sandbox-config.c | 2 +-

[libvirt] [sandbox PATCH 0/4] Getting qemu sandboxes run as root + host-image format

2015-06-15 Thread Cédric Bosdonnat
Hi all, Here are a few patches to make sandboxes run with qemu:///system connection. The last one is just a new feature to allow using somethings else than RAW images in host-image mounts. This feature will later be needed to run docker container using Eren's work. Cédric Bosdonnat (4): Make

[libvirt] [PATCH] qemu:lxc:xml:libxl:xen: improve the error in openconsole/channel

2015-06-15 Thread Luyao Huang
We allow do not pass the dev_name to openconsole() and openchannel() function, but the error message is not good when we do not specified the console/channel name. the error message after this patch: error: internal error: character device serial0 is not using a PTY Signed-off-by: Luyao Huang

[libvirt] [PATCH] man: clarify usage of virsh blockcopy with --xml

2015-06-15 Thread Ján Tomko
The --xml option is mandatory if an XML description is used. Otherwise the third parameter is treated as the destination. https://bugzilla.redhat.com/show_bug.cgi?id=1206406#c3 --- tools/virsh.pod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh.pod

[libvirt] [sandbox PATCH 2/4] Write /dev/vd* instead of vd* in mounts.cfg

2015-06-15 Thread Cédric Bosdonnat
Fixes a regression introduced by d74b4350: the init-qemu tool expects /dev/vd* sources to create the block device, while we were just having vd*. Write again /dev/vd* to mounts.cfg. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[libvirt] [sandbox PATCH 3/4] qemu: mount all host-images as ext4

2015-06-15 Thread Cédric Bosdonnat
To avoid troubles when mounting ext4 images, hard-code ext4 as mount format instead of ext3. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c

[libvirt] [PATCH 1/4] build: Remove unnecessarily repeated rules for syms - def

2015-06-15 Thread Martin Kletzander
Suggested-by: Michal Prívozník mpriv...@redhat.com Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/Makefile.am | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 0d1f58b98022..a9ebb07b1d32 100644 ---

[libvirt] [PATCH 0/4] Various cleanups

2015-06-15 Thread Martin Kletzander
*** BLURB HERE *** Martin Kletzander (4): build: Remove unnecessarily repeated rules for syms - def rpc: Fix possible crash when MDNSAddEntry fails Generate JSON with mDNS entries only when built --with-avahi tests: Use libvirt properly with initialization and error dispatching

Re: [libvirt] [RFC PATCHv2 2/8] threshold: expose new API in virsh

2015-06-15 Thread Peter Krempa
On Fri, Jun 12, 2015 at 13:29:26 -0600, Eric Blake wrote: Add a new 'virsh domblkthreshold' command to use the new API. * tools/virsh.pod (domblkthreshold): Document it. * tools/virsh-domain-monitor.c (cmdDomblkthreshold): New function. (domMonitoringCmds): Register it. Signed-off-by:

Re: [libvirt] [RFC PATCHv2 5/8] threshold: add qemu capability bit

2015-06-15 Thread Peter Krempa
On Fri, Jun 12, 2015 at 13:29:29 -0600, Eric Blake wrote: Track whether qemu is new enough to do block thresholds on the active layer. The plan is that even if qemu is too old, the event handler can still be registered, but will never fire (since Well the event handler can be registered, but

Re: [libvirt] [PATCH] qemu: emulatorpin: Don't reset pinning when pinning to all cpus

2015-06-15 Thread Michal Privoznik
On 12.06.2015 15:57, Peter Krempa wrote: Similarly to 3813b648e9761aeed5b4f3ee7e62253a9172ce8e remove the default pinning assumption from emulatorpin. There's no such commit. Were you referring to a commit on your local branch perhaps? Resolves:

Re: [libvirt] [RFC PATCHv2 1/8] threshold: new API virDomainBlockSetWriteThreshold

2015-06-15 Thread Peter Krempa
On Fri, Jun 12, 2015 at 13:29:25 -0600, Eric Blake wrote: qemu 2.3 added a new QMP command block-set-write-threshold, which allows callers to get an interrupt when a file hits a write threshold, rather than the current approach of repeatedly polling for file allocation. This patch prepares

[libvirt] [glib PATCH] domain config: add API to set the filesystem image format

2015-06-15 Thread Cédric Bosdonnat
Add the gvir_config_domain_filesys_set_driver_format function to allow setting nbd driver type + image format for containers filesystems. --- libvirt-gconfig/libvirt-gconfig-domain-filesys.c | 30 +++- libvirt-gconfig/libvirt-gconfig-domain-filesys.h | 4

Re: [libvirt] [PATCH] man: clarify usage of virsh blockcopy with --xml

2015-06-15 Thread Peter Krempa
On Mon, Jun 15, 2015 at 14:09:44 +0200, Ján Tomko wrote: The --xml option is mandatory if an XML description is used. Otherwise the third parameter is treated as the destination. https://bugzilla.redhat.com/show_bug.cgi?id=1206406#c3 --- tools/virsh.pod | 4 ++-- 1 file changed, 2

[libvirt] [PATCHv3] qemu: add a check for slot and base when build dimm address

2015-06-15 Thread Luyao Huang
When hot-plug a memory device, we don't check if there is a memory device have the same address with the memory device we want hot-pluged. Qemu forbid use/hot-plug 2 memory device with same slot or the same base(qemu side this elemnt named addr). Introduce a address check when build memory device

[libvirt] [PATCH 3/4] Generate JSON with mDNS entries only when built --with-avahi

2015-06-15 Thread Martin Kletzander
One string was already used only if that condition was true, second one is added now. Both are used in a nicer way. Signed-off-by: Martin Kletzander mklet...@redhat.com --- tests/virnetservertest.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git

[libvirt] [PATCH 2/4] rpc: Fix possible crash when MDNSAddEntry fails

2015-06-15 Thread Martin Kletzander
If virNetServerMDNSAddEntry() fails when adding a service to a server, it doesn't decrease the number of services. Hence access to their members segfaults (e.g. when free()-ing the sruct). Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/rpc/virnetserver.c | 4 +++- 1 file changed,

[libvirt] [PATCH 4/4] tests: Use libvirt properly with initialization and error dispatching

2015-06-15 Thread Martin Kletzander
We were using complicated error printing in virnetservertest even though we could've just dispatched the error. Also add some good practices that might come in handy (the code may fail without proper initialization and event loop). Signed-off-by: Martin Kletzander mklet...@redhat.com ---

Re: [libvirt] [PATCH] add more domain memory functions

2015-06-15 Thread Michal Privoznik
On 12.06.2015 14:40, Vasiliy Tolstov wrote: * libvirt_domain_set_max_memory * libvirt_domain_set_memory * libvirt_domain_set_memory_flags Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru --- src/libvirt-php.c | 75 ++-

Re: [libvirt] [PATCH 0/4] Various cleanups

2015-06-15 Thread Ján Tomko
On Mon, Jun 15, 2015 at 03:08:38PM +0200, Martin Kletzander wrote: *** BLURB HERE *** Martin Kletzander (4): build: Remove unnecessarily repeated rules for syms - def rpc: Fix possible crash when MDNSAddEntry fails Generate JSON with mDNS entries only when built --with-avahi tests:

Re: [libvirt] [glib PATCH] domain config: add API to set the filesystem image format

2015-06-15 Thread Cedric Bosdonnat
On Mon, 2015-06-15 at 17:12 +0200, Christophe Fergeau wrote: Hey, On Mon, Jun 15, 2015 at 03:37:12PM +0200, Cédric Bosdonnat wrote: Add the gvir_config_domain_filesys_set_driver_format function to allow setting nbd driver type + image format for containers filesystems. ---

Re: [libvirt] [glib PATCH] domain config: add API to set the filesystem image format

2015-06-15 Thread Christophe Fergeau
On Mon, Jun 15, 2015 at 05:36:49PM +0200, Cedric Bosdonnat wrote: On Mon, 2015-06-15 at 17:12 +0200, Christophe Fergeau wrote: I haven't looked if there are other similar situations in libvirt-gconfig, but silently overwriting a preexisting type attribute with something different when

Re: [libvirt] [libvirt-php][PATCH 00/10] Couple of PHP fixes

2015-06-15 Thread Michal Privoznik
On 10.06.2015 11:29, Vasiliy Tolstov wrote: 2015-06-10 12:23 GMT+03:00 Michal Privoznik mpriv...@redhat.com: Ping? No php knowledge is required to review these patches. They are merely Makefile and configure.ac cleanups. Michal Michal Novotny says that he busy now and you can

Re: [libvirt] Libvirt bite sized tasks

2015-06-15 Thread Michal Privoznik
On 15.06.2015 15:37, Dan Mossor wrote: On 06/15/2015 02:59 AM, Michal Privoznik wrote: Dear lists, I've just started new wiki page which aim is to summarize small and trivial tasks, that starting contributors can take, investigate and implement. The aim is to give them something easy to

Re: [libvirt] [PATCH] qemu: emulatorpin: Don't reset pinning when pinning to all cpus

2015-06-15 Thread Peter Krempa
On Mon, Jun 15, 2015 at 16:04:29 +0200, Michal Privoznik wrote: On 12.06.2015 15:57, Peter Krempa wrote: Similarly to 3813b648e9761aeed5b4f3ee7e62253a9172ce8e remove the default pinning assumption from emulatorpin. There's no such commit. Were you referring to a commit on your local

Re: [libvirt] [glib PATCH] domain config: add API to set the filesystem image format

2015-06-15 Thread Christophe Fergeau
Hey, On Mon, Jun 15, 2015 at 03:37:12PM +0200, Cédric Bosdonnat wrote: Add the gvir_config_domain_filesys_set_driver_format function to allow setting nbd driver type + image format for containers filesystems. --- libvirt-gconfig/libvirt-gconfig-domain-filesys.c | 30

Re: [libvirt] [PATCH v2 1/1] qemu: monitor: Add memory balloon support for virtio-ccw

2015-06-15 Thread Ján Tomko
On Wed, Jun 10, 2015 at 09:02:36AM +0200, Boris Fiuczynski wrote: The search for the memory balloon driver object is extended by a second known name virtio-balloon-ccw in support for virtio-ccw. Signed-off-by: Boris Fiuczynski fiu...@linux.vnet.ibm.com Reviewed-by: Daniel Hansel

Re: [libvirt] [PATCH] Fix virsh edit and virt-xml-validate with SCSI LUN

2015-06-15 Thread Eric Farman
On 06/15/2015 05:03 PM, John Ferlan wrote: Something I didn't catch on pass1, but perhaps an important distinction title: Resolve issues with SCSI LUN hostdev device addressing Sounds good! I'll work that into the split patches. Coincidentally - there's a bz regarding the address

[libvirt] [PATCH libvirt-python] virPyDictToTypedParams: packing lists of values

2015-06-15 Thread Pavel Boldin
Pack a list or a tuple of values passed to a Python method to the multi-value parameter. --- libvirt-override.c | 228 ++--- 1 file changed, 129 insertions(+), 99 deletions(-) diff --git a/libvirt-override.c b/libvirt-override.c index

Re: [libvirt] [PATCHv3] qemu: add a check for slot and base when build dimm address

2015-06-15 Thread lhuang
On 06/16/2015 08:27 AM, zhang bo wrote: On 2015/6/15 20:33, Luyao Huang wrote: When hot-plug a memory device, we don't check if there is a memory device have the same address with the memory device we want hot-pluged. Qemu forbid use/hot-plug 2 memory device with same slot or the same

Re: [libvirt] [RFC PATCHv2 5/8] threshold: add qemu capability bit

2015-06-15 Thread Eric Blake
On 06/15/2015 07:33 AM, Peter Krempa wrote: On Fri, Jun 12, 2015 at 13:29:29 -0600, Eric Blake wrote: Track whether qemu is new enough to do block thresholds on the active layer. The plan is that even if qemu is too old, the event handler can still be registered, but will never fire (since

Re: [libvirt] [PATCH 0/2] Adjust netfs CIFS/Samba formatting

2015-06-15 Thread John Ferlan
On 06/03/2015 01:06 PM, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1186969 The first patch follows a previous change to fix/adjust the gluster specific rng formatting The second patch resolves the particular issue ensuring to generate the source path with the //%s/%s

Re: [libvirt] [PATCH 0/2] Fix a couple issues found with disk backend

2015-06-15 Thread John Ferlan
On 06/08/2015 08:25 AM, John Ferlan wrote: Validation of https://bugzilla.redhat.com/show_bug.cgi?id=1181062 raised a couple of questions about XML format and the defaults - these patches address those questions. John Ferlan (2): docs: Adjust Disk storage rng storage: Force setting

Re: [libvirt] [PATCH v2] storage: Need to set secrettype for direct iscsi disk volume

2015-06-15 Thread John Ferlan
... +/* Shared processing code with storage pools can leave + * this empty, but disk formatting uses it as does command + * creation - so use the secretType to attempt to fill it in. + */ +if

Re: [libvirt] [PATCH] Fix virsh edit and virt-xml-validate with SCSI LUN

2015-06-15 Thread Eric Farman
On 06/12/2015 04:49 PM, John Ferlan wrote: On 06/10/2015 11:22 AM, Eric Farman wrote: Defining a domain with a SCSI disk attached via a hostdev tag and a source address unit value longer than two digits causes an error when editing the domain with virsh edit, even if no changes are made to

[libvirt] Publishing a Python libvirt Howto/Reference Guide

2015-06-15 Thread David Ashley
All - I represent the Fedora Docs Team. We are interested in publishing a Python libvirt HowTo/Reference Guide for users. We feel that there is a gap with using virtualization from a scripting environment. While virsh fills this gap for simple scripting purposes, a more powerful scripting

Re: [libvirt] [RFC PATCHv2 2/8] threshold: expose new API in virsh

2015-06-15 Thread Eric Blake
On 06/15/2015 07:29 AM, Peter Krempa wrote: On Fri, Jun 12, 2015 at 13:29:26 -0600, Eric Blake wrote: Add a new 'virsh domblkthreshold' command to use the new API. * tools/virsh.pod (domblkthreshold): Document it. * tools/virsh-domain-monitor.c (cmdDomblkthreshold): New function.

Re: [libvirt] [PATCH] configure: Remove check for pkcheck_supports_uid

2015-06-15 Thread Guido Günther
On Mon, Jun 15, 2015 at 11:33:58AM +0200, Martin Kletzander wrote: On Fri, Jun 05, 2015 at 01:01:34PM +0200, Guido Günther wrote: We're using Polkit's DBus API so no need to check wether this feature is supported. We don't use the result or the path to the pkcheck program anywhere. ---

Re: [libvirt] [PATCH/RFC] Add missing delta from Ubuntu to apparmor profiles

2015-06-15 Thread intrigeri
Hi, Stefan Bader wrote (20 May 2015 10:11:45 GMT) : Hm was there not something which I was waiting for feedback from you? My (possibly incomplete) records say that I've tested the latest proposed patch set back in February (85iof8v6j5@boum.org). Since I lost most context by now, I will

Re: [libvirt] [RFC PATCHv2 1/8] threshold: new API virDomainBlockSetWriteThreshold

2015-06-15 Thread Eric Blake
On 06/15/2015 07:19 AM, Peter Krempa wrote: On Fri, Jun 12, 2015 at 13:29:25 -0600, Eric Blake wrote: qemu 2.3 added a new QMP command block-set-write-threshold, which allows callers to get an interrupt when a file hits a write threshold, rather than the current approach of repeatedly polling

Re: [libvirt] [PATCH] conf: Fix virDomainObjGetDefs when getting persistent config on a live vm

2015-06-15 Thread Peter Krempa
On Fri, Jun 12, 2015 at 14:41:03 +0200, Peter Krempa wrote: If @flags contains only VIR_DOMAIN_AFFECT_CONFIG and @vm is active, the function would return the active config rather than the persistent one that it should return. This happened due to the fact that virDomainObjGetDefs was checking

Re: [libvirt] Libvirt bite sized tasks

2015-06-15 Thread Dan Mossor
On 06/15/2015 10:11 AM, Michal Privoznik wrote: On 15.06.2015 15:37, Dan Mossor wrote: On 06/15/2015 02:59 AM, Michal Privoznik wrote: Dear lists, I've just started new wiki page which aim is to summarize small and trivial tasks, that starting contributors can take, investigate and implement.

[libvirt] [PATCH 04/13] qemu: Simplify qemuDomainGetNumaParameters by using virDomainObjGetOneDef

2015-06-15 Thread Peter Krempa
--- src/qemu/qemu_driver.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index dde94e8..e8b2be3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10277,36 +10277,24 @@

[libvirt] [PATCH 02/13] conf: Introduce helper to help getting correct def for getter functions

2015-06-15 Thread Peter Krempa
virDomainObjGetOneDef will help to retrieve the correct definition pointer from @vm in cases where VIR_DOMAIN_AFFECT_LIVE and VIR_DOMAIN_AFFECT_CONFIG are mutually exclusive. The function simply returns the correct pointer. This similarly to virDomainObjGetDefs will greatly simplify the code. ---

[libvirt] [PATCH 06/13] qemu: Simplify qemuDomainGetEmulatorPinInfo by using virDomainObjGetOneDef

2015-06-15 Thread Peter Krempa
virDomainObjGetOneDef is simpler to use than virDomainObjGetDefs --- src/qemu/qemu_driver.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f3c53f5..c878409 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCHv2 01/13] conf: Fix virDomainObjGetDefs when getting persistent config on a live vm

2015-06-15 Thread Peter Krempa
If @flags contains only VIR_DOMAIN_AFFECT_CONFIG and @vm is active, the function would return the active config rather than the persistent one that it should return. This happened due to the fact that virDomainObjGetDefs was checking the updated flags which may not contain VIR_DOMAIN_AFFECT_LIVE

[libvirt] [PATCH 12/13] qemu: 'privileged' flag is not really configuration

2015-06-15 Thread Peter Krempa
The privileged flag will not change while the configuration might change. Make the 'privileged' flag member of the driver again and mark it immutable. Should that ever change add an accessor that will group reads of the state. --- src/qemu/qemu_cgroup.c | 13 -

[libvirt] [PATCH 00/13] vCPU pinning and related refactors - Part 1.5

2015-06-15 Thread Peter Krempa
Few more fixes to the Part 1 and related stuff. This is a continuation and fix to stuff done in Part 1. Peter Krempa (13): conf: Fix virDomainObjGetDefs when getting persistent config on a live vm conf: Introduce helper to help getting correct def for getter functions qemu: Simplify

[libvirt] [PATCH 11/13] qemu: Reuse virDomainObjGetDefs in qemuDomainGetMemoryParameters

2015-06-15 Thread Peter Krempa
Simplify the code by restructuring control flow and reusing the better helper. --- src/qemu/qemu_driver.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f13e243..e09bb70 100644 ---

[libvirt] [PATCH 13/13] conf: Move vcpu info parsing code into a separate function

2015-06-15 Thread Peter Krempa
--- src/conf/domain_conf.c | 132 - 1 file changed, 76 insertions(+), 56 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 35e1cb4..454d6cb 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14082,6

[libvirt] [PATCH] conf: Adjust invalid secrettype setting during parse

2015-06-15 Thread John Ferlan
Commit id '1feaccf0' attempted to handle an empty secrettype value; however, it made a mistake by processing the secretType as if it was the original secrettype string. The 'secretType' is actually whether 'usage' or 'uuid' was used. Thus adjust part of the change to make the same check for

Re: [libvirt] [PATCH 1/2] storage: Fix the schema and add tests for cifs pool

2015-06-15 Thread Peter Krempa
On Wed, Jun 03, 2015 at 13:06:57 -0400, John Ferlan wrote: Commit id '887dd362' added support for a netfs pool format type 'cifs' and 'gluster' in order to add rng support for Samba and glusterfs netfs pools. Originally, the CIFS type support was added as part of commit id '61fb6979'.

Re: [libvirt] [PATCH 2/2] storage: Generate correct parameters for CIFS

2015-06-15 Thread Peter Krempa
On Wed, Jun 03, 2015 at 13:06:58 -0400, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1186969 When generating the path to the dir for a CIFS/Samba driver, the code would generate a source path for the mount using %s:%s while the mount.cifs expects to see //%s/%s. So check

[libvirt] [PATCH 0/4] parallels: Implementation of attach/detach network devices and small network fixes

2015-06-15 Thread Mikhail Feoktistov
Mikhail Feoktistov (4): parallels: Fix initialization of buflen variable in each loop iteration parallels: Fix false error messages in libvirt log parallels: Switch on DHCP for newly created network adapters parallels: implementation of attach/detach network devices -- libvir-list

[libvirt] [PATCH 3/4] parallels: Switch on DHCP for newly created network adapters

2015-06-15 Thread Mikhail Feoktistov
Let network adapter use DHCP server to get network configuration. To do this we use PrlVmDevNet_SetConfigureWithDhcp to enable it and PrlVmDevNet_SetAutoApply to makes necessary settings within guest OS In linux case it creates network startup scripts /etc/sysconfig/network-scripts/ifcfg-ethN and

[libvirt] [PATCH 4/4] parallels: implementation of attach/detach network devices

2015-06-15 Thread Mikhail Feoktistov
In this patch we add VIR_DOMAIN_DEVICE_NET handlers implementation for domainAttachDevice and domainDetachDevice callbacks. As soon as we don't support this operation for hypervisor type domains, we implement this functionality for containers only. In detach procedure we find network device by

[libvirt] [PATCH 2/4] parallels: Fix false error messages in libvirt log

2015-06-15 Thread Mikhail Feoktistov
There was many errors in libvirt.log caused by prlsdkDelNet function because job variable was always initialized as PRL_INVALID_HANDLE In this patch job variable gets return value of PrlSrv_DeleteVirtualNetwork function() --- src/parallels/parallels_sdk.c |2 +- 1 files changed, 1

[libvirt] [PATCH 1/4] parallels: Fix initialization of buflen variable in each loop iteration

2015-06-15 Thread Mikhail Feoktistov
We need to initialize buflen every time when we get network adapter's friendly name because we call PrlVmDev_GetFriendlyName in a loop --- src/parallels/parallels_sdk.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/parallels/parallels_sdk.c

[libvirt] [PATCH 08/13] qemu: Simplify qemuDomainSetInterfaceParameters by using virDomainObjGetDefs

2015-06-15 Thread Peter Krempa
--- src/qemu/qemu_driver.c | 40 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2cb0215..ceadc31 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -11246,12 +11246,12

[libvirt] [PATCH 10/13] qemu: Refactor qemuDomainGetMemoryParameters

2015-06-15 Thread Peter Krempa
Replace the for loops with case inside with temp variables and a macro. --- src/qemu/qemu_driver.c | 99 +- 1 file changed, 25 insertions(+), 74 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ca04d2c..f13e243 100644

[libvirt] [PATCH 03/13] qemu: Simplify qemuDomainGetInterfaceParameters by using virDomainObjGetOneDef

2015-06-15 Thread Peter Krempa
--- src/qemu/qemu_driver.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d1f195c..dde94e8 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -11468,32 +11468,23 @@

[libvirt] [PATCH 09/13] qemu: Refactor qemuDomainSetNumaParameters

2015-06-15 Thread Peter Krempa
Use virDomainObjGetDefs and sanitize the control flow. --- src/qemu/qemu_driver.c | 64 ++ 1 file changed, 28 insertions(+), 36 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ceadc31..ca04d2c 100644 ---

[libvirt] [PATCH 07/13] qemu: Simplify qemuDomainGetVcpusFlags by using virDomainObjGetOneDef

2015-06-15 Thread Peter Krempa
virDomainObjGetOneDef is simpler to use than virDomainObjGetDefs --- src/qemu/qemu_driver.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c878409..2cb0215 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH 05/13] qemu: Simplify qemuDomainGetVcpuPinInfo by using virDomainObjGetOneDef

2015-06-15 Thread Peter Krempa
virDomainObjGetOneDef is simpler to use than virDomainObjGetDefs --- src/qemu/qemu_driver.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e8b2be3..f3c53f5 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH] libxl: rework reference counting

2015-06-15 Thread Jim Fehlig
Similar to commit 540c339a for the QEMU driver, rework reference counting in the libxl driver to make it more deterministic and the code a bit cleaner. Signed-off-by: Jim Fehlig jfeh...@suse.com --- I've been testing this patch on and off for a few weeks now using libvirt-tck domain tests, local

[libvirt] [PATCH v2 3/3] storage: Generate correct parameters for CIFS

2015-06-15 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1186969 When generating the path to the dir for a CIFS/Samba driver, the code would generate a source path for the mount using %s:%s while the mount.cifs expects to see //%s/%s. So check for the cifsfs and format the source path appropriately.

[libvirt] [PATCH v2 0/3] Adjust netfs CIFS/Samba formatting

2015-06-15 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1186969 v1 here: http://www.redhat.com/archives/libvir-list/2015-June/msg00155.html Changes since v1: * Alter v1 to make a common RNG - even though it's ACK'd - I figured I'd still send to make sure there were no other issues... * Add 2/3 to

[libvirt] [PATCH v2 1/3] storage: Fix the schema and add tests for cifs pool

2015-06-15 Thread John Ferlan
Commit id '887dd362' added support for a netfs pool format type 'cifs' and 'gluster' in order to add rng support for Samba and glusterfs netfs pools. Originally, the CIFS type support was added as part of commit id '61fb6979'. Eventually commit id 'b325be12' fixed the gluster rng definition to

Re: [libvirt] [PATCH] Fix virsh edit and virt-xml-validate with SCSI LUN

2015-06-15 Thread John Ferlan
Something I didn't catch on pass1, but perhaps an important distinction title: Resolve issues with SCSI LUN hostdev device addressing Coincidentally - there's a bz regarding the address setting between SCSI disk and hostdev which is assigned to me and was near the top of my todo list...

[libvirt] [PATCH v2 2/3] storage: Adjust command arglist for gluster

2015-06-15 Thread John Ferlan
In order for the glusterfs boolean to be set, the pool-def-type must be VIR_STORAGE_POOL_NETFS, thus the check within virCommandNewArgList whether pool-def-type is VIR_STORAGE_POOL_FS will never be true, so remove it Signed-off-by: John Ferlan jfer...@redhat.com ---

[libvirt] Libvirt bite sized tasks

2015-06-15 Thread Michal Privoznik
Dear lists, I've just started new wiki page which aim is to summarize small and trivial tasks, that starting contributors can take, investigate and implement. The aim is to give them something easy to start with while not scaring them out about complexity of our code. The page can be found here:

Re: [libvirt] [PATCH] qemu: fix cannot attach a virtio channel

2015-06-15 Thread Ján Tomko
I'd rather be more specific in the commit summary, e.g.: fix address allocation on chardev hotplug On Wed, Jun 10, 2015 at 10:49:37PM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1230039 When attach a channel which target type is virtio, we will get an error:

Re: [libvirt] [PATCH] virCapabilitiesDomainDataLookup: Produce saner error message

2015-06-15 Thread Erik Skultety
On 06/12/2015 03:49 PM, Michal Privoznik wrote: During a review, I've noticed this error message that was eventually produced when I was trying to define a domain: error: invalid argument: could not find capabilities for arch=mips64el domaintype=(null) Look at the (null). Why is it

Re: [libvirt] Deleted all setting after reboot

2015-06-15 Thread Michal Privoznik
On 13.06.2015 07:48, Amir Azemati wrote: Hello all great, We had a question, We use OpenStack IceHouse on CentOS 6.5. We use libvirt for create network, attach interface to our VMs and ... There is a problem. When our server restart (reboot), all settings are deleted. We have to go back

Re: [libvirt] [PATCH] virCapabilitiesDomainDataLookup: Produce saner error message

2015-06-15 Thread Michal Privoznik
On 15.06.2015 09:10, Erik Skultety wrote: On 06/12/2015 03:49 PM, Michal Privoznik wrote: During a review, I've noticed this error message that was eventually produced when I was trying to define a domain: error: invalid argument: could not find capabilities for arch=mips64el

[libvirt] [PATCH v4 1/9] virDomainDiskGetSource: Mark passed disk as 'const'

2015-06-15 Thread Pavel Boldin
From: Michal Privoznik mpriv...@redhat.com The disk is not changed anywhere in the function. Mark this fact in the function header too. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- 2 files changed, 2 insertions(+), 2

[libvirt] [PATCH v4 5/9] util: multi-value parameters in virTypedParamsAdd*

2015-06-15 Thread Pavel Boldin
Allow multi-value parameters to be build using virTypedParamsAdd* functions by removing check for duplicates. Signed-off-by: Pavel Boldin pbol...@mirantis.com Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/util/virtypedparam.c | 16 1 file changed, 16 deletions(-)

[libvirt] [PATCH v4 0/9] Selective block device migration implementation

2015-06-15 Thread Pavel Boldin
Behold of the fourth re-roll of the selective block device migration patch. In this patch we don't only fix the issue with NBD migration format auto- detection but also introduce the patches that do enhance the NBD migration triggered by `drive-mirror` QEMU command with ability for the user to

[libvirt] [PATCH v4 8/9] qemu: migration: selective block device migration

2015-06-15 Thread Pavel Boldin
Implement a `migrate_disks' parameters for the QEMU driver. This multi- value parameter can be used to explicitly specify what block devices are to be migrated using the NBD server. Tunnelled migration using NBD is to be done. Signed-off-by: Pavel Boldin pbol...@mirantis.com Signed-off-by: Michal

[libvirt] [PATCH v4 6/9] util: virTypedParams{Filter, GetAllStrings}

2015-06-15 Thread Pavel Boldin
Add multikey API: * virTypedParamsFilter that filters all the parameters with specified name. * virTypedParamsGetAllStrings that returns a list with all the values for specified name and string type. Signed-off-by: Pavel Boldin pbol...@mirantis.com Signed-off-by: Michal Privoznik

[libvirt] [PATCH v4 2/9] qemuMigrationBeginPhase: Fix function header indentation

2015-06-15 Thread Pavel Boldin
From: Michal Privoznik mpriv...@redhat.com This function is returning a string (domain XML). Since d3ce7363 when it was first introduced, it was indented incorrectly: static char *qemuMigrationBeginPhase(..) Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_migration.c | 16

  1   2   >