Re: [PATCH v5 31/30] network: use iif/oif instead of iifname/oifname in nftables rules

2024-05-27 Thread Jiri Denemark
On Wed, May 22, 2024 at 23:13:33 -0400, Laine Stump wrote: > > iifname/oifname need to lookup the string that contains the name of > the interface each time a packet is checked, while iif/oif compare the > ifindex of the interface, which is included directly in the > packet. Conveniently, the

Re: [PATCH] fix virLogCleanerParseFilename logic

2024-05-27 Thread David Negreira
Hi Michal, Thank you for your comments and improvements on the patch. > diff --git i/src/logging/log_cleaner.c w/src/logging/log_cleaner.c > index 4ee91843aa..9f987b02b5 100644 > --- i/src/logging/log_cleaner.c > +++ w/src/logging/log_cleaner.c > @@ -82,10 +82,8 @@

[PATCH] virsh: Provide completer for some pool-X-as commands

2024-05-27 Thread Abhiram Tilak
Provides completers for auth-type and source-format commands for virsh pool-create-as and pool-define-as commands. Use Empty completers for options where completions are not required. I left the ones where I was not sure if they need completers. Related Issue:

[libvirt PATCH] qemu_snapshot: fix memory leak when reverting external snapshot

2024-05-27 Thread Pavel Hrdina
The code cleaning up virStorageSource doesn't free data allocated by virStorageSourceInit() so we need to call virStorageSourceDeinit() explicitly. Fixes: 8e664737813378d2a1bdeacc2ca8e942327e2cab Resolves: https://issues.redhat.com/browse/RHEL-33044 Signed-off-by: Pavel Hrdina ---

[PATCH 2/3] tests: Delete some redundant test cases

2024-05-27 Thread Andrea Bolognani
The default-models tests provide coverage for these scenarios now. Signed-off-by: Andrea Bolognani --- .../aarch64-tpm.aarch64-latest.args | 34 - .../aarch64-tpm.aarch64-latest.xml| 29 tests/qemuxmlconfdata/aarch64-tpm.xml | 15

[PATCH 3/3] qemu: Only allow TPM 2.0 for RISC-V guests

2024-05-27 Thread Andrea Bolognani
We've made similar changes for aarch64 a few years back (see d8a1c059e0ed and previous commits), and the rationale is the same: the architecture is new enough that TPM 2.0 predates it, so TPM 1.2 support was never considered and will just not work. Signed-off-by: Andrea Bolognani ---

[PATCH 1/3] tests: Add TPM coverage to default-models tests

2024-05-27 Thread Andrea Bolognani
We have a non-trivial amount of architecture-specific logic dealing with TPM, so it's good to have coverage for it. Note that TPM supports seems to be currently missing from s390x and loongarch64 QEMU builds. I'm not entirely sure whether there's a good reason for that or it's simply an

[PATCH 0/3] qemu: Use TPM 2.0 on RISC-V

2024-05-27 Thread Andrea Bolognani
Andrea Bolognani (3): tests: Add TPM coverage to default-models tests tests: Delete some redundant test cases qemu: Only allow TPM 2.0 for RISC-V guests src/qemu/qemu_domain.c| 1 + src/qemu/qemu_validate.c | 10 +--

Re: [PATCH 2/6] virt-admin: Make --timeout of daemon-timeout positional argument

2024-05-27 Thread Michal Prívozník
On 5/27/24 12:55, Peter Krempa wrote: > On Mon, May 27, 2024 at 11:18:50 +0200, Michal Privoznik wrote: >> We currently require full argument specification: >> >> virt-admin daemon-timeout --timeout X >> >> Well, the '--timeout' feels a bit redundant. Turn the argument >> into a positional so

Re: [PATCH 5/6] vsh: Restore original rl_line_buffer after completion

2024-05-27 Thread Michal Prívozník
On 5/27/24 14:53, Peter Krempa wrote: > On Mon, May 27, 2024 at 11:18:53 +0200, Michal Privoznik wrote: >> Problem with readline is its API. It's basically a bunch of >> global variables with no clear dependencies between them. In this >> specific case that I'm seeing: in interactive mode the >>

Re: [PATCH 6/6] vsh: Don't crash when @text is NULL in vshCompleterFilter()

2024-05-27 Thread Peter Krempa
On Mon, May 27, 2024 at 11:18:54 +0200, Michal Privoznik wrote: > This can happen only for cmdComplete() in interactive mode (which > I'm still not convinced is any useful for users and whether we > should support it). Definitely not useful for any normal user. Came in handy when testing stuff.

Re: [PATCH 5/6] vsh: Restore original rl_line_buffer after completion

2024-05-27 Thread Peter Krempa
On Mon, May 27, 2024 at 11:18:53 +0200, Michal Privoznik wrote: > Problem with readline is its API. It's basically a bunch of > global variables with no clear dependencies between them. In this > specific case that I'm seeing: in interactive mode the > cmdComplete() causes instant crash of

Re: [PATCH 4/6] vsh: Close stderr among with stdin in cmdComplete

2024-05-27 Thread Peter Krempa
On Mon, May 27, 2024 at 11:18:52 +0200, Michal Privoznik wrote: > Our completer callbacks must refrain from printing anything onto > stderr, but unfortunately that's not how service code around > behaves. It may call vshError() and what not. Rather trying to > fix all possible paths (just consider

Re: [PATCH 3/6] bash-completion: Run virsh/virt-admin in quiet mode

2024-05-27 Thread Peter Krempa
On Mon, May 27, 2024 at 11:18:51 +0200, Michal Privoznik wrote: > In some cases (e.g. when virt-admin connects to the default URI) > some info message is printed onto stdout (using vshPrintExtra()). > This hurts user experience, just consider: > > virt-admin > NOTE\:\ Connecting\ to\ default\

Re: [PATCH 2/6] virt-admin: Make --timeout of daemon-timeout positional argument

2024-05-27 Thread Peter Krempa
On Mon, May 27, 2024 at 11:18:50 +0200, Michal Privoznik wrote: > We currently require full argument specification: > > virt-admin daemon-timeout --timeout X > > Well, the '--timeout' feels a bit redundant. Turn the argument > into a positional so that the following works too: > >

Re: [PATCH 1/6] kbase: Use virt-admin daemon-timeout correctly

2024-05-27 Thread Peter Krempa
On Mon, May 27, 2024 at 11:18:49 +0200, Michal Privoznik wrote: > In a few examples we recommend disabling daemon timeout when > fetching debug logs. While it makes sense the actual syntax used > results in an error: > > # virt-admin daemon-timeout 0 > error: unexpected data '0' > > This is

[PATCH 6/6] vsh: Don't crash when @text is NULL in vshCompleterFilter()

2024-05-27 Thread Michal Privoznik
This can happen only for cmdComplete() in interactive mode (which I'm still not convinced is any useful for users and whether we should support it). Anyway, running plain 'complete' command with no additional arguments boils down to @text being NULL in vshReadlineParse() which handles the case

[PATCH 5/6] vsh: Restore original rl_line_buffer after completion

2024-05-27 Thread Michal Privoznik
Problem with readline is its API. It's basically a bunch of global variables with no clear dependencies between them. In this specific case that I'm seeing: in interactive mode the cmdComplete() causes instant crash of virsh/virt-admin: ==27999== Invalid write of size 1 ==27999==at 0x516EF71:

[PATCH 3/6] bash-completion: Run virsh/virt-admin in quiet mode

2024-05-27 Thread Michal Privoznik
In some cases (e.g. when virt-admin connects to the default URI) some info message is printed onto stdout (using vshPrintExtra()). This hurts user experience, just consider: virt-admin NOTE\:\ Connecting\ to\ default\ daemon.\ Specify\ daemon\ using\ -c\ \(e.g.\ virtqemud\:///system\) when

[PATCH 4/6] vsh: Close stderr among with stdin in cmdComplete

2024-05-27 Thread Michal Privoznik
Our completer callbacks must refrain from printing anything onto stderr, but unfortunately that's not how service code around behaves. It may call vshError() and what not. Rather trying to fix all possible paths (just consider opening a connection), just close the stderr. We're already closing

[PATCH 2/6] virt-admin: Make --timeout of daemon-timeout positional argument

2024-05-27 Thread Michal Privoznik
We currently require full argument specification: virt-admin daemon-timeout --timeout X Well, the '--timeout' feels a bit redundant. Turn the argument into a positional so that the following works too: virt-admin daemon-timeout X Signed-off-by: Michal Privoznik ---

[PATCH 0/6] Random fixes

2024-05-27 Thread Michal Privoznik
It started simple - I pointed somebody to debug logs kbase article only to realize our own examples don't work. And ended up fixing bash completion. Fans of 'Malcolm in the Middle' know the feeling. Michal Prívozník (6): kbase: Use virt-admin daemon-timeout correctly virt-admin: Make

[PATCH 1/6] kbase: Use virt-admin daemon-timeout correctly

2024-05-27 Thread Michal Privoznik
In a few examples we recommend disabling daemon timeout when fetching debug logs. While it makes sense the actual syntax used results in an error: # virt-admin daemon-timeout 0 error: unexpected data '0' This is because --timeout is required. Update examples to include it. Signed-off-by:

Re: [PATCH] NEWS: document nftables support in network driver

2024-05-27 Thread Jiri Denemark
On Thu, May 23, 2024 at 22:57:21 -0400, Laine Stump wrote: > Signed-off-by: Laine Stump > --- > NEWS.rst | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/NEWS.rst b/NEWS.rst > index 42b0f88128..14505116b1 100644 > --- a/NEWS.rst > +++ b/NEWS.rst > @@ -33,6 +33,16 @@ v10.4.0