[libvirt] [PATCH] qemu: make sure agent returns error when required data are missing

2014-04-03 Thread Martin Kletzander
Commit 5b3492fa aimed to fix this and caught one error but exposed another one. When agent command is being executed and the thread waiting for the reply is woken up by an event (e.g. EOF in case of shutdown), the command finishes with no data (rxObject == NULL), but no error is reported, since

[libvirt] Release of python bindings for libvirt 1.2.3

2014-04-03 Thread Daniel Veillard
With a bit of delay due to a dependancy needing fixing, the python bindings update for 1.2.3 are available, tagged in the libvirt-python git module and for download at the usual place: ftp://libvirt.org/libvirt/python/ It carries a mix of improvements, bugs and portability fixes:

Re: [libvirt] [PATCH] qemu: make sure agent returns error when required data are missing

2014-04-03 Thread Qiang Guan
On Apr 3, 2014 at 13:58PM, Martin Kletzander wrote: Commit 5b3492fa aimed to fix this and caught one error but exposed another one. When agent command is being executed and the thread waiting for the reply is woken up by an event (e.g. EOF in case of shutdown), the command finishes with no data

[libvirt] [PATCH] Define CPUINFO_FILE_LEN and fix maxlen of cpuinfo file for powerpc

2014-04-03 Thread Olivia Yin
This patch define CPUINFO_FILE_LEN as 2KB which is enough for most architectures. For the 24 cores PowerPC machines, the file of /proc/cpuinfo will be larger than 2KB. It will fail to start libvirtd with the error message as below: virFileReadAll: Failed to read file '/proc/cpuinfo': Value too

[libvirt] [PATCH] Define STATE_XMLFILE_LEN as 8192

2014-04-03 Thread Olivia Yin
Save/restore the state of domain and migrate need read state XML file. 8192B is not the exactly maximum file length of state file. restore command could work successfully in virsh shell. virsh # list --all IdName State

Re: [libvirt] [PATCH 2/2] Include PCI address in the error in virDomainNetFindIdx

2014-04-03 Thread Ján Tomko
On 04/02/2014 01:53 PM, Laine Stump wrote: On 04/01/2014 06:11 PM, Ján Tomko wrote: When looking up a net device by a MAC and PCI address, it is possible that we've got a match on the MAC address but failed to match the PCI address. In that case, outputting just the MAC address can be

Re: [libvirt] [PATCH] qemu: make sure agent returns error when required data are missing

2014-04-03 Thread Peter Krempa
On 04/03/14 07:58, Martin Kletzander wrote: Commit 5b3492fa aimed to fix this and caught one error but exposed another one. When agent command is being executed and the thread waiting for the reply is woken up by an event (e.g. EOF in case of shutdown), the command finishes with no data

[libvirt] [PATCHv3 1/3] Introduce virDomain{Get,Set}Time APIs

2014-04-03 Thread Michal Privoznik
These APIs allow users to get or set time in a domain, which may come handy if the domain has been resumed just recently and NTP is not configured or hasn't kicked in yet and the guest is running something time critical. In addition, NTP may refuse to re-set the clock if the skew is too big. In

[libvirt] [PATCHv3 2/3] virsh: Expose virDomain{Get,Set}Time

2014-04-03 Thread Michal Privoznik
These APIs are exposed under new virsh command 'domtime' which both gets and sets (not at the same time of course :)). Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tools/virsh-domain-monitor.c | 132 +++ tools/virsh.pod | 16 ++

[libvirt] [PATCHv3 0/3] Time setting and getting in qemu guests

2014-04-03 Thread Michal Privoznik
Hopefully the last round. Michal Privoznik (3): Introduce virDomain{Get,Set}Time APIs virsh: Expose virDomain{Get,Set}Time qemu: Implement virDomain{Get,Set}Time daemon/remote.c | 37 include/libvirt/libvirt.h.in | 14 + src/access/viraccessperm.c | 2

[libvirt] [PATCHv3 3/3] qemu: Implement virDomain{Get,Set}Time

2014-04-03 Thread Michal Privoznik
One caveat though, qemu-ga is expecting time and returning time in nanoseconds. With all the buffering and propagation delay, the time is already wrong once it gets to the qemu-ga, but there's nothing we can do about it. Signed-off-by: Michal Privoznik mpriv...@redhat.com ---

Re: [libvirt] [PATCH 2/3] bhyve: create capabilities submodule

2014-04-03 Thread Michal Privoznik
On 02.04.2014 10:30, Wojciech Macek wrote: Adding one minor change to copyrights header... - Move all capabilities functions to separate file - Add initCPU --- src/Makefile.am| 2 + src/bhyve/bhyve_capabilities.c | 105 ++ +++

Re: [libvirt] [PATCH] qemu: make sure agent returns error when required data are missing

2014-04-03 Thread Martin Kletzander
On Thu, Apr 03, 2014 at 09:32:02AM +0200, Peter Krempa wrote: On 04/03/14 07:58, Martin Kletzander wrote: Commit 5b3492fa aimed to fix this and caught one error but exposed another one. When agent command is being executed and the thread waiting for the reply is woken up by an event (e.g. EOF

Re: [libvirt] [PATCH] virsh: Make 'exit' action same as 'quit'

2014-04-03 Thread Michal Privoznik
On 02.04.2014 10:43, liyang wrote: From: Li Yang liyang.f...@cn.fujitsu.com For now 'virsh quit' action like this: [root@localhost /]# virsh quit [root@localhost /]# And 'virsh exit' action:

[libvirt] [PATCH] Use the force flag for mkfs -t xfs

2014-04-03 Thread Ján Tomko
Without this, building an XFS pool on a formatted partition fails with --overwrite. https://bugzilla.redhat.com/show_bug.cgi?id=927172 --- src/storage/storage_backend_fs.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/storage/storage_backend_fs.c

Re: [libvirt] [PATCH] Use the force flag for mkfs -t xfs

2014-04-03 Thread Michal Privoznik
On 03.04.2014 12:23, Ján Tomko wrote: Without this, building an XFS pool on a formatted partition fails with --overwrite. https://bugzilla.redhat.com/show_bug.cgi?id=927172 --- src/storage/storage_backend_fs.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git

[libvirt] [PATCH v4] Introduce --without-pm-utils to get rid of pm-is-supported dependency

2014-04-03 Thread Cédric Bosdonnat
This uses the dbus api of systemd to check the power management capabilities of the node. --- Diff with v3: * Added unit tests vir virSystemdCan* helpers * Make the default for with-pm-utils depending on dbus and systemd detection * Changed the implementation of the helpers to return

Re: [libvirt] [PATCH] Define CPUINFO_FILE_LEN and fix maxlen of cpuinfo file for powerpc

2014-04-03 Thread Eric Blake
On 04/03/2014 12:43 AM, Olivia Yin wrote: This patch define CPUINFO_FILE_LEN as 2KB which is enough for most architectures. For the 24 cores PowerPC machines, the file of /proc/cpuinfo will be larger than 2KB. It will fail to start libvirtd with the error message as below:

Re: [libvirt] [PATCH] Add redirdevs to ABI stability check

2014-04-03 Thread Michal Privoznik
On 02.04.2014 14:03, Ján Tomko wrote: Check the bus, type of the source device (tcp vs. spicevmc) and the device address visible in the guest. https://bugzilla.redhat.com/show_bug.cgi?id=1035128 --- src/conf/domain_conf.c | 50 ++ 1 file

Re: [libvirt] [PATCH] phyp: fix logic error on volume creation

2014-04-03 Thread Michal Privoznik
On 02.04.2014 01:39, Eric Blake wrote: The phyp code claims that it wants a non-zero value, but actually enforces a capacity of zero. It has been this way since commit ebc46fe in June 2010. Bummer that it has my name as the committer - I guess I should have been much more stubborn about not

Re: [libvirt] [PATCH] libxl: Use id from virDomainObj inside the driver

2014-04-03 Thread Michal Privoznik
On 25.03.2014 18:39, Stefan Bader wrote: There is a domain id in the virDomain structure as well as in the virDomainObj structure. While the former can become stale the latter is kept up to date. So it is safer to always (virDomainObjPtr)-def-id internally. This will fix issues seen when

Re: [libvirt] [PATCH] cpu: Add documentation for CPU driver APIs

2014-04-03 Thread Michal Privoznik
On 26.03.2014 16:08, Jiri Denemark wrote: Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/cpu/cpu.c | 202 ++ 1 file changed, 202 insertions(+) ACK Michal -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] beginner project idea: enum scrubbing [was: Fwd: Start contributing with Libvirt (Finding a mentor or helpful tips)]

2014-04-03 Thread Julio Faracco
It's a good suggestion to start. I will do that, Eric. =) -- *Julio Cesar Faracco* -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 1/3] libxl: Use id from virDomainObj inside the driver

2014-04-03 Thread Michal Privoznik
On 27.03.2014 17:55, Stefan Bader wrote: There is a domain id in the virDomain structure as well as in the virDomainObj structure. While the former can become stale the latter is kept up to date. So it is safer to always (virDomainObjPtr)-def-id internally. This will fix issues seen when

Re: [libvirt] [PATCH 3/3] libxl: Implement basic video device selection

2014-04-03 Thread Michal Privoznik
On 27.03.2014 17:55, Stefan Bader wrote: This started as an investigation into an issue where libvirt (using the libxl driver) and the Xen host, like an old couple, could not agree on who is responsible for selecting the VNC port to use. Things usually (and a bit surprisingly) did work because,

Re: [libvirt] [PATCH 2/3] libxl: Set disk format for empty cdrom device

2014-04-03 Thread Michal Privoznik
On 27.03.2014 17:55, Stefan Bader wrote: The XML config for a CDROM device can be without a source path, indicating that there is no media present. Without this change the libxl driver fails to start a guest in that case because the libxl library checks for the LIBXL_DISK_FORMAT_EMPTY format

[libvirt] [PATCH v2] Add V6LOCAL nwfilter parameter.

2014-04-03 Thread Brian Rak
Currently, adding any sort of IPv6 nwfilter rules is rather difficult. There are no standard rules, and you end up doing a lot of things by hand. This patch makes the $V6LOCAL variable available within nwfilter nules. This is the generated from the interface's mac address using the modified

Re: [libvirt] [PATCH v3 0/2] bhyve: add console support through nmdm device

2014-04-03 Thread Michal Privoznik
On 30.03.2014 15:19, Roman Bogorodskiy wrote: Changes from v2: - Add unittest - Minor: new labels style and target for 1.2.4 Changes from v1: Switch over from implicit slave device path, i.e. guessing from source path='/dev/nmdm0A'/ that the slave is '/dev/nmdm0B', to explicit master

[libvirt] [PATCH v5 4/5] qemu: Implement virDomainFSFreeze and virDomainFSThaw

2014-04-03 Thread Tomoki Sekiyama
Use qemuDomainSnapshotFSFreeze() and qemuDomainSnapshotFSFThaw() which are already implemented for snapshot quiescing. So far, disks and ndisks parameters are unsupported, because the guest agent doesn't have means to specify disks to be frozen or thawed. Signed-off-by: Tomoki Sekiyama

[libvirt] [PATCH v5 0/5] Expose FSFreeze/FSThaw within the guest as API

2014-04-03 Thread Tomoki Sekiyama
Hello, This is patchset v5 to add FSFreeze/FSThaw API for custom disk snapshotting. Changes to v4: * add disks and ndisks parameter to specify disks to be frozen/thawed * make fsfreeze requests nestable * change api version to 1.2.4 (v4:

[libvirt] [PATCH v5 2/5] remote: Implement virDomainFSFreeze and virDomainFSThaw

2014-04-03 Thread Tomoki Sekiyama
New rules are added in fixup_name in gendispatch.pl to keep the name FSFreeze and FSThaw. This adds a new ACL permission 'fs_freeze', which is also applied to VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag. Signed-off-by: Tomoki Sekiyama tomoki.sekiy...@hds.com --- src/access/viraccessperm.c |2

[libvirt] [PATCH v5 1/5] Introduce virDomainFSFreeze() and virDomainFSThaw() public API

2014-04-03 Thread Tomoki Sekiyama
These will freeze and thaw filesystems within guest. The APIs take @disks and @ndisks parameters to specify disks to be frozen or thawed. The parameters can be NULL and 0, then the all mounted filesystes are frozen or thawed. If some disks are frozen multiple times, they are not thawed until

[libvirt] [PATCH v5 3/5] qemu: Track domain quiesced status and make fsfreeze/thaw nestable

2014-04-03 Thread Tomoki Sekiyama
Adds 'quiesced' counter into qemuDomainObjPrivate that tracks how many times fsfreeze is requested in the domain. When qemuDomainSnapshotFSFreeze is called, the counter is incremented. The fsfreeze request is sent to the guest agent when the counter changes from 0 to 1. qemuDomainSnapshotFSThaw

[libvirt] [PATCH v5 5/5] virsh: Expose new virDomainFSFreeze and virDomainFSThaw API

2014-04-03 Thread Tomoki Sekiyama
These are exposed under domfsfreeze command and domfsthaw command. Signed-off-by: Tomoki Sekiyama tomoki.sekiy...@hds.com --- tools/virsh-domain.c | 128 ++ tools/virsh.pod | 23 + 2 files changed, 151 insertions(+) diff --git

Re: [libvirt] libxl fixes/improvements for libvirt

2014-04-03 Thread Michal Privoznik
On 27.03.2014 17:55, Stefan Bader wrote: Here several changes which improve the handling of Xen for me: * 0001-libxl-Use-id-from-virDomainObj-inside-the-driver.patch This is a re-send as I initially submitted that as a reply to some discussion. Starting from the visibly broken

Re: [libvirt] libxl fixes/improvements for libvirt

2014-04-03 Thread Stefan Bader
On 03.04.2014 17:45, Michal Privoznik wrote: On 27.03.2014 17:55, Stefan Bader wrote: Here several changes which improve the handling of Xen for me: * 0001-libxl-Use-id-from-virDomainObj-inside-the-driver.patch This is a re-send as I initially submitted that as a reply to some

Re: [libvirt] [PATCH v1 0/2] Keep original file label

2014-04-03 Thread Michal Privoznik
On 13.03.2014 10:02, Michal Privoznik wrote: This creates a new file to store the original file labels. Or do we want the whole functionality to reside in virtlockd? Michal Privoznik (2): security_dac: Keep original file label security_dac: Lock label store file src/Makefile.am

[libvirt] [PATCH] Fix Memory Leak in daemon/libvirtd.c

2014-04-03 Thread Nehal J Wani
Fixes leak introduced by e562e82f ==4937== 64 bytes in 1 blocks are definitely lost in loss record 270 of 405 ==4937==at 0x4A06BE0: realloc (vg_replace_malloc.c:662) ==4937==by 0x6FA41C4: __vasprintf_chk (vasprintf_chk.c:90) ==4937==by 0x50C8D29: virVasprintfInternal (stdio2.h:199)

[libvirt] Enhancing clean-traffic to work with IPv6

2014-04-03 Thread Brian Rak
I'm looking into adding IPv6 support to the nwfilter clean-traffic rules, but I'm unsure of the best approach to this. I'm planning on sending patches once I get this correct, so I'm trying to figure out what way fits in best. There's a couple different ways I can think of: 1) Explicitly

Re: [libvirt] [PATCH] Define CPUINFO_FILE_LEN and fix maxlen of cpuinfo file for powerpc

2014-04-03 Thread hong-hua....@freescale.com
Hi Eric, Thanks for comments. I'll submit a new revision of this patch. Best Regards, Olivia -Original Message- From: Eric Blake [mailto:ebl...@redhat.com] Sent: Thursday, April 03, 2014 8:25 PM To: Yin Olivia-R63875; libvir-list@redhat.com Subject: Re: [libvirt] [PATCH] Define

[libvirt] [PATCH v2] Define CPUINFO_FILE_LEN and fix maxlen of cpuinfo file for all uses

2014-04-03 Thread Olivia Yin
For example, the file /proc/cpuinfo for 24 cores PowerPC platform is larger than the previous maximum size 2KB. It will fail to start libvirtd with the error message as below: virFileReadAll: Failed to read file '/proc/cpuinfo': Value too large for defined data type virSysinfoRead: internal error

[libvirt] [PATCH 1/5] tests: use C99 initialization for storage test

2014-04-03 Thread Eric Blake
Writing this test with C99 initializers will make it easier to test additions and deletions to struct members as I refactor the code. * tests/virstoragetest.c (mymain): Rewrite initializers. Signed-off-by: Eric Blake ebl...@redhat.com --- tests/virstoragetest.c | 105

[libvirt] [PATCH 0/5] virstoragefile refactoring, part 3

2014-04-03 Thread Eric Blake
Part 2 gave us a common virStorageSource struct, now it's time to start using that struct when crawling backing file chains. I posted some RFCs about my full conversion plan, here's the patches I have working so far. Still plenty more to come, but today's batch of patches took me a lot longer

[libvirt] [PATCH 3/5] conf: track when storage type is still undetermined

2014-04-03 Thread Eric Blake
Right now, virStorageFileMetadata tracks bool backingStoreIsFile for whether the backing string specified in metadata can be resolved as a file (covering both block and regular file resources) or is treated as a network protocol. But when merging this struct with virStorageSource, it will be

[libvirt] [PATCH 2/5] tests: refactor virstoragetest for less stack space

2014-04-03 Thread Eric Blake
I'm about to add fields to virStorageFileMetadata, which means also adding fields to the testFileData struct in virstoragetest. Alas, adding even one pointer on an x86_64 machine gave me a dreaded compiler error: virstoragetest.c:712:1: error: the frame size of 4208 bytes is larger than 4096

[libvirt] [PATCH 4/5] conf: track more fields in backing chain metadata

2014-04-03 Thread Eric Blake
The current use of virStorageFileMetadata is awkward; to learn some of the information about a child node, you have to read fields in the parent node. This does not lend itself well to modifying backing chains (whether inserting a new node in the chain, or consolidating existing nodes); better

[libvirt] [PATCH 5/5] conf: start testing contents of the new backing chain fields

2014-04-03 Thread Eric Blake
The testsuite is absolutely essential to feeling comfortable about swapping the backing chain structure over to a new format. This patch tests the path settings, and demonstrates that right now the code is passing only the canonical name to the child struct, which means more work is necessary in

Re: [libvirt] [RFC PATCH v2 1/3] qemu: Expose additional timing metrics for 'setup' and 'mbps'

2014-04-03 Thread Michael R. Hines
On 02/03/2014 08:32 PM, Jiri Denemark wrote: On Mon, Jan 13, 2014 at 14:28:10 +0800, mrhi...@linux.vnet.ibm.com wrote: From: Michael R. Hines mrhi...@us.ibm.com RDMA migration uses the 'setup' state in QEMU to optionally lock all memory before the migration starts. The total time spent in this

Re: [libvirt] [RFC PATCH v2 1/3] qemu: Expose additional timing metrics for 'setup' and 'mbps'

2014-04-03 Thread Michael R. Hines
On 02/03/2014 08:52 PM, Daniel P. Berrange wrote: On Mon, Feb 03, 2014 at 01:32:59PM +0100, Jiri Denemark wrote: On Mon, Jan 13, 2014 at 14:28:10 +0800, mrhi...@linux.vnet.ibm.com wrote: From: Michael R. Hines mrhi...@us.ibm.com RDMA migration uses the 'setup' state in QEMU to optionally lock