[PATCH] libxl: initialize shutdown inhibit callback

2020-01-17 Thread Marek Marczykowski-Górecki
The libxl driver already tries to call shutdown inhibit callback in the right places, but only if it's set. That last part was missing, resulting in premature shutdown when running libvirtd --timeout=... Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_driver.c | 7 +-- 1 file

Re: [libvirt] [PATCH] Don't check if the path exists for LVM

2020-01-17 Thread Eric Benner
My mistake I sent it with a mail client and had thought I had all the issues worked out, guess not. I resubmitted it with when I could SMTP. Was going to post the patch here again, but my last email didn't thread properly so I'm just going to post the link so I'm not posting all over the mailing

[PATCH] Re: storage: Cleaning up pools is not always ideal

2020-01-17 Thread ebenner
From: Eric Benner Didn't have a sign off and was formatted by a mail client. This is a functional copy of this patch with the requirements. Signed-off-by: Eric Benner --- src/remote/libvirtd.conf.in | 7 +++ src/storage/storage_driver.c | 38 2

[RFC PATCH] libxl: support configuring paravirtualized keyboard

2020-01-17 Thread Marek Marczykowski-Górecki
Xen since 4.13 allows to configure whether PV vkb device is created or not - instead of always creating it. Plug it into device configuration and give the user a choice - setting PS2 keyboard disables PV one, and setting XEN keyboard enables PV. There is one issue with this approach: there are

[libvirt PATCH v2] qemu: fixing auto-detecting binary in domain capabilities

2020-01-17 Thread Daniel P . Berrangé
The virConnectGetDomainCapabilities API accepts either a binary path to the emulator, or desired guest arch. If guest arch is not given, then the host arch is assumed. In the case where the binary is not given, the code tried to find the emulator binary in the existing list of cached emulator

Re: [libvirt] [PATCH v2 2/2] test: qemuhotplugtest mock virFileMakePath

2020-01-17 Thread Andrea Bolognani
On Thu, 2020-01-16 at 09:28 +0100, Christian Ehrhardt wrote: > +VIR_MOCK_IMPL_RET_ARGS(virFileMakePath, int, > + const char *, path) > +{ > +const char *home; > + > +VIR_MOCK_REAL_INIT(virFileMakePath); > + > +/* ignore non-existing homes (e.g. in build

Re: [libvirt] [PATCH v2 1/2] test: let qemuhotplugtest report details of init fails

2020-01-17 Thread Andrea Bolognani
On Thu, 2020-01-16 at 09:28 +0100, Christian Ehrhardt wrote: > If virHostdevManagerGetDefault in qemuhotplugtest fails it works > for quite a while to later segfault when accessing > mgr->activePCIHostdevs. > > Report the error details and break on a failed init to see the > real issue right

Re: [rust PATCH v2 3/5] libvirt-rust: stream: automated lint

2020-01-17 Thread Sahid Orentino Ferdjaoui
On Fri, Jan 17, 2020 at 12:23:46AM -0700, Zixing Liu wrote: > On 1/13/20 3:53 AM, Sahid Orentino Ferdjaoui wrote: > > > On Fri, Jan 10, 2020 at 11:35:32AM -0700, Zixing Liu wrote: > >> On 2020-01-10 04:48, Sahid Orentino Ferdjaoui wrote: > >> > >>> On Tue, Dec 24, 2019 at 12:12:53AM -0700, Zixing

Re: [PATCH] docs: fixing typos 'libivrt' > 'libvirt'

2020-01-17 Thread Ján Tomko
On Fri, Jan 17, 2020 at 12:12:21PM -0300, Julio Faracco wrote: This is only 2 simple typo fixes for wrong documentation wording. Signed-off-by: Julio Faracco --- docs/apps.html.in | 2 +- docs/auditlog.html.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko

[PATCH] docs: fixing typos 'libivrt' > 'libvirt'

2020-01-17 Thread Julio Faracco
This is only 2 simple typo fixes for wrong documentation wording. Signed-off-by: Julio Faracco --- docs/apps.html.in | 2 +- docs/auditlog.html.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/apps.html.in b/docs/apps.html.in index 41dd26f7ff..629d740c28 100644

Re: [libvirt PATCH v3 03/10] bootstrap.conf: add threadlib module

2020-01-17 Thread Daniel P . Berrangé
On Fri, Jan 17, 2020 at 04:00:10PM +0100, Pavel Hrdina wrote: > It is pulled in by tests and used by our build system as well. > Make an explicit dependency on threadlib. This can be later removed > by using GLib GThread. > > Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrangé

[libvirt PATCH v3 00/10] build system cleanup

2020-01-17 Thread Pavel Hrdina
This patch series is motivated by the effort to adopt Meson as our build system but all of it improves the current build system on its own. Changes in v3: - dropped a patches that stores bootstrap result in git and removes some options from autogen.sh, I'll repost once we get rid

[libvirt PATCH v3 02/10] configure.ac: add check for getegid function

2020-01-17 Thread Pavel Hrdina
We already use this function and so far we've been lucky that the same check is done by gnulib. This will change once we will drop gnulib and also make it obvious that we have to do the same check in Meson as well. Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrangé --- configure.ac |

[libvirt PATCH v3 08/10] bootstrap.conf: stop creating AUTHORS file

2020-01-17 Thread Pavel Hrdina
The existence of AUTHORS file is required for GNU projects but since commit <8bfb36db40f38e92823b657b5a342652064b5adc> we do not require these files to exist. Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrangé --- autogen.sh | 2 +- bootstrap.conf | 3 --- 2 files changed, 1

[libvirt PATCH v3 09/10] syntax-check: remove deleted daemon directory from space_indent_check

2020-01-17 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrangé --- build-aux/syntax-check.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index b0a977201e..e5623606dd 100644 --- a/build-aux/syntax-check.mk +++

[libvirt PATCH v3 10/10] autogen.sh: fix autoreconf step

2020-01-17 Thread Pavel Hrdina
Running bootstrap and autoreconf from autogen.sh produced different files in build-aux directory. The reason is that gnulib usually have newer version of these files and overwrites them after the autoreconf step. In order to fix it remove the --install and --force options, in addition introduce

[libvirt PATCH v3 06/10] bootstrap.conf: declare bootstrap sync in configuration file

2020-01-17 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrangé --- autogen.sh | 2 +- bootstrap.conf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 9afad8f9d5..a119b099cb 100755 --- a/autogen.sh +++ b/autogen.sh @@ -147,7 +147,7 @@ if test

[libvirt PATCH v3 07/10] bootstrap.conf: disable VC ignore files

2020-01-17 Thread Pavel Hrdina
We already ignore most of these files and the .gitignore files as well. Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrangé --- .gitignore | 5 - bootstrap.conf | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index

[libvirt PATCH v3 04/10] bootstrap.conf: drop gnulib tests from libvirt

2020-01-17 Thread Pavel Hrdina
We are in process of removing gnulib and adopting meson as our build system. In order to help with the transition let's drop gnulib tests. This will also help with the fact that before we will be able to drop gnulib completely we will store output of bootstrap in git. Signed-off-by: Pavel

[libvirt PATCH v3 03/10] bootstrap.conf: add threadlib module

2020-01-17 Thread Pavel Hrdina
It is pulled in by tests and used by our build system as well. Make an explicit dependency on threadlib. This can be later removed by using GLib GThread. Signed-off-by: Pavel Hrdina --- bootstrap.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap.conf b/bootstrap.conf index

[libvirt PATCH v3 01/10] secret: move virSecretGetSecretString into virsecret

2020-01-17 Thread Pavel Hrdina
The function virSecretGetSecretString calls into secret driver and is used from other hypervisors drivers and as such makes more sense in util. Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrangé --- po/POTFILES.in | 1 - src/libvirt_private.syms

[libvirt PATCH v3 05/10] bootstrap.conf: always copy files

2020-01-17 Thread Pavel Hrdina
Preparation for having bootstrap result in git. Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrangé --- bootstrap.conf | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index 58d1b8e676..b4020ab8ad 100644 --- a/bootstrap.conf +++

Re: [libvirt] [PATCH] man: fix section of virt-sanlock-cleanup

2020-01-17 Thread Andrea Bolognani
On Thu, 2020-01-16 at 10:37 -0300, Daniel Henrique Barboza wrote: > On 1/16/20 7:42 AM, Christian Ehrhardt wrote: > > Reported at buld time by litian: > > s/buld/build Also s/litian/lintian/ ;) Reviewed-by: Andrea Bolognani and pushed. -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH] qemu: fixing auto-detecting binary in domain capabilities

2020-01-17 Thread Daniel P . Berrangé
On Fri, Jan 17, 2020 at 02:54:53PM +0100, Ján Tomko wrote: > On Fri, Jan 17, 2020 at 01:29:36PM +, Daniel P. Berrangé wrote: > > The virConnectGetDomainCapabilities API accepts either a binary path > > to the emulator, or desired guest arch. If guest arch is not given, > > then the host arch

Re: [libvirt PATCH] qemu: fixing auto-detecting binary in domain capabilities

2020-01-17 Thread Ján Tomko
On Fri, Jan 17, 2020 at 01:29:36PM +, Daniel P. Berrangé wrote: The virConnectGetDomainCapabilities API accepts either a binary path to the emulator, or desired guest arch. If guest arch is not given, then the host arch is assumed. In the case where the binary is not given, the code tried

Re: [libvirt PATCH] qemu: fixing auto-detecting binary in domain capabilities

2020-01-17 Thread Richard W.M. Jones
On Fri, Jan 17, 2020 at 01:29:36PM +, Daniel P. Berrangé wrote: > The virConnectGetDomainCapabilities API accepts either a binary path > to the emulator, or desired guest arch. If guest arch is not given, > then the host arch is assumed. > > In the case where the binary is not given, the code

[libvirt PATCH] qemu: fixing auto-detecting binary in domain capabilities

2020-01-17 Thread Daniel P . Berrangé
The virConnectGetDomainCapabilities API accepts either a binary path to the emulator, or desired guest arch. If guest arch is not given, then the host arch is assumed. In the case where the binary is not given, the code tried to find the emulator binary in the existing list of cached emulator

Re: [libvirt PATCH] src: conditionalize / remove use of sys/ioctl.h

2020-01-17 Thread Pavel Hrdina
On Fri, Jan 17, 2020 at 12:19:45PM +, Daniel P. Berrangé wrote: > Remove many imports of sys/ioctl.h which are redundant, > and conditionalize remaining usage that needs to compile > on Windows platforms. > > The previous change to remove the "nonblocking" gnulib > module indirectly caused

[libvirt PATCH] bhyve: fix typos checking CPU dies

2020-01-17 Thread Daniel P . Berrangé
This fixes a build bug introduced by commit fbf27730a36da573b1065c179f4d96b9a751f22f Author: Daniel P. Berrangé Date: Mon Dec 16 11:16:51 2019 + conf: add support for specifying CPU "dies" parameter Signed-off-by: Daniel P. Berrangé --- Pushed as a build fix for FreeBSD

[libvirt PATCH] src: conditionalize / remove use of sys/ioctl.h

2020-01-17 Thread Daniel P . Berrangé
Remove many imports of sys/ioctl.h which are redundant, and conditionalize remaining usage that needs to compile on Windows platforms. The previous change to remove the "nonblocking" gnulib module indirectly caused the loss of the "ioctl" gnulib module that we did not explicitly list in

Re: [libvirt PATCH v2 06/13] util: introduce compat wrappers for Winsock2

2020-01-17 Thread Pavel Hrdina
On Fri, Jan 17, 2020 at 09:38:42AM +, Daniel P. Berrangé wrote: > On Fri, Jan 17, 2020 at 10:27:05AM +0100, Pavel Hrdina wrote: > > On Thu, Jan 16, 2020 at 03:24:41PM +, Daniel P. Berrangé wrote: > > > Windows sockets take a SOCKET HANDLE object instead of a > > > file descriptor. Wrap

Re: [libvirt PATCH v2 11/13] src: conditionally exclude cfmakeraw/termios.h on WIN32

2020-01-17 Thread Pavel Hrdina
On Thu, Jan 16, 2020 at 03:24:46PM +, Daniel P. Berrangé wrote: > The GNULIB termios module ensures termios.h exists (but > is none the less empty) when building for Windows. We > already exclude usage of the functions that would exist > in a real termios.h, so having an empty termios.h is >

Re: [libvirt PATCH v2 08/13] util: pull gnulib physmem impl into local code

2020-01-17 Thread Pavel Hrdina
On Thu, Jan 16, 2020 at 03:24:43PM +, Daniel P. Berrangé wrote: > We don't need all the platforms gnulib deals with, so > this is a cut down version of GNULIB's physmem.c > code. This also allows us to integrate libvirt's > error reporting functions closer to the error cause. > >

Re: [libvirt PATCH v2 06/13] util: introduce compat wrappers for Winsock2

2020-01-17 Thread Daniel P . Berrangé
On Fri, Jan 17, 2020 at 10:27:05AM +0100, Pavel Hrdina wrote: > On Thu, Jan 16, 2020 at 03:24:41PM +, Daniel P. Berrangé wrote: > > Windows sockets take a SOCKET HANDLE object instead of a > > file descriptor. Wrap them in the same way that gnulib > > does so that they use C runtime file

Re: [libvirt PATCH v2 06/13] util: introduce compat wrappers for Winsock2

2020-01-17 Thread Pavel Hrdina
On Thu, Jan 16, 2020 at 03:24:41PM +, Daniel P. Berrangé wrote: > Windows sockets take a SOCKET HANDLE object instead of a > file descriptor. Wrap them in the same way that gnulib > does so that they use C runtime file descriptors. > > While we could in theory use GSocket, it is hard to get >

Re: [PATCH 2/2] run.in: Include tools directory on $PATH.

2020-01-17 Thread Erik Skultety
On Thu, Jan 16, 2020 at 05:15:42PM +, Richard W.M. Jones wrote: > You normally want to run the locally compiled copy of virsh. Trying > to run the installed version with the locally compiled library is a > recipe for problems with missing symbols and so on. By adding tools > to the path we

Re: [libvirt] [PATCH] Don't check if the path exists for LVM

2020-01-17 Thread ebennerit
From: Eric Benner Sorry I attempted to use a mail client since SMTP wasn't working for me at the time. I cleaned up the commit, I believe this is how it needed to be. Signed-off-by: Eric Benner --- src/storage/storage_backend_logical.c | 8 +++- 1 file changed, 3 insertions(+), 5

Re: [PATCH 1/2] run.in: Add intelligent prepend function.

2020-01-17 Thread Erik Skultety
On Thu, Jan 16, 2020 at 05:15:41PM +, Richard W.M. Jones wrote: > This has been used in libguestfs and libnbd for quite a while as it > makes the ./run script easier to read and write. > > See also: > http://stackoverflow.com/a/9631350 Very neat, thanks for linking the stackoverflow article

Re: [libvirt PATCH v2 02/13] src: remove use of the INT_MULTIPLY_OVERFLOW macro

2020-01-17 Thread Pavel Hrdina
On Thu, Jan 16, 2020 at 03:24:37PM +, Daniel P. Berrangé wrote: > The GLib g_size_checked_mul() function is not quite the > same signature, and gives compiler warnings due to not > correctly casting from gsize to guint64/32. Implementing > a replacement for INT_MULTIPLY_OVERFLOW is easy enough

Re: [libvirt PATCH v2 01/13] src: replace use of INT_BUFSIZE_BOUND macros

2020-01-17 Thread Pavel Hrdina
On Thu, Jan 16, 2020 at 03:24:36PM +, Daniel P. Berrangé wrote: > Introduce a vastly simpler VIR_INT64_STR_BUFLEN constant > which is large enough for all cases where we currently > use INT_BUFSIZE_BOUND. This eliminates most use of the > gnulib intprops.h header. > > Signed-off-by: Daniel P.