[libvirt] [PATCH v2 0/3] Better syntax-check on BSD

2019-01-03 Thread Eric Blake
Since v1: fix the gnulib bug I accidentally introduced, then copy the gist of Roman's gnulib changes to also apply to our cfg.mk syntax checks. Eric Blake (3): maint: update gnulib for syntax-check on BSD maint: prefer $(GREP) in cfg.mk maint: split long lines for BSD syntax-check .gnulib

[libvirt] [PATCH v2 3/3] maint: split long lines for BSD syntax-check

2019-01-03 Thread Eric Blake
Similar to the gnulib changes we just incorporated into maint.mk, it's time to use '$(VC_LIST) | xargs program' instead of 'program $$($(VC_LIST))', in order to bypass the problem of hitting argv limits due to our large set of files. Drop several uses of $$files as a temporary variable when we

[libvirt] [PATCH v2 2/3] maint: prefer $(GREP) in cfg.mk

2019-01-03 Thread Eric Blake
We already used $(GREP) in some places, but might as well use it everywhere during syntax check, in line with similar recent gnulib changes. --- cfg.mk | 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/cfg.mk b/cfg.mk

[libvirt] [PATCH v2 1/3] maint: update gnulib for syntax-check on BSD

2019-01-03 Thread Eric Blake
In particular, this incorporates Roman's patches to allow 'make syntax-check' to work on BSD with its exec argv limitations that previously failed when trying to grep the large number of files present in libvirt. cfg.mk needs similar changes, but that will be tackled separately. Signed-off-by:

Re: [libvirt] [PATCH v5 21/36] qemu_process: Use unique directories for QMP processes

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:15 -0600, Chris Venteicher wrote: > Multiple QEMU processes for QMP commands can operate concurrently. > > Use a unique directory under libDir for each QEMU processes > to avoid pidfile and unix socket collision between processes. > > The pid file name is changed

Re: [libvirt] [PATCH v5 22/36] qemu_process: Stop locking QMP process monitor immediately

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:16 -0600, Chris Venteicher wrote: > Locking the monitor object immediately after call to qemuMonitorOpen > doesn't make sense now that we have expanded the QEMU process code to > cover more than the original capabilities usecase. The expanded use case has nothing to

Re: [libvirt] [PATCH v5 20/36] qemu_process: Enter QMP command mode when starting QEMU Process

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:14 -0600, Chris Venteicher wrote: > qemuProcessQmpStart starts a QEMU process and monitor connection that > can be used by multiple functions possibly for multiple QMP commands. > > The QMP exchange to exit capabilities negotiation mode and enter command mode > can

Re: [libvirt] [PATCH v5 19/36] qemu_monitor: Make monitor callbacks optional

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:13 -0600, Chris Venteicher wrote: > Qemu process code for capababilities doesn't use monitor callbacks and > defines empty callback functions. > > Allow NULL to be passed to qemuMonitorOpen for callbacks and remove the > empty functions from the QMP process code. >

Re: [libvirt] [PATCH v5 18/36] qemu_process: Catch process free before process stop

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:12 -0600, Chris Venteicher wrote: > Catch execution paths where qemuProcessQmpFree is called before > qemuProcessQmpStop then report error and force stop before proceeding. > > Also added public function header and debug message. > > Signed-off-by: Chris Venteicher

Re: [libvirt] [PATCH v5 17/36] qemu_process: Cleanup qemuProcessQmpStop function

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:11 -0600, Chris Venteicher wrote: > qemuProcessQmpStop is one of the 4 public functions used to create and > manage a Qemu process for QMP command exchanges. > > Add comment header and debug message. > > Other minor code formatting cleanup. This formatting

Re: [libvirt] [PATCH v5 16/36] qemu_process: Cleanup qemuProcessQmp alloc function

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:10 -0600, Chris Venteicher wrote: > qemuProcessQmpNew is one of the 4 public functions used to create and > manage a qemu process for QMP command exchanges outside of domain > operations. > > Add descriptive comment block, Debug statement and make source > consistent

Re: [libvirt] [PATCH v5 15/36] qemu_process: Don't open monitor if process failed

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:09 -0600, Chris Venteicher wrote: > Gracefully handle case when proc activation failed prior to calling. > > Consistent with the existing code for qemuConnectMonitor (for domains) > in qemu_process.c... > > - Handle qemMonitorOpen failure with INFO message and

Re: [libvirt] [PATCH v5 14/36] qemu_process: Stop retaining Monitor config in qemuProcessQmp

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:08 -0600, Chris Venteicher wrote: > The monitor config data is removed from the qemuProcessQmp struct. > > The monitor config data can be initialized immediately before call to > qemuMonitorOpen and does not need to be maintained after the call > because

[libvirt] [PATCH] util: Fix the default log output to 'journald' when running under systemd

2019-01-03 Thread Erik Skultety
Essentially, bring back the old behaviour as of commit eba36a38 which was later changed by commit ae06048bf5d. Even though all the stderr messages will eventually end up in the journal, we're not making use of the fields journald provides. https://bugzilla.redhat.com/show_bug.cgi?id=1592644

Re: [libvirt] [PATCH v5 13/36] qemu_process: Setup paths within qemuProcessQmpInit

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:07 -0600, Chris Venteicher wrote: > Move code for setting paths and prepping file system from > qemuProcessQmpNew to qemuProcessQmpInit. > > This keeps qemuProcessQmpNew limited to data structures > and path initialization is done in qemuProcessQmpInit. > > The

Re: [libvirt] [PATCH v5 12/36] qemu_process: Store libDir in qemuProcessQmp struct

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:06 -0600, Chris Venteicher wrote: > Store libDir path in the qemuProcessQmp struct in anticipation of moving > path construction code into qemuProcessQmpInit function. > > Signed-off-by: Chris Venteicher > --- > src/qemu/qemu_process.c | 8 +--- >

Re: [libvirt] [PATCH v5 11/36] qemu_process: Collect monitor code in single function

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:05 -0600, Chris Venteicher wrote: > qemuMonitor code lives in qemuProcessQmpConnectMonitor rather than in > qemuProcessQmpNew and qemuProcessQmpLaunch. > > This is consistent with existing structure in qemu_process.c where > qemuConnectMonitor function contains

Re: [libvirt] [PATCH v5 10/36] qemu_process: Introduce qemuProcessQmpStart

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:04 -0600, Chris Venteicher wrote: > Move a step closer to the function structure used elsewhere in > qemu_process where qemuProcessStart and qemuProcessStop are the exposed > functions. > > qemuProcessQmpStart mirrors qemuProcessStart in calling sub functions to >

Re: [libvirt] [PATCH] maint: update gnulib

2019-01-03 Thread no-reply
Hi, This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below: Subject: [libvirt] [PATCH] maint: update gnulib Message-id: 20190103140002.10947-1-ebl...@redhat.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be

Re: [libvirt] [PATCH v5 08/36] qemu_process: All ProcessQMP errors are fatal

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:02 -0600, Chris Venteicher wrote: > In the past capabilities could be determined in other ways if QMP > messaging didn't succeed so a non-fatal error case was included in the > capabilities and QMP Process code. > > For a while now, QMP capabilities failure has been

Re: [libvirt] [PATCH v5 09/36] qemu_process: Persist stderr in qemuProcessQmp struct

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:03 -0600, Chris Venteicher wrote: > A qemuProcessQmp struct tracks the entire lifespan of a single QEMU Process > including storing error output when the process terminates or activation > fails. > > Error output remains available until qemuProcessQmpFree is called.

Re: [libvirt] [PATCH v5 07/36] qemu_process: Use qemuProcessQmp struct for a single process

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:01 -0600, Chris Venteicher wrote: > In new process code, move from model where qemuProcessQmp struct can be > used to activate a series of Qemu processes to model where one > qemuProcessQmp struct is used for one and only one Qemu process. > > By allowing only one

Re: [libvirt] [PATCH v5 06/36] qemu_capabilities: Stop QEMU process before freeing

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:10:00 -0600, Chris Venteicher wrote: > virQEMUCapsInitQMP now stops QEMU process in all execution paths, > before freeing the process structure. > > The qemuProcessQmpStop function can be called multiple times without > problems... Won't attempt to stop processes and

Re: [libvirt] [PATCH v5 05/36] qemu_process: Use consistent name for stop process function

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:09:59 -0600, Chris Venteicher wrote: > s/qemuProcessQmpAbort/qemuProcessQmpStop/ applied to change function name > used to stop QEMU processes in process code moved from qemu_capabilities. > > No functionality change. > > The new name, qemuProcessQmpStop, is consistent

Re: [libvirt] [PATCH v5 04/36] qemu_process: Refer to proc not cmd in process code

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:09:58 -0600, Chris Venteicher wrote: > s/cmd/proc/ in process code imported from qemu_capabilities. > > No functionality is changed. Just variable renaming. > > Process code imported from qemu_capabilities was oriented around > starting a process to issue a single QMP

Re: [libvirt] [PATCH v5 03/36] qemu_process: Limit qemuProcessQmpNew to const input strings

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:09:57 -0600, Chris Venteicher wrote: > Add the const qualifier on non modified strings > (string only copied inside qemuProcessQmpNew) > so that const strings can be used directly in calls to > qemuProcessQmpNew in future patches. > > Signed-off-by: Chris Venteicher >

Re: [libvirt] [PATCH v5 02/36] qemu_process: Use qemuProcessQmp prefix

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:09:56 -0600, Chris Venteicher wrote: > s/virQEMUCapsInitQMPCommand/qemuProcessQmp/ Please, use qemuProcessQMP prefix as suggested in my previous review. There are several reasons for this: - QMP is not a word, it's the abbreviation for QEMU Monitor Protocol - we

Re: [libvirt] [PATCH v5 01/36] qemu_process: Move process code from qemu_capabilities to qemu_process

2019-01-03 Thread Jiri Denemark
On Sun, Dec 02, 2018 at 23:09:55 -0600, Chris Venteicher wrote: > Qemu process code in qemu_capabilities.c is moved to qemu_process.c in > order to make the code usable outside the original capabilities > usecases. > > The moved code activates and manages Qemu processes without > establishing a

[libvirt] [PATCH] maint: update gnulib

2019-01-03 Thread Eric Blake
In particular, this incorporates Roman's patches to allow 'make syntax-check' to work on BSD with its exec argv limitations that previously failed when trying to grep the large number of files present in libvirt. Signed-off-by: Eric Blake --- Really just two changes since the new year copyright

Re: [libvirt] [PATCH] Remove even more Author(s): lines from source files

2019-01-03 Thread Erik Skultety
On Wed, Jan 02, 2019 at 07:11:44PM +0100, Michal Privoznik wrote: > In 600462834f4ec1955a9a4 we've tried to remove Author(s): lines > from comments at the beginning of our source files. Well, in some > files while we removed the "Author" line we did not remove the > actual list of authors. > >