[libvirt] snapshot-create-as doesn't always work across libvirtd restarts

2014-12-05 Thread Eric Blake
I just found out the hard way that we have a bug in snapshot-create-as, when I corrupted a guest. I was testing with an offline domain: # virsh dumpxml win64 |grep -C1 driver # virsh snapshot-create-as win64 --disk-only --diskspec hda,file=/var/lib/libvirt/images/win64.qcow2 --

Re: [libvirt] [PATCHv3 2/2] security: Add a new func use stat to get process DAC label

2014-12-05 Thread Luyao Huang
On 12/06/2014 12:50 AM, Eric Blake wrote: On 12/05/2014 01:20 AM, Luyao Huang wrote: When use qemuProcessAttach to attach a qemu process, cannot get a right DAC label. Add a new func to get process label via stat func. Do not remove virDomainDefGetSecurityLabelDef before try to use stat to get

[libvirt] Heads-up about the next release

2014-12-05 Thread Daniel Veillard
The plan exposed last month is to push the new release mid month. I will be unavailable mostly on 15-16 so pondering pushing next week, which means entering freeze for example Tuesday morning for a final release toward Fri 12 or Sat 13. We have close to 300 commits already since 1.2.10 so that sou

Re: [libvirt] [PATCH v3 2/2] qemu: Automaticly create tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2014-12-05 Thread Anirban Chakraborty
On 12/5/14, 10:43 AM, "Laine Stump" wrote: >On 12/05/2014 06:12 AM, Michal Privoznik wrote: >> @@ -7374,7 +7399,8 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd, >> } >> >> if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK || >> -actualType == VIR_DOMAIN_NET_TYPE_BRIDGE) { >

Re: [libvirt] [Xen-devel] [PATCH] libxl: Set path to console on domain startup.

2014-12-05 Thread Don Koch
Not really familiar with libvirt, but... On Fri, 5 Dec 2014 16:30:06 + Anthony PERARD wrote: > The path to the pty of a Xen PV console is set only in > virDomainOpenConsole. But this is done too late. A call to > virDomainGetXMLDesc done before OpenConsole will not have the path to > the pty

Re: [libvirt] [PATCH v3 2/2] qemu: Automaticly create tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2014-12-05 Thread Laine Stump
On 12/05/2014 06:12 AM, Michal Privoznik wrote: > @@ -7374,7 +7399,8 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd, > } > > if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK || > -actualType == VIR_DOMAIN_NET_TYPE_BRIDGE) { > +actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||

Re: [libvirt] [PATCH v3 2/2] qemu: Automaticly create tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2014-12-05 Thread Vasiliy Tolstov
2014-12-05 20:22 GMT+03:00 Daniel P. Berrange : > I'm still somewhat inclined to leave the config as "tainted" though, > simply because of the fact that the scripts are an opaque black box > that we don't have visiblity into. So they definitely have the > potential to screw up host or guest config

Re: [libvirt] [PATCH] docs: network: fix some trivial typos in docs/formatnetwork.html

2014-12-05 Thread John Ferlan
On 12/05/2014 04:38 AM, Chen Fan wrote: > this patch fix some weird typos: >1. < hostdev> => >2. < type>=> >3. => >4. redundant comma >5. missing right-half bracket > > Signed-off-by: Chen Fan > --- > docs/formatnetwork.html.in | 10 +- > 1 file chan

Re: [libvirt] [PATCH 0/4] Add auth and adapter to virsh pool-{create|define}-as

2014-12-05 Thread John Ferlan
On 12/05/2014 08:53 AM, Michal Privoznik wrote: > On 04.12.2014 15:45, John Ferlan wrote: >> Recently while reviewing some documentation for iSCSI authentication >> description I found that virsh pool-{create|define}-as did not provide >> a mechanism to add the and/or options on the command >>

Re: [libvirt] [PATCH v3 2/2] qemu: Automaticly create tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2014-12-05 Thread Daniel P. Berrange
On Fri, Dec 05, 2014 at 09:57:36AM -0700, Eric Blake wrote: > On 12/05/2014 04:18 AM, Daniel P. Berrange wrote: > > On Fri, Dec 05, 2014 at 12:12:46PM +0100, Michal Privoznik wrote: > >> From: Vasiliy Tolstov > >> > >> If a user doesn't specify script in network type ethernet, assume > >> that he/

Re: [libvirt] [PATCH v3 2/2] qemu: Automaticly create tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2014-12-05 Thread Eric Blake
On 12/05/2014 04:18 AM, Daniel P. Berrange wrote: > On Fri, Dec 05, 2014 at 12:12:46PM +0100, Michal Privoznik wrote: >> From: Vasiliy Tolstov >> >> If a user doesn't specify script in network type ethernet, assume >> that he/she needs a simple tap device created by libvirt. This >> commit does no

Re: [libvirt] [PATCH] docs: Correct invalid hyperlinks

2014-12-05 Thread Eric Blake
On 12/05/2014 03:20 AM, Martin Kletzander wrote: > On Fri, Dec 05, 2014 at 09:47:47AM +, Ian Campbell wrote: >> On Tue, 2014-12-02 at 07:50 +0100, Martin Kletzander wrote: >>> That said, I found out that that XML-XPath is only needed when >>> creating the tarball, but (probably) not when buildi

Re: [libvirt] [PATCHv3 2/2] security: Add a new func use stat to get process DAC label

2014-12-05 Thread Eric Blake
On 12/05/2014 01:20 AM, Luyao Huang wrote: > When use qemuProcessAttach to attach a qemu process, cannot > get a right DAC label. Add a new func to get process label > via stat func. Do not remove virDomainDefGetSecurityLabelDef > before try to use stat to get process DAC label, because > There are

Re: [libvirt] [PATCH 1/4] docs: Fix a couple of typos on the storage pool html

2014-12-05 Thread Eric Blake
On 12/04/2014 07:45 AM, John Ferlan wrote: > Fix format of the secret XML in the example. The XML had an extraneousof s/extraneousof/extraneous/ > "type='iscsi'" (which is used by the definitions) > > The world wide node name had a typo in the acronym (wwwn). -- Eric Blake eblake redhat co

[libvirt] [PATCH] libxl: Set path to console on domain startup

2014-12-05 Thread Anthony PERARD
Hi, I'm trying to fix an issue when using OpenStack with libvirt+xen (libxenlight). OpenStack cannot access the console output of a Xen PV guest, because the XML generated by libvirt for a domain is missing the path to the pty. The path actually appear in the XML once one call virDomainOpenConsole

[libvirt] [PATCH] libxl: Set path to console on domain startup.

2014-12-05 Thread Anthony PERARD
The path to the pty of a Xen PV console is set only in virDomainOpenConsole. But this is done too late. A call to virDomainGetXMLDesc done before OpenConsole will not have the path to the pty, but a call after OpenConsole will. e.g. of the current issue. Starting a domain with '' Then: virDomainGe

[libvirt] [PATCH v3] automatic create tap device with network type ethernet

2014-12-05 Thread Vasiliy Tolstov
If user not specify network type ethernet, assume that user needs simple tap device created with libvirt. This patch does not need to run external script to create tap device or add root to qemu process. Also libvirt runs script after device creating, if user provide it. Signed-off-by: Vasiliy Tol

Re: [libvirt] [PATCH] storage: Fix printing/casting of uid_t/gid_t

2014-12-05 Thread John Ferlan
On 12/05/2014 04:16 AM, Peter Krempa wrote: > Other parts of libvirt use "%u" for formatting uid/gid and typecast to > unsigned int. Storage driver used the signed variant. > --- > src/storage/storage_driver.c | 21 - > 1 file changed, 12 insertions(+), 9 deletions(-) > > di

[libvirt] [PATCH v2 2/2] qemu: completely rework reference counting

2014-12-05 Thread Martin Kletzander
There is one problem that causes various errors in the daemon. When domain is waiting for a job, it is unlocked while waiting on the condition. However, if that domain is for example transient and being removed in another API (e.g. cancelling incoming migration), it get's unref'd. If the first c

[libvirt] [PATCH v2 0/2] Rework reference locking; in QEMU, for starters

2014-12-05 Thread Martin Kletzander
v2: - qemuDomObjEndAPI now resets the parameter to NULL - Fixes from Peter incorporated - rebased on current master v1: https://www.redhat.com/archives/libvir-list/2014-December/msg00198.html Martin Kletzander (2): conf: Rework virDomainObjListFindByUUID to allow more concurrent APIs qemu

[libvirt] [PATCH v2 1/2] conf: Rework virDomainObjListFindByUUID to allow more concurrent APIs

2014-12-05 Thread Martin Kletzander
Currently, when there is an API that's blocking with locked domain and second API that's waiting in virDomainObjListFindByUUID() for the domain lock (with the domain list locked) no other API can be executed on any domain on the whole hypervisor because all would wait for the domain list to be lock

Re: [libvirt] [PATCH 0/4] Add auth and adapter to virsh pool-{create|define}-as

2014-12-05 Thread Michal Privoznik
On 04.12.2014 15:45, John Ferlan wrote: Recently while reviewing some documentation for iSCSI authentication description I found that virsh pool-{create|define}-as did not provide a mechanism to add the and/or options on the command line - so I figured adding them would be simple. In the course

[libvirt] [PATCHv3 0/2] Fix snapshot-revert and managedsave with host-passthrough CPU mode

2014-12-05 Thread Ján Tomko
v1: https://www.redhat.com/archives/libvir-list/2014-October/msg01120.html v2: https://www.redhat.com/archives/libvir-list/2014-November/msg00218.html v3: * do not format the features at all, instead of adding a model to them Ján Tomko (2): Do not format CPU features without a model Ignore

[libvirt] [PATCHv3 2/2] Ignore CPU features without a model for host-passthrough

2014-12-05 Thread Ján Tomko
This fixes reverting to snapshots created by older libvirt and allows libvirt not to lose track of a domain that has this in its live status XML (such as a domain restored from managedsave) https://bugzilla.redhat.com/show_bug.cgi?id=1030793 https://bugzilla.redhat.com/show_bug.cgi?id=1151885 ---

[libvirt] [PATCHv3 1/2] Do not format CPU features without a model

2014-12-05 Thread Ján Tomko
For host-passthrough CPU we don't honor the CPU features specified in the XML, but we allow outputting them via the UPDATE_CPU flag for dumpxml, this gives user a rough idea of what features the CPU might have. After restoring a managedsave'd domain, the features might end up in the live status XM

Re: [libvirt] [PATCH v2] automatic create tap device with network type ethernet

2014-12-05 Thread Vasiliy Tolstov
2014-12-05 14:09 GMT+03:00 Michal Privoznik : > Fortunately, when I was introducing multiqueue support, I've made it general > enough so that even TYPE_ETHERNET can use multiqueue now. > This patch however fails make check. A few more modifications are needed. So > let me respin the patch with fixe

Re: [libvirt] [PATCH] Update LIBVIRT_CHECK_LIB and LIBVIRT_CHECK_LIB_ALT to use pkg-config

2014-12-05 Thread Pavel Hrdina
On 12/05/2014 11:07 AM, Daniel P. Berrange wrote: On Thu, Dec 04, 2014 at 01:41:10PM -0700, Eric Blake wrote: On 12/04/2014 01:30 PM, Pavel Hrdina wrote: For example on FreeBSD the "yajl" library is located at "/usr/local/lib" and it's not in default LIBS and therefore the configure fails that

Re: [libvirt] [PATCH] util: check for an illegal character in a XML namespace prefix

2014-12-05 Thread Michal Privoznik
On 04.12.2014 14:37, Erik Skultety wrote: When user tries to insert element metadata providing a namespace declaration as well, currently we insert the element without any validation check for XML prefix (if provided). The next VM start would then fail with parse error. This patch fixes this issu

Re: [libvirt] [PATCH v2 2/2] virsh: Don't reconnect after the command when disconnected

2014-12-05 Thread Jiri Denemark
On Mon, Dec 01, 2014 at 12:00:53 +0100, Martin Kletzander wrote: > Each command that needs a connection causes a new connection to be > made. Reconnecting after a command failed is pointless, mainly when > there is no other command to run. Removeing three lines of code takes > care of that and ke

Re: [libvirt] [PATCH v2 1/2] rpc: Report proper close reason for keepalive disconnections

2014-12-05 Thread Jiri Denemark
On Mon, Dec 01, 2014 at 12:00:52 +0100, Martin Kletzander wrote: > Whenever client socket was disconnected due to keepalive timeout, the > I/O event loop did not exit and continued until the point where the > hangup was found. Ending with an error right away when the > keepalive times out takes ca

Re: [libvirt] [PATCH v3 2/2] qemu: Automaticly create tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2014-12-05 Thread Daniel P. Berrange
On Fri, Dec 05, 2014 at 12:12:46PM +0100, Michal Privoznik wrote: > From: Vasiliy Tolstov > > If a user doesn't specify script in network type ethernet, assume > that he/she needs a simple tap device created by libvirt. This > commit does not need to run external script to create tap device > or

[libvirt] [PATCH v3 2/2] qemu: Automaticly create tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2014-12-05 Thread Michal Privoznik
From: Vasiliy Tolstov If a user doesn't specify script in network type ethernet, assume that he/she needs a simple tap device created by libvirt. This commit does not need to run external script to create tap device or add root to qemu process. Moreover, some functions need to be mocked now for q

[libvirt] [PATCH v3 1/2] qemuxml2argvtest: Load virSecurityDriverNop

2014-12-05 Thread Michal Privoznik
In the next patch we are gonna be playing with networks, creating TUN/TAP devices. However, the code invokes virSecurityManagerSetTapFDLabel() over the FDs of TUN/TAP devices when the command line is constructed. This makes sense as we certainly want the FDs labelled correctly. However, due to the

[libvirt] [PATCH v3 0/2] Create TAP devices for ethernet vNICs

2014-12-05 Thread Michal Privoznik
This is a 3rd version of v2: https://www.redhat.com/archives/libvir-list/2014-November/msg01066.html Michal Privoznik (1): qemuxml2argvtest: Load virSecurityDriverNop Vasiliy Tolstov (1): qemu: Automaticly create tap device for VIR_DOMAIN_NET_TYPE_ETHERNET src/qemu/qemu_command.c

Re: [libvirt] [PATCH v2] automatic create tap device with network type ethernet

2014-12-05 Thread Michal Privoznik
On 28.11.2014 14:40, Vasiliy Tolstov wrote: If user not specify script in network type ethernet, assume that user needs simple tap device created with libvirt. This patch does not need to run external script to create tap device or add root to qemu process. Signed-off-by: Vasiliy Tolstov ---

Re: [libvirt] [RFC] The Quest for Domain-IP Mapping Continues...

2014-12-05 Thread Nehal J Wani
On Fri, Dec 5, 2014 at 3:33 PM, Daniel P. Berrange wrote: > On Fri, Dec 05, 2014 at 12:20:03AM +0530, Nehal J Wani wrote: >> If you remember correctly, about 1.2 years ago, we had... >> https://www.redhat.com/archives/libvir-list/2013-September/msg00351.html >> >> In short, the patch proposed a ge

Re: [libvirt] [RFC] The Quest for Domain-IP Mapping Continues...

2014-12-05 Thread Daniel P. Berrange
On Fri, Dec 05, 2014 at 04:28:10PM +0530, Nehal J Wani wrote: > On Fri, Dec 5, 2014 at 3:33 PM, Daniel P. Berrange > wrote: > > On Fri, Dec 05, 2014 at 12:20:03AM +0530, Nehal J Wani wrote: > >> If you remember correctly, about 1.2 years ago, we had... > >> https://www.redhat.com/archives/libvir-

Re: [libvirt] [PATCH] docs: Correct invalid hyperlinks

2014-12-05 Thread Martin Kletzander
On Fri, Dec 05, 2014 at 09:47:47AM +, Ian Campbell wrote: On Tue, 2014-12-02 at 07:50 +0100, Martin Kletzander wrote: That said, I found out that that XML-XPath is only needed when creating the tarball, but (probably) not when building an RPM with it. It's needed when building from the git

Re: [libvirt] [PATCH] Update LIBVIRT_CHECK_LIB and LIBVIRT_CHECK_LIB_ALT to use pkg-config

2014-12-05 Thread Daniel P. Berrange
On Thu, Dec 04, 2014 at 01:41:10PM -0700, Eric Blake wrote: > On 12/04/2014 01:30 PM, Pavel Hrdina wrote: > > For example on FreeBSD the "yajl" library is located at "/usr/local/lib" > > and it's not in default LIBS and therefore the configure fails that > > "yajl" not installed. > > > > We can us

Re: [libvirt] [PATCH] Update LIBVIRT_CHECK_LIB and LIBVIRT_CHECK_LIB_ALT to use pkg-config

2014-12-05 Thread Daniel P. Berrange
On Thu, Dec 04, 2014 at 09:30:54PM +0100, Pavel Hrdina wrote: > For example on FreeBSD the "yajl" library is located at "/usr/local/lib" > and it's not in default LIBS and therefore the configure fails that > "yajl" not installed. > > We can use the "PKG_CHECK_MODULES" to get the correct library p

Re: [libvirt] [PATCH] qemu: snapshot: Report better error when create internal snapshot with passthrough devices

2014-12-05 Thread Peter Krempa
On 12/03/14 12:12, Shanzhi Yu wrote: > When create internal system checkpoint snapshot, it will not works if > guest has passthrough devices attached. It will report error: > > error: operation failed: Error -22 while writing VM > With this patch, it will report erro: > > error: Requested operati

Re: [libvirt] [RFC] The Quest for Domain-IP Mapping Continues...

2014-12-05 Thread Daniel P. Berrange
On Fri, Dec 05, 2014 at 12:20:03AM +0530, Nehal J Wani wrote: > If you remember correctly, about 1.2 years ago, we had... > https://www.redhat.com/archives/libvir-list/2013-September/msg00351.html > > In short, the patch proposed a generalized mechanism for finding out > IP addresses, with flags f

Re: [libvirt] [PATCH] docs: Correct invalid hyperlinks

2014-12-05 Thread Ian Campbell
On Tue, 2014-12-02 at 07:50 +0100, Martin Kletzander wrote: > That said, I found out that that XML-XPath is only needed when > creating the tarball, but (probably) not when building an RPM with it. It's needed when building from the git tree to, Xen automated testing picked up on this overnight: h

[libvirt] [PATCH] docs: network: fix some trivial typos in docs/formatnetwork.html

2014-12-05 Thread Chen Fan
this patch fix some weird typos: 1. < hostdev> => 2. < type>=> 3. => 4. redundant comma 5. missing right-half bracket Signed-off-by: Chen Fan --- docs/formatnetwork.html.in | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/formatne

Re: [libvirt] question about MigrateSetMaxDowntime

2014-12-05 Thread Jim Fehlig
On 12/04/2014 11:57 AM, Peter Krempa wrote: On 12/04/14 17:53, Jim Fehlig wrote: A user asked me about setting max downtime prior to migration, which I thought could be done similar to MigrateSetMaxSpeed. I was surprised to find that it can only be set when migration is in progress # virsh mig

[libvirt] [PATCH] storage: Fix printing/casting of uid_t/gid_t

2014-12-05 Thread Peter Krempa
Other parts of libvirt use "%u" for formatting uid/gid and typecast to unsigned int. Storage driver used the signed variant. --- src/storage/storage_driver.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storag

Re: [libvirt] [PATCH] storage: backend: Log uid/gid when initializing storage file backend

2014-12-05 Thread Peter Krempa
On 12/04/14 21:36, Eric Blake wrote: > On 12/04/2014 12:24 PM, Peter Krempa wrote: >> To ease debugging permission problems add uid/gid values to the debug >> message when initializing a storage file backend. >> --- >> src/storage/storage_backend_fs.c | 4 ++-- >> src/storage/storage_backend_

[libvirt] [PATCHv3 2/2] security: Add a new func use stat to get process DAC label

2014-12-05 Thread Luyao Huang
When use qemuProcessAttach to attach a qemu process, cannot get a right DAC label. Add a new func to get process label via stat func. Do not remove virDomainDefGetSecurityLabelDef before try to use stat to get process DAC label, because There are some other func call virSecurityDACGetProcessLabel.