[libvirt] [PATCH] storage_fs: Create directory with UID if needed

2015-05-27 Thread Martin Kletzander
The code already exists there, it just modified different flags. I just noticed this when looking at the code. This patch is better to view with bigger context or '-W'. Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/storage/storage_backend_fs.c | 4 ++-- 1 file changed, 2

Re: [libvirt] [PATCH] storage_fs: Create directory with UID if needed

2015-05-27 Thread Ján Tomko
On Wed, May 27, 2015 at 10:10:53AM +0200, Martin Kletzander wrote: The code already exists there, it just modified different flags. I just noticed this when looking at the code. This patch is better to view with bigger context or '-W'. Signed-off-by: Martin Kletzander mklet...@redhat.com

Re: [libvirt] Libvirt now using Zanata for translation

2015-05-27 Thread Daniel P. Berrange
On Wed, May 27, 2015 at 08:45:09AM +0800, zhang bo wrote: On 2015/3/6 21:20, Daniel P. Berrange wrote: As of current GIT master, libvirt is fully using Zanata for po file translation After some trouble with the zanata python client, I have now successfully refreshed pushed the

Re: [libvirt] [PATCH] lxc / docker containers gives option to inherit the namespaces. Example lxc-start has option [ --share-[net|ipc|uts] name|pid ] where --share-net name|pid means Inherit a network

2015-05-27 Thread Michal Privoznik
On 21.05.2015 19:43, ik.nitk wrote: This patch tries to add the similar option to libvirt lxc. So to inherit namespace from name container c2. add this into xml. lxc:namespace sharenet type='name' value='c2'/ /lxc:namespace And to inherit namespace from a pid.

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

2015-05-27 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] lxc: properly clean up qemu-nbd

2015-05-27 Thread Cédric Bosdonnat
Add the qemu-nbd tasks to the container cgroup to make sure those will be killed when the container is stopped. In order to reliably get the qemu-nbd tasks PIDs, we use /sys/devices/virtual/block/DEV/pid as qemu-nbd is daemonizing itself. --- src/libvirt_private.syms | 1 +

Re: [libvirt] Libvirt now using Zanata for translation

2015-05-27 Thread zhang bo
On 2015/5/27 17:00, Daniel P. Berrange wrote: On Wed, May 27, 2015 at 08:45:09AM +0800, zhang bo wrote: On 2015/3/6 21:20, Daniel P. Berrange wrote: As of current GIT master, libvirt is fully using Zanata for po file translation After some trouble with the zanata python client, I have now

Re: [libvirt] [PATCH v2] qemu: Deal with panic device on pSeries.

2015-05-27 Thread John Ferlan
On 05/15/2015 05:35 AM, Andrea Bolognani wrote: The guest firmware provides the same functionality as the pvpanic device, which is not available in QEMU on pSeries: make sure the XML reflects this fact by automatically adding a panic/ element when not already present. On the other hand,

Re: [libvirt] [PATCH] zfs: fix storagepoolxml2xml test

2015-05-27 Thread Roman Bogorodskiy
Cole Robinson wrote: On 05/26/2015 12:30 AM, Roman Bogorodskiy wrote: Commit 7c2d65d dropped setting default mode. Update zfs tests accordingly. --- tests/storagepoolxml2xmlout/pool-zfs-sourcedev.xml | 3 --- tests/storagepoolxml2xmlout/pool-zfs.xml | 3 --- 2 files

[libvirt] [PATCH] debug: assure NULLSTR() around all %s args in debug at top of public APIs

2015-05-27 Thread Laine Stump
There are also a couple that were very uninformatively just logging the value of the pointer rather than the string itself: * the name arg to virNodeDeviceLookupByName() * wwnn and wwpn args to virNodeDeviceLookupSCSIHostByWWN() All char*'s that make sense should now have their contents logged

[libvirt] [PATCH] node_device: more informative error log when device isn't found

2015-05-27 Thread Laine Stump
In a couple of cases, the node device driver (and the test node device driver which likely copied it) was only logging Node device not found when it couldn't find the requested device. This patch changes those cases to log the name (and in the case when it's relevant, the wwnn and wwpn) as well.

[libvirt] [PATCH] check if console PTY is null before attempting to open

2015-05-27 Thread Shivaprasad G Bhat
Console devices have their pty devices assigned when the qemu is actually started. The libvirt spends considerable amount of time to start the qemu if the guest has multiple passthrough devices. If time is spent during the hostdev preparation, someone attempts to open the console, the libvirt

[libvirt] [PATCH libvirt] interface: don't error out if a bond has no interfaces

2015-05-27 Thread Lubomir Rintel
It's not a problem at all and causes virt-manager to break down. Note: netcf 0.2.8 generates invalid XML for a bond with no interfaces anyway, so this error is in fact not reached as we fail earlier. Fix submitted upstream. Signed-off-by: Lubomir Rintel lkund...@v3.sk ---

Re: [libvirt] [PATCH libvirt] interface: don't error out if a bond has no interfaces

2015-05-27 Thread Laine Stump
On 05/27/2015 01:30 PM, Lubomir Rintel wrote: It's not a problem at all and causes virt-manager to break down. Note: netcf 0.2.8 generates invalid XML for a bond with no interfaces anyway, so this error is in fact not reached as we fail earlier. Fix submitted upstream. ACK. This patch also

Re: [libvirt] Plans for next release

2015-05-27 Thread Jim Fehlig
On 05/23/2015 07:22 AM, Daniel Veillard wrote: Hi everybody, if we want to get it by next month, we should probably freeze on Tuesday for an 1.2.16 on June 1st, we 'only' have 137 commits since 1.2.15 but sticking to the monthly release is important. Hi Daniel, I have a few old patches

Re: [libvirt] [PATCH 1/3] Simplify allocation check in storageVolResize

2015-05-27 Thread John Ferlan
On 05/27/2015 11:08 AM, Ján Tomko wrote: The volume cannot be shrinked below existing allocation, thus a successful resize with VOL_RESIZE_ALLOCATE will never increase the pool's available value. Since shrinking a volume below existing allocation is not allowed, it is not possible for a

Re: [libvirt] [PATCH 2/3] Fix shrinking volumes with the delta flag

2015-05-27 Thread John Ferlan
On 05/27/2015 11:08 AM, Ján Tomko wrote: This never worked. In 0.9.10 when this API was introduced, it was intended that the SHRINK flag combined with DELTA would shrink the volume by the specified capacity (to avoid passing negative numbers). See commit 055bbf4. When the SHRINK flag

Re: [libvirt] [PATCH 3/3] virsh: make negative values with vol-resize more convenient

2015-05-27 Thread John Ferlan
On 05/27/2015 11:08 AM, Ján Tomko wrote: When shrinking a volume by a certain size, instead of typing vol-resize volume 1G --delta --shrink we allow the convience of specifying a negative value: vol-resize volume -1G --delta --shrink getting the same results with one more character.

Re: [libvirt] [PATCH v2] libxl: load on FreeBSD

2015-05-27 Thread Martin Kletzander
On Sun, May 24, 2015 at 06:45:02PM +0300, Roman Bogorodskiy wrote: The libxl tries to check if it's running in dom0 by parsing /proc/xen/capabilities and if that fails it doesn't load. There's no procfs interface in Xen on FreeBSD, so this check always fails. In addition to checking procfs,

Re: [libvirt] [PATCH v2 2/3] virsh: Pass vshControl to all vshCommandOpt*() calls.

2015-05-27 Thread Andrea Bolognani
On Wed, 2015-05-27 at 16:47 +0200, Michal Privoznik wrote: -bool config = vshCommandOptBool(cmd, config); +bool config = vshCommandOptBool(ctl, cmd, config); I don't think this is needed. vshCommandOptBool should never return an error. Well, it's returning just if a flag was

Re: [libvirt] [PATCH] storage_fs: Create directory with UID if needed

2015-05-27 Thread Cole Robinson
On 05/27/2015 04:10 AM, Martin Kletzander wrote: The code already exists there, it just modified different flags. I just noticed this when looking at the code. This patch is better to view with bigger context or '-W'. Signed-off-by: Martin Kletzander mklet...@redhat.com ---

Re: [libvirt] [PATCHv3] util: make it more robust to calculate timeout value

2015-05-27 Thread Martin Kletzander
On Mon, May 25, 2015 at 02:22:42PM +0800, Wang Yufei wrote: From: Zhang Bo oscar.zhan...@huawei.com When we change system clock to years ago, a certain CPU may use up 100% cputime. The reason is that in function virEventPollCalculateTimeout(), we assign the unsigned long long result to an INT

Re: [libvirt] [PATCH v2 3/3] virsh: Move error messages inside vshCommandOpt*() functions.

2015-05-27 Thread Michal Privoznik
On 22.05.2015 10:59, Andrea Bolognani wrote: --- tests/vcpupin| 4 +- tools/virsh-domain-monitor.c | 9 +-- tools/virsh-domain.c | 134 +++ tools/virsh-host.c | 57 +++--- tools/virsh-interface.c

[libvirt] [PATCH 1/3] Simplify allocation check in storageVolResize

2015-05-27 Thread Ján Tomko
The volume cannot be shrinked below existing allocation, thus a successful resize with VOL_RESIZE_ALLOCATE will never increase the pool's available value. Even with the SHRINK flag it is possible to extend the current allocation or even the capacity. Remove the overflow when computing delta with

[libvirt] [PATCH 0/3] volume resize fixes

2015-05-27 Thread Ján Tomko
First two patches fix bugs and are applicable for the freeze. Ján Tomko (3): Simplify allocation check in storageVolResize Fix shrinking volumes with the delta flag virsh: make negative values with vol-resize more convenient src/storage/storage_driver.c | 26 +-

[libvirt] [PATCH 3/3] virsh: make negative values with vol-resize more convenient

2015-05-27 Thread Ján Tomko
When shrinking a volume by a certain size, instead of typing vol-resize volume 1G --delta --shrink we allow the convience of specifying a negative value: vol-resize volume -1G --delta --shrink getting the same results with one more character. A negative value only makes sense as a delta.

[libvirt] [PATCH 2/3] Fix shrinking volumes with the delta flag

2015-05-27 Thread Ján Tomko
This never worked. In 0.9.10 when this API was introduced, it was intended that the SHRINK flag combined with DELTA would shrink the volume by the specified capacity (to avoid passing negative numbers). See commit 055bbf4. When the SHRINK flag was finally implemented for the first backend in

Re: [libvirt] [PATCH v2] qemu: Limit rtc-reset-reinjection requirement to x86 only.

2015-05-27 Thread Martin Kletzander
On Tue, May 26, 2015 at 06:13:40PM +0200, Andrea Bolognani wrote: The QMP command, like the interrupt reinjection logic it's connected to, is only implemented in QEMU when TARGET_I386 is defined, so checking for its availability on any other architecture is pointless. On the other hand, when

Re: [libvirt] [PATCHv3] util: make it more robust to calculate timeout value

2015-05-27 Thread Martin Kletzander
On Wed, May 27, 2015 at 04:58:22PM +0200, Martin Kletzander wrote: On Mon, May 25, 2015 at 02:22:42PM +0800, Wang Yufei wrote: From: Zhang Bo oscar.zhan...@huawei.com When we change system clock to years ago, a certain CPU may use up 100% cputime. The reason is that in function

[libvirt] [PATCH] maint: document use of zanata for translations

2015-05-27 Thread Eric Blake
Based on recent list questions on how to contribute a translation fix. Signed-off-by: Eric Blake ebl...@redhat.com --- Should be safe for freeze, but as I have never contributed a translation fix, I'll wait for review. HACKING | 19 --- docs/hacking.html.in | 7

Re: [libvirt] [PATCH v2 1/3] virsh: Make vshCommandOptScaledInt() use vshCommandOpt().

2015-05-27 Thread Michal Privoznik
On 22.05.2015 10:59, Andrea Bolognani wrote: This aligns it to the other vshCommandOpt*() functions. --- tools/virsh.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 4425774..11c2c30 100644 --- a/tools/virsh.c +++

Re: [libvirt] [PATCH v2 2/3] virsh: Pass vshControl to all vshCommandOpt*() calls.

2015-05-27 Thread Michal Privoznik
On 22.05.2015 10:59, Andrea Bolognani wrote: This will allow us to use vshError() to report errors from inside vshCommandOpt*(), instead of replicating the same logic and error messages all over the place. We also have more context inside the vshCommandOpt*() functions, for example the

[libvirt] [PATCH V2] libxl: support domainReset

2015-05-27 Thread Jim Fehlig
Currently, libxl does not provide a reset function, but domainReset can be implemented in the libxl driver by forcibly destroying the domain and starting it again. Signed-off-by: Jim Fehlig jfeh...@suse.com --- This is essentially a V2 of a patch submitted quite some time ago

Re: [libvirt] [PATCH v2] libxl: load on FreeBSD

2015-05-27 Thread Jim Fehlig
On 05/27/2015 09:06 AM, Martin Kletzander wrote: On Sun, May 24, 2015 at 06:45:02PM +0300, Roman Bogorodskiy wrote: The libxl tries to check if it's running in dom0 by parsing /proc/xen/capabilities and if that fails it doesn't load. There's no procfs interface in Xen on FreeBSD, so this check

[libvirt] Entering freeze for libvirt 1.2.16

2015-05-27 Thread Daniel Veillard
I'm one day late but I have tagged the release candidate 1 in git and pushed signed tarballs and rpms to the usual place: ftp://libvirt.org/libvirt/ we have a bit less than 160 commits so far since 1.2.15. I tried it with my usual limited testing and it looks fine, https://ci.centos.org/

Re: [libvirt] [PATCH] conf: improve the address check for dimm type

2015-05-27 Thread Peter Krempa
On Wed, May 27, 2015 at 14:39:58 +0800, Luyao Huang wrote: When hot-plug/cold-plug a memory device, we use memcmp() function to check if there is a memory device have the same address with the memory device we want hot-pluged. But qemu forbid use/hot-plug 2 memory device with same slot *or*

[libvirt] [PATCH] conf: improve the address check for dimm type

2015-05-27 Thread Luyao Huang
When hot-plug/cold-plug a memory device, we use memcmp() function to check if there is a memory device have the same address with the memory device we want hot-pluged. But qemu forbid use/hot-plug 2 memory device with same slot *or* the same base(qemu side this elemnt named addr). Signed-off-by:

Re: [libvirt] [PATCH] conf: improve the address check for dimm type

2015-05-27 Thread lhuang
On 05/27/2015 03:03 PM, Peter Krempa wrote: On Wed, May 27, 2015 at 14:39:58 +0800, Luyao Huang wrote: When hot-plug/cold-plug a memory device, we use memcmp() function to check if there is a memory device have the same address with the memory device we want hot-pluged. But qemu forbid

Re: [libvirt] [PATCH v2] qemu: Fix compilation error when enum variable size differs from 'int'

2015-05-27 Thread Peter Krempa
On Tue, May 26, 2015 at 09:04:09 -0600, Eric Blake wrote: On 05/26/2015 02:31 AM, Peter Krempa wrote: Since commit bcd9a564b631aa virDomainNumatuneGetMode returns the value via a pointer rather than in the return value. The change triggered problems with platforms where the compiler decides

Re: [libvirt] [PATCH] util: improve the sysinfo element XML format

2015-05-27 Thread lhuang
On 05/27/2015 07:59 AM, John Ferlan wrote: On 05/22/2015 05:26 AM, Luyao Huang wrote: When set sysinfo element without sub-elements, libvirt will format it as: sysinfo type='smbios' /sysinfo After improve the format: sysinfo type='smbios'/ Signed-off-by: Luyao Huang

Re: [libvirt] [PATCH] conf: do not format redirfilter element if it do not have sub-element

2015-05-27 Thread lhuang
On 05/27/2015 08:00 AM, John Ferlan wrote: On 05/22/2015 05:26 AM, Luyao Huang wrote: When set a redirfilter element without sub-element, libvirt will format it like this: redirfilter /redirfilter Just drop this element if it do not have any sub-element. Signed-off-by: Luyao