[PATCH] virsh: Mention no effect for the --atomic flag in QEMU

2021-01-26 Thread Han Han
According to commit aa65f0f2f1, all logic connected to the VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC has been removed. Mention that in virsh manpages. Signed-off-by: Han Han --- docs/manpages/virsh.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manpages/virsh.rst

Re: [PATCH] virsh: Mention no effect for the --atomic flag in QEMU

2021-01-26 Thread Peter Krempa
On Tue, Jan 26, 2021 at 16:31:19 +0800, Han Han wrote: > According to commit aa65f0f2f1, all logic connected to the > VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC has been removed. Mention that in > virsh manpages. > > Signed-off-by: Han Han > --- > docs/manpages/virsh.rst | 2 +- > 1 file changed, 1

Re: [PATCH] qemu: Replace deprecated short-form boolean options

2021-01-26 Thread Peter Krempa
On Tue, Jan 26, 2021 at 11:55:25 +0800, Han Han wrote: > Since the commit ccd3b3b811 of QEMU, the short-form boolean options in > qemu cmdline like "server", "nowait", "disable-ticketing" are deprecated: > > qemu-system-x86_64: -chardev socket,id=charmonitor,fd=38,server,nowait: > warning:

Re: [PATCH] qemu: Replace deprecated short-form boolean options

2021-01-26 Thread Paolo Bonzini
On 26/01/21 04:55, Han Han wrote: Since the commit ccd3b3b811 of QEMU, the short-form boolean options in qemu cmdline like "server", "nowait", "disable-ticketing" are deprecated There are a few more: 1) -vnc password, -vnc tls, -vnc sasl: if (graphics->data.vnc.auth.passwd ||

Re: [PATCH] qemu: Replace deprecated short-form boolean options

2021-01-26 Thread Ján Tomko
On a Tuesday in 2021, Han Han wrote: Since the commit ccd3b3b811 of QEMU, the short-form boolean options in qemu cmdline like "server", "nowait", "disable-ticketing" are deprecated: Please separate the changes for chardevs (server and nowait usually occur on the same line in the tests anyway)

Re: [PATCHv2] Fix format network dns doc

2021-01-26 Thread Andrea Bolognani
On Tue, 2021-01-26 at 09:50 +0100, Cédric Bosdonnat wrote: > The code block on the srv name in the formatnetwork page is confusing > since the actual parameter is service. Moving the code block to the > service work makes it better. > --- > > Diff to v1: > * remove the word 'name' > >

Re: [libvirt PATCH] gitlab: force dwarf4 format for debuginfo in Fedora rawhide

2021-01-26 Thread Daniel P . Berrangé
On Tue, Jan 26, 2021 at 12:58:10PM +0100, Erik Skultety wrote: > On Mon, Jan 25, 2021 at 06:52:12PM +, Daniel P. Berrangé wrote: > > Fedora 34 rawhide has pulled in a new GCC 11 build which now > > defaults to dwarf5 format. This format is not compatible with > > the pdwtags program used in

[PATCH 6/9] vshReadlineParse: Escape list of candidates earlier

2021-01-26 Thread Michal Privoznik
The way our completer callbacks work is that they return all possible candidates and then vshCompleterFilter() is called to prune the list of all candidates removing those which don't match user's input. This allows us to have simpler completer callbacks as their only job is to fetch all possible

[PATCH 9/9] tools: Set IFS for bash completion script

2021-01-26 Thread Michal Privoznik
The way our bash completion string is that is gets user's input and lets virsh completion code do all the work by calling 'virsh complete -- $INPUT". The 'complete' command is a "secret", unlisted command that exists solely for this purpose. After it has done it's part, it prints candidates onto

[PATCH 2/9] vsh: Don't break word on backslash

2021-01-26 Thread Michal Privoznik
A backslash is the way we escape characters in virsh. For instance: virsh # start domain\ with\ long\ name For readline completion, we do not want to get four separate words ("domain", "with", "long", "name"). This means, that we can't sue virBufferEscapeShell() because it doesn't escape

Re: [PATCH 00/12] virStorageSource cleanups part 1

2021-01-26 Thread Pavel Hrdina
On Mon, Jan 25, 2021 at 05:05:12PM +0100, Peter Krempa wrote: > Peter Krempa (12): > virStorageSourceGetBackingStoreStr: Move the function earlier > virStorageSourceGetBackingStoreStr: Return relative paths only > util: virstoragefile: Move virStorageIs[File|Relative] to > storage_source

Re: [libvirt PATCH] gitlab: force dwarf4 format for debuginfo in Fedora rawhide

2021-01-26 Thread Erik Skultety
On Mon, Jan 25, 2021 at 06:52:12PM +, Daniel P. Berrangé wrote: > Fedora 34 rawhide has pulled in a new GCC 11 build which now > defaults to dwarf5 format. This format is not compatible with > the pdwtags program used in our test suite to validate the > RPC files. > > We have no need for

Re: [libvirt PATCH] gitlab: force dwarf4 format for debuginfo in Fedora rawhide

2021-01-26 Thread Erik Skultety
On Tue, Jan 26, 2021 at 12:34:09PM +, Daniel P. Berrangé wrote: > On Tue, Jan 26, 2021 at 12:58:10PM +0100, Erik Skultety wrote: > > On Mon, Jan 25, 2021 at 06:52:12PM +, Daniel P. Berrangé wrote: > > > Fedora 34 rawhide has pulled in a new GCC 11 build which now > > > defaults to dwarf5

Re: [libvirt PATCH 00/16] expose tainting and deprecations in public API

2021-01-26 Thread Daniel P . Berrangé
On Mon, Jan 25, 2021 at 02:41:06PM -0500, Eduardo Habkost wrote: > Related question: does libvirt generate any kind of structured > log records, or all log examples below are going to be stored in > plain text only? Log files are plain text. The API proposals here are what provide any formal data

[PATCH 3/9] vshReadlineParse: Bring some variables into !state block

2021-01-26 Thread Michal Privoznik
On readline completion vshReadlineCompletion() is called which does nothing more than calling rl_completion_matches() with vshReadlineParse() as a callback. This means, that vshReadlineParse() is called repeatedly, each time returning next completion candidate, until it returns NULL which is

[PATCHv2] Fix format network dns doc

2021-01-26 Thread Cédric Bosdonnat
The code block on the srv name in the formatnetwork page is confusing since the actual parameter is service. Moving the code block to the service work makes it better. --- Diff to v1: * remove the word 'name' docs/formatnetwork.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 4/9] vshReadlineParse: Use g_auto*()

2021-01-26 Thread Michal Privoznik
Instead of freeing @partial and @buf explicitly, we can use g_auto*() to do that automatically. Signed-off-by: Michal Privoznik --- tools/vsh.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index ba6299aae4..9a7ca6776b 100644 ---

[PATCH 5/9] vshReadlineParse: Rename @buf to @line

2021-01-26 Thread Michal Privoznik
In next commit the block that does escaping of returned string will be brought into this block. But both contain variable @buf and use it in different contexts. Rename @buf from @state == 0 block to @line which reflects its purpose better. Signed-off-by: Michal Privoznik --- tools/vsh.c | 6

[PATCH 0/9] Fix a slightly rework auto completion

2021-01-26 Thread Michal Privoznik
These fixes were inspired by: https://gitlab.com/libvirt/libvirt/-/issues/116 Michal Prívozník (9): vshCommandStringGetArg: Drop @sz vsh: Don't break word on backslash vshReadlineParse: Bring some variables into !state block vshReadlineParse: Use g_auto*() vshReadlineParse: Rename @buf

[PATCH 7/9] vsh: Rework how option to complete is found

2021-01-26 Thread Michal Privoznik
The way that auto completion works currently is that user's input is parsed, and then we try to find the first --option (in the parsed structure) that has the same value as user's input around where was pressed. For instance, for the following input: virsh # command --arg1 hello --arg2 world

[PATCH 1/9] vshCommandStringGetArg: Drop @sz

2021-01-26 Thread Michal Privoznik
This variable is unused since introduction of the function in v0.8.5~150. Signed-off-by: Michal Privoznik --- tools/vsh.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index badd37c08e..54253afa72 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -1608,7 +1608,6 @@

[PATCH 8/9] vsh: Allow double quotes imbalance for auto completion in vshCommandStringGetArg()

2021-01-26 Thread Michal Privoznik
If user is trying to auto complete a value that contains a space, they have two options: use backslash to escape space or use qotes, like this: virsh # start --domain "domain with space However, in this case our tokenizer sees imbalance in (double) quotes: there is a starting one that's

Re: [PATCH 0/9] Fix a slightly rework auto completion

2021-01-26 Thread Ján Tomko
On a Tuesday in 2021, Michal Privoznik wrote: These fixes were inspired by: https://gitlab.com/libvirt/libvirt/-/issues/116 Michal Prívozník (9): vshCommandStringGetArg: Drop @sz vsh: Don't break word on backslash vshReadlineParse: Bring some variables into !state block vshReadlineParse:

Re: [libvirt PATCH] qemu: Avoid segfault when driver initialization fails

2021-01-26 Thread Michal Privoznik
On 1/26/21 5:08 PM, Jiri Denemark wrote: In case qemuStateInitialize fails for any reason (e.g., a typo in qemu.conf), it properly cleans up after itself and sets qemu_driver back to NULL. A tiny bit later the daemon asks all drivers to shutdown by calling their stateShutdown* APIs. But the

Re: [PATCH] qemu: Avoid crash in qemuStateShutdownPrepare() and qemuStateShutdownWait()

2021-01-26 Thread Jiri Denemark
On Fri, Jan 22, 2021 at 14:09:52 +0300, Nikolay Shirokovskiy wrote: > On Fri, Jan 22, 2021 at 12:45 PM Michal Privoznik > wrote: > > > If libvirtd is sent SIGTERM while it is still initializing, it > > may crash. The following scenario was observed (using 'stress' to > > slow down CPU so much

[libvirt PATCH] qemu: Avoid segfault when driver initialization fails

2021-01-26 Thread Jiri Denemark
In case qemuStateInitialize fails for any reason (e.g., a typo in qemu.conf), it properly cleans up after itself and sets qemu_driver back to NULL. A tiny bit later the daemon asks all drivers to shutdown by calling their stateShutdown* APIs. But the implementation of these APIs in QEMU driver

Re: [PATCH 8/9] vsh: Allow double quotes imbalance for auto completion in vshCommandStringGetArg()

2021-01-26 Thread Ján Tomko
On a Tuesday in 2021, Michal Privoznik wrote: If user is trying to auto complete a value that contains a space, they have two options: use backslash to escape space or use qotes, like this: virsh # start --domain "domain with space However, in this case our tokenizer sees imbalance in

Re: [libvirt PATCH] qemu: Avoid segfault when driver initialization fails

2021-01-26 Thread Jiri Denemark
On Tue, Jan 26, 2021 at 17:41:54 +0100, Michal Privoznik wrote: > On 1/26/21 5:08 PM, Jiri Denemark wrote: > > In case qemuStateInitialize fails for any reason (e.g., a typo in > > qemu.conf), it properly cleans up after itself and sets qemu_driver back > > to NULL. A tiny bit later the daemon

Re: [PATCH 2/9] vsh: Don't break word on backslash

2021-01-26 Thread Ján Tomko
On a Tuesday in 2021, Michal Privoznik wrote: A backslash is the way we escape characters in virsh. For instance: virsh # start domain\ with\ long\ name For readline completion, we do not want to get four separate words ("domain", "with", "long", "name"). This means, that we can't sue

Re: [PATCH 6/9] vshReadlineParse: Escape list of candidates earlier

2021-01-26 Thread Ján Tomko
On a Tuesday in 2021, Michal Privoznik wrote: The way our completer callbacks work is that they return all possible candidates and then vshCompleterFilter() is called to prune the list of all candidates removing those which don't match user's input. This allows us to have simpler completer

Re: [PATCH 3/9] vshReadlineParse: Bring some variables into !state block

2021-01-26 Thread Ján Tomko
On a Tuesday in 2021, Michal Privoznik wrote: On readline completion vshReadlineCompletion() is called which does nothing more than calling rl_completion_matches() with vshReadlineParse() as a callback. This means, that vshReadlineParse() is called repeatedly, each time returning next completion

Re: [PATCH] qemu: Replace deprecated short-form boolean options

2021-01-26 Thread Han Han
On Tue, Jan 26, 2021 at 6:07 PM Paolo Bonzini wrote: > On 26/01/21 04:55, Han Han wrote: > > Since the commit ccd3b3b811 of QEMU, the short-form boolean options in > > qemu cmdline like "server", "nowait", "disable-ticketing" are > > deprecated > > There are a few more: > > Thank you for