Re: [libvirt] [PATCH] iohelper: use saferead if later write with O_DIRECT

2017-10-23 Thread Nikolay Shirokovskiy
ping On 28.09.2017 10:06, Nikolay Shirokovskiy wrote: > One of the usecases of iohelper is to read from pipe and write > to file with O_DIRECT. As we read from pipe we can have partial > read and then we fail to write this data because output file > is open with O_DIRECT and buffer size is not ali

Re: [libvirt] libvirt not wanting to read back its own interface XML

2017-10-23 Thread Guido Günther
Hi Marc, On Sun, Oct 22, 2017 at 10:37:44AM +0200, Marc Haber wrote: > Hi Guido, > > I didn't mean to accuse Debian of doing a bad job with netcf. I didn't read it like that either. > > On Sun, Oct 22, 2017 at 09:26:31AM +0200, Guido Günther wrote: > > On Thu, Oct 19, 2017 at 02:41:31PM +0200,

[libvirt] [PATCH] remote: Fix libvirtd service memory leak when libvirt client was terminated unexpectly

2017-10-23 Thread xinhua.Cao
base on commit 2033e8cc119454bc4273e8a41e66c899c60ba58b and fe8f1c8b8650c8ab5e7d27338f4538582651bd14, we solve libvirt coredump problem, but it introduce a memory leak sense. the sense follow 1. one client register a domain event such as reboot event 2. and client was terminated unexpectly, then

Re: [libvirt] [PATCH v1 3/5] qemu.conf: Introduce memory_predictable_file_names

2017-10-23 Thread Michal Privoznik
On 10/23/2017 06:47 PM, Daniel P. Berrange wrote: > On Mon, Oct 23, 2017 at 05:43:16PM +0200, Michal Privoznik wrote: >> In some cases management application needs to allocate memory for >> qemu upfront and then just let qemu use that. Since we don't want >> to expose path for memory-backend-file a

Re: [libvirt] [PATCH v1 3/5] qemu.conf: Introduce memory_predictable_file_names

2017-10-23 Thread Daniel P. Berrange
On Mon, Oct 23, 2017 at 05:43:16PM +0200, Michal Privoznik wrote: > In some cases management application needs to allocate memory for > qemu upfront and then just let qemu use that. Since we don't want > to expose path for memory-backend-file anywhere in the domain > XML, we can have a configuratio

Re: [libvirt] [PATCH] spec: Restart libvirtd in posttrans

2017-10-23 Thread Pavel Hrdina
On Mon, Oct 23, 2017 at 04:00:57PM +0200, Jiri Denemark wrote: > When upgrading libvirt packages, there's no strict ordering for the > installation or removal of the individual libvirt sub packages. Thus > libvirt-daemon may be upgraded (and its %postun scriptlet) started > before all sub packages

Re: [libvirt] [jenkins-ci PATCH v2 0/5] guests: Fixes for development releases

2017-10-23 Thread Pavel Hrdina
On Mon, Oct 23, 2017 at 03:18:59PM +0200, Andrea Bolognani wrote: > Changes from [v1]: > > * rebase on top of current master; > * perform pure code motions in a separate patch; > * clean up non-CI guests. > > [v1] https://www.redhat.com/archives/libvir-list/2017-October/msg01045.html > > Andrea

Re: [libvirt] [jenkins-ci PATCH] guests: disable sendmail on FreeBSD to speedup booting

2017-10-23 Thread Andrea Bolognani
On Mon, 2017-10-23 at 16:52 +0200, Pavel Hrdina wrote: > Yes, I noticed that sshd is started before sendmail, but I didn't know > (properly checked) that setting it to "NONE" is deprecated. From the > man page we would need to set 4 options to "NO" which is not worth it. Agreed. > Other possible

[libvirt] [PATCH v1 2/5] qemu: Move memPath generation from memoryBackingDir to a separate function

2017-10-23 Thread Michal Privoznik
In near future we will need more than just a plain VIR_STRDUP(). Better implement that in a separate function and in qemuBuildMemoryBackendStr() which is complicated enough already. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_conf.c| 18

[libvirt] [PATCH v1 5/5] news: Document memory_predictable_file_names

2017-10-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 989b82aa5..bba1f9968 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -49,6 +49,16 @@ easily. + + +

[libvirt] [PATCH v1 0/5] Predictable file names for memory-backend-file

2017-10-23 Thread Michal Privoznik
As discussed here [1], for some types of environment it's important to allocate memory upfront. In such cases libvirt needs to reuse the paths. However, since we don't want to expose the paths anywhere, reversed approach is implemented. If enabled in config file, libvirt builds predictable paths fo

[libvirt] [PATCH v1 3/5] qemu.conf: Introduce memory_predictable_file_names

2017-10-23 Thread Michal Privoznik
In some cases management application needs to allocate memory for qemu upfront and then just let qemu use that. Since we don't want to expose path for memory-backend-file anywhere in the domain XML, we can have a configuration knob that when enabled generated predictable paths. In this case: $me

[libvirt] [PATCH v1 4/5] qemuxml2argvtest: Test memory_predictable_file_names

2017-10-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-memshared.args | 6 -- tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology.args | 3 ++- .../qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology2.args | 6 -- .../qemuxml2argvdata/qemuxml2argv

[libvirt] [PATCH v1 1/5] conf: s/virDomainObjGetShortName/virDomainDefGetShortName/

2017-10-23 Thread Michal Privoznik
This function works over domain definition and not domain object. Its name is thus misleading. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 4 ++-- src/conf/domain_conf.h | 2 +- src/libvirt_private.syms | 2 +- src/qemu/qemu_conf.c | 2 +- src/qemu/qemu_domain.c | 4 ++

Re: [libvirt] Build fails on Debian unstable: libssh's ssh_get_publickey() is deprecated

2017-10-23 Thread Daniel P. Berrange
On Mon, Oct 23, 2017 at 05:28:36PM +0200, Andrea Bolognani wrote: > I ran into a failure trying to compile libvirt on Debian unstable > today: > > rpc/virnetlibsshsession.c: In function 'virLibsshServerKeyAsString': > rpc/virnetlibsshsession.c:220:5: error: 'ssh_get_publickey' is deprecated >

[libvirt] Build fails on Debian unstable: libssh's ssh_get_publickey() is deprecated

2017-10-23 Thread Andrea Bolognani
I ran into a failure trying to compile libvirt on Debian unstable today: rpc/virnetlibsshsession.c: In function 'virLibsshServerKeyAsString': rpc/virnetlibsshsession.c:220:5: error: 'ssh_get_publickey' is deprecated [-Werror=deprecated-declarations] if (ssh_get_publickey(sess->session,

Re: [libvirt] [jenkins-ci PATCH] guests: disable sendmail on FreeBSD to speedup booting

2017-10-23 Thread Pavel Hrdina
On Mon, Oct 23, 2017 at 04:16:05PM +0200, Andrea Bolognani wrote: > On Mon, 2017-10-23 at 10:35 +0200, Pavel Hrdina wrote: > > +- name: Disable sendmail > > + lineinfile: > > +path: /etc/rc.conf > > +create: yes > > +backup: yes > > +regexp: '^sendmail_enable.*' > > +line: 'sen

Re: [libvirt] [jenkins-ci PATCH] guests: disable sendmail on FreeBSD to speedup booting

2017-10-23 Thread Andrea Bolognani
On Mon, 2017-10-23 at 10:35 +0200, Pavel Hrdina wrote: > +- name: Disable sendmail > + lineinfile: > +path: /etc/rc.conf > +create: yes > +backup: yes > +regexp: '^sendmail_enable.*' > +line: 'sendmail_enable="NONE"' > + when: > +- os_name == 'FreeBSD' According to rc.sen

[libvirt] [PATCH] spec: Restart libvirtd in posttrans

2017-10-23 Thread Jiri Denemark
When upgrading libvirt packages, there's no strict ordering for the installation or removal of the individual libvirt sub packages. Thus libvirt-daemon may be upgraded (and its %postun scriptlet) started before all sub packages with driver libraries are upgraded. When libvirt-daemon's %postun scrip

[libvirt] [jenkins-ci PATCH v2 5/5] guests: Add Debian sid and FreeBSD -CURRENT

2017-10-23 Thread Andrea Bolognani
We already have support for Fedora's development branch; it only makes sense to include Debian's and FreeBSD's as well. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-debian-sid/install.yml | 3 +++ guests/host_vars/libvirt-debian-sid/main.yml | 16 guests/

[libvirt] [jenkins-ci PATCH v2 4/5] ansible: Use ansible_distribution_release on FreeBSD

2017-10-23 Thread Andrea Bolognani
In general, we can rely on ansible_distribution_major_version for a quick way to figure out the OS version; however, when it comes to FreeBSD's -CURRENT snapshots, that variable is not available, which causes the playbook to fail. Work around the problem by always extracting the OS version from an

[libvirt] [jenkins-ci PATCH v2 1/5] guests: Shuffle base steps around

2017-10-23 Thread Andrea Bolognani
We want to add extra repositories before updating the installed packages; however, adding extra repositories might require the libselinux-python package to be installed on some systems. Reorder the steps so that the libselinux-python package is installed before adding extra repositories, which in

[libvirt] [jenkins-ci PATCH v2 2/5] guests: Use non-debug kernel on Fedora Rawhide

2017-10-23 Thread Andrea Bolognani
By default, Fedora Rawhide uses a kernel with a lot of debug options enable. This is very useful for the development of Rawhide itself, but also causes a pretty significant performance penalty. Enable the fedora-rawhide-kernel-nodebug, with higher than default priority, to make sure the non-debug

[libvirt] [jenkins-ci PATCH v2 0/5] guests: Fixes for development releases

2017-10-23 Thread Andrea Bolognani
Changes from [v1]: * rebase on top of current master; * perform pure code motions in a separate patch; * clean up non-CI guests. [v1] https://www.redhat.com/archives/libvir-list/2017-October/msg01045.html Andrea Bolognani (5): guests: Shuffle base steps around guests: Use non-debug kernel on

[libvirt] [jenkins-ci PATCH v2 3/5] guests: Clean up non-CI guests

2017-10-23 Thread Andrea Bolognani
Guests that are not part of the libvirt CI setup don't need to install Java, configure the Jenkins agent or have a Jenkins secret associated with them. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-ubuntu-12/main.yml | 1 - guests/host_vars/libvirt-ubuntu-14/main.yml | 1 - gues

[libvirt] [PATCH v2] qemu_domain: Error out eariler when configuring IDE controller incorrectly

2017-10-23 Thread Lin Ma
Move error handling of IDE controller from qemuBuildControllerDevStr to qemuDomainDeviceDefValidate for reminding users eariler. Signed-off-by: Lin Ma --- src/qemu/qemu_command.c | 17 - src/qemu/qemu_domain.c | 26 ++ 2 files changed, 26 insertions(+), 1

Re: [libvirt] [libvirt-jenkins-ci PATCH 0/6] Implement developer flavor

2017-10-23 Thread Pavel Hrdina
On Thu, Oct 19, 2017 at 05:36:26PM +0200, Andrea Bolognani wrote: > Make lcitool useful outside of the libvirt CI context, even though > doing so openly contradicts its name. We're just savage like that. > > Andrea Bolognani (6): > guests: Open vault on demand > guests: Move configuration hand

Re: [libvirt] [jenkins-ci PATCH 1/3] guests: Use non-debug kernel on Fedora Rawhide

2017-10-23 Thread Pavel Hrdina
On Mon, Oct 23, 2017 at 01:35:36PM +0200, Andrea Bolognani wrote: > By default, Fedora Rawhide uses a kernel with a lot of debug options > enable. This is very useful for the development of Rawhide itself, > but also causes a pretty significant performance penalty. > > Enable the fedora-rawhide-ke

[libvirt] [jenkins-ci PATCH 3/3] guests: Add Debian sid and FreeBSD -CURRENT

2017-10-23 Thread Andrea Bolognani
We already have support for Fedora's development branch; it only makes sense to include Debian's and FreeBSD's as well. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-debian-sid/install.yml| 3 +++ guests/host_vars/libvirt-debian-sid/main.yml | 19 guest

[libvirt] [jenkins-ci PATCH 2/3] ansible: Use ansible_distribution_release on FreeBSD

2017-10-23 Thread Andrea Bolognani
In general, we can rely on ansible_distribution_major_version for a quick way to figure out the OS version; however, when it comes to FreeBSD's -CURRENT snapshots, that variable is not available, which causes the playbook to fail. Work around the problem by always extracting the OS version from an

[libvirt] [jenkins-ci PATCH 1/3] guests: Use non-debug kernel on Fedora Rawhide

2017-10-23 Thread Andrea Bolognani
By default, Fedora Rawhide uses a kernel with a lot of debug options enable. This is very useful for the development of Rawhide itself, but also causes a pretty significant performance penalty. Enable the fedora-rawhide-kernel-nodebug, with higher than default priority, to make sure the non-debug

[libvirt] [jenkins-ci PATCH 0/3] guests: Fixes for development releases

2017-10-23 Thread Andrea Bolognani
Andrea Bolognani (3): guests: Use non-debug kernel on Fedora Rawhide ansible: Use ansible_distribution_release on FreeBSD guests: Add Debian sid and FreeBSD -CURRENT guests/files/fedora-rawhide-kernel-nodebug.repo| 8 +++ guests/host_vars/libvirt-debian-sid/install.yml| 3 ++ gues

Re: [libvirt] [Qemu-devel] [RFC 0/6] enable numa configuration before machine_init() from HMP/QMP

2017-10-23 Thread Daniel P. Berrange
On Mon, Oct 23, 2017 at 12:04:17PM +0200, Igor Mammedov wrote: > On Fri, 20 Oct 2017 10:07:27 +0100 > "Daniel P. Berrange" wrote: > > > On Thu, Oct 19, 2017 at 05:56:49PM -0200, Eduardo Habkost wrote: > > > On Thu, Oct 19, 2017 at 04:28:59PM +0100, Daniel P. Berrange wrote: > > > > On Thu, Oct

Re: [libvirt] [Qemu-devel] [RFC 0/6] enable numa configuration before machine_init() from HMP/QMP

2017-10-23 Thread Igor Mammedov
On Fri, 20 Oct 2017 10:07:27 +0100 "Daniel P. Berrange" wrote: > On Thu, Oct 19, 2017 at 05:56:49PM -0200, Eduardo Habkost wrote: > > On Thu, Oct 19, 2017 at 04:28:59PM +0100, Daniel P. Berrange wrote: > > > On Thu, Oct 19, 2017 at 11:21:22AM -0400, Igor Mammedov wrote: > > > > - Original

Re: [libvirt] [Qemu-devel] [RFC 0/6] enable numa configuration before machine_init() from HMP/QMP

2017-10-23 Thread Igor Mammedov
On Fri, 20 Oct 2017 18:07:03 -0200 Eduardo Habkost wrote: > On Fri, Oct 20, 2017 at 10:07:27AM +0100, Daniel P. Berrange wrote: > > On Thu, Oct 19, 2017 at 05:56:49PM -0200, Eduardo Habkost wrote: > > > On Thu, Oct 19, 2017 at 04:28:59PM +0100, Daniel P. Berrange wrote: > > > > On Thu, Oct 19

[libvirt] [jenkins-ci PATCH] guests: disable sendmail on FreeBSD to speedup booting

2017-10-23 Thread Pavel Hrdina
You can notice it by looking for this message while booting: "Oct 23 08:31:19 libvirt-freebsd-10 sm-mta[667]: My unqualified host name (libvirt-freebsd-10) unknown; sleeping for retry" Signed-off-by: Pavel Hrdina --- guests/tasks/base.yml | 13 + 1 file changed, 13 insertions(+) di

Re: [libvirt] [RFC] Question regarding the validity of QEMU capabilities

2017-10-23 Thread Jiri Denemark
On Fri, Oct 20, 2017 at 13:12:59 +0100, Daniel P. Berrange wrote: > On Fri, Oct 20, 2017 at 01:10:14PM +0200, Pavel Hrdina wrote: > > On Fri, Oct 20, 2017 at 12:59:51PM +0200, Marc Hartmayer wrote: > > > Hi all, > > > > > > the actual capabilities of QEMU are depending on the host. This > > > incl

Re: [libvirt] [libvirt-jenkins-ci PATCH 4/6] guests: Implement developer flavor

2017-10-23 Thread Pavel Hrdina
On Mon, Oct 23, 2017 at 10:09:42AM +0200, Andrea Bolognani wrote: > On Mon, 2017-10-23 at 09:20 +0200, Pavel Hrdina wrote: > > > +- name: Create developer user account > > > + user: > > > +name: developer > > > +comment: Developer > > > > How about using "test:test" account? "developer"

Re: [libvirt] [PATCH 0/3] qemu: Fix race condition between block jobs and the end of migration

2017-10-23 Thread Ján Tomko
On Fri, Oct 20, 2017 at 02:04:26PM +0200, Jiri Denemark wrote: When migrating both memory and storage, we need to make sure block jobs are finished after the virtual CPUs get paused at the end of migration but before QEMU completes the migration otherwise QEMU may die with _co_do_pwritev: Ass

Re: [libvirt] [libvirt-jenkins-ci PATCH 4/6] guests: Implement developer flavor

2017-10-23 Thread Andrea Bolognani
On Mon, 2017-10-23 at 09:20 +0200, Pavel Hrdina wrote: > > +- name: Create developer user account > > + user: > > +name: developer > > +comment: Developer > > How about using "test:test" account? "developer" is longer then "test" > if you need to type it or you don't want to configure yo

Re: [libvirt] Exposing mem-path in domain XML

2017-10-23 Thread Michal Privoznik
On 10/16/2017 11:42 PM, Zack Cornelius wrote: > - Original Message - >> From: "Michal Privoznik" >> To: "Zack Cornelius" >> Cc: "libvir-list" >> Sent: Friday, September 29, 2017 2:44:13 AM >> Subject: Re: [libvirt] Exposing mem-path in domain XML > > >> For this configuration, two memo

Re: [libvirt] [libvirt-jenkins-ci PATCH 1/6] guests: Open vault on demand

2017-10-23 Thread Andrea Bolognani
On Mon, 2017-10-23 at 09:13 +0200, Pavel Hrdina wrote: > On Thu, Oct 19, 2017 at 05:36:27PM +0200, Andrea Bolognani wrote: > > By storing the vault out of the inventory, we can open it on > > demand rather than automatically. This will eventually make it > > possible to use the playbooks even witho

Re: [libvirt] Question about the host-model CPU mode

2017-10-23 Thread Jiri Denemark
On Fri, Oct 20, 2017 at 15:04:57 +0200, David Hildenbrand wrote: > On 20.10.2017 14:50, Jiri Denemark wrote: > > The thing is libvirt calls query-cpu-model-expansion to check what the > > host CPU is. This 'host-model' CPU is replaced with the probed CPU model > > when a domain starts. The problem

Re: [libvirt] [libvirt-jenkins-ci PATCH 4/6] guests: Implement developer flavor

2017-10-23 Thread Pavel Hrdina
On Thu, Oct 19, 2017 at 05:36:30PM +0200, Andrea Bolognani wrote: > The developer is given key-based SSH access to the guest and > granted passwordless sudo privilege for maximum convenience. > > Signed-off-by: Andrea Bolognani > --- > guests/group_vars/all/main.yml | 4 +++- > gu

Re: [libvirt] [libvirt-jenkins-ci PATCH 1/6] guests: Open vault on demand

2017-10-23 Thread Pavel Hrdina
On Thu, Oct 19, 2017 at 05:36:27PM +0200, Andrea Bolognani wrote: > By storing the vault out of the inventory, we can open it on > demand rather than automatically. This will eventually make it > possible to use the playbooks even without knowing the vault > password. You will need to update the l

[libvirt] [PATCH] qemuhotplugtest: Test user supplied alias

2017-10-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/qemuhotplugtest.c| 6 +++ .../qemuhotplug-watchdog-user-alias-full.xml | 4 ++ .../qemuhotplug-watchdog-user-alias.xml| 3 ++ .../qemuhotplug-base-live+watchdog-user-alias.xml | 56 ++

Re: [libvirt] [PATCH v2 00/11] Never ending story of user supplied aliases

2017-10-23 Thread Michal Privoznik
On 10/23/2017 07:53 AM, Ján Tomko wrote: > On Fri, Oct 20, 2017 at 04:52:10PM +0200, Michal Privoznik wrote: >> v2 of: >> >> https://www.redhat.com/archives/libvir-list/2017-October/msg00790.html >> >> diff to v1: >> - new patch 1/11 to address Pavel's findings >> - reworked parsing so that the ali