similar to: [libnbd PATCH] nbdsh: Add --opt-mode command line option

Displaying 20 results from an estimated 1100 matches similar to: "[libnbd PATCH] nbdsh: Add --opt-mode command line option"

2019 Sep 12
1
[libnbd PATCH v2] nbdsh: Prefer --uri over --connect
Typing nbdsh --con (the minimum to get an unambiguous prefix for --connect, different from --command) is annoying compared to having a short option. Since it takes a URI as an argument, using -u/--uri is a nicer mnemonic. We still accept --connect for back-compat, and document it in the man page, but omit it from --help as the new spelling is nicer all around. --- Here's what things evolved
2019 Sep 12
2
[libnbd PATCH] nbdsh: Add -b option to simplify h.block_status
We decided to not request the "base:allocation" context by default (if a client wants to use block_status on a different context, then they'd have to get any default request out of the way); however, block status is useless without at least one meta context. This adds a convenience knob for requesting that, and has the nice benefit of working with the --connect command line option
2019 Sep 12
1
[libnbd PATCH] nbdsh: Support -u as synonym for --connect
Typing nbdsh --con (the minimum to get an unambiguous prefix for --connect, different from --command) is annoying compared to having a short option. Since it takes a URI as an argument, using -u seems like a reasonable mnemonic. --- sh/nbdsh.pod | 6 ++++-- python/nbdsh.py | 2 +- sh/test-context.sh | 8 ++++---- sh/test-pattern.sh | 2 +- 4 files changed, 10 insertions(+), 8
2022 Nov 04
3
[libnbd PATCH v2 0/3] Improve nbdsh -u handling
v1 was here: https://listman.redhat.com/archives/libguestfs/2022-October/030216.html Since then, I've incorporated changes based on Rich's feedback: swap order of patches 2 and 3 less change in patch 1 (including no unsafe eval(%s) for --uri) in patch 2, include -c in list of snippets to store, and use dict of lambdas to map back to the desired action Eric Blake (3): nbdsh:
2020 Sep 05
1
Re: libnbd completion callback question
On 9/5/20 8:56 AM, Eric Blake wrote: > Thinking about it more, it is probably easiest to just declare that we > guarantee the cleanup callback is called regardless of failure mode, for > all closures, and that we merely had a memory leak in earlier libnbd > releases.  Yes, this means that we have a risk of older apps hitting a > double free if they cleaned up after a cookie of
2019 Sep 12
2
[libnbd PATCH] nbdsh: Start adding unit tests
Ultimately, I'd like to add a unit test covering our recent fix for handling globals from consecutive -c, but let's start with a simple test that --help output is sane. Sanity includes a mention of the man page for more details (similar to nbdkit --help, although I couldn't figure out how to make python's argparse output that sentence last). --- python/nbdsh.py | 3 ++-
2020 Sep 28
0
[libnbd PATCH 1/3] api: Add get_nr_meta_contexts, clear_meta_contexts
An upcoming commit will add the ability to query which meta contexts a server is advertising; but first we need to be able to present a different list of meta context requests in response to what we learn from the server. Add APIs for reviewing which requests have already been registered, as well as a way to reset the list of requests. This adds some testsuite coverage; and more will appear with
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
On Mon, Aug 10, 2020 at 1:51 PM Richard W.M. Jones <rjones@redhat.com> wrote: > > --- > plugins/python/nbdkit-python-plugin.pod | 19 ++++++- > plugins/python/python.c | 75 +++++++++++++++++++++++++ > tests/test-python-plugin.py | 8 ++- > tests/test_python.py | 73 +++++++++++++++++++++++- > 4 files changed, 169
2019 Sep 05
0
[PATCH libnbd] generator: Move first_version fields to a single table.
See discussion in this and following messages: https://www.redhat.com/archives/libguestfs/2019-September/msg00020.html --- generator/generator | 131 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 121 insertions(+), 10 deletions(-) diff --git a/generator/generator b/generator/generator index 1cc5c19..8a3905f 100755 --- a/generator/generator +++ b/generator/generator @@ -845,9
2020 Aug 10
5
[PATCH nbdkit] python: Implement can_extents + extents.
--- plugins/python/nbdkit-python-plugin.pod | 19 ++++++- plugins/python/python.c | 75 +++++++++++++++++++++++++ tests/test-python-plugin.py | 8 ++- tests/test_python.py | 73 +++++++++++++++++++++++- 4 files changed, 169 insertions(+), 6 deletions(-) diff --git a/plugins/python/nbdkit-python-plugin.pod b/plugins/python/nbdkit-python-plugin.pod
2020 Feb 10
0
[libnbd PATCH 1/1] generator: Add support for NBD_INFO_INIT_STATE extension
The NBD protocol is adding an extension for servers to report the initial state of the image (for now, whether it is sparse and/or reads as all zeroes). Time to expose this to clients, via the new API nbd_get_init_flags(). The patch requires refreshing the nbd-protocol.h file from a corresponding contemporary nbdkit commit. Testing is possible with recent enough qemu. --- .gitignore
2020 Sep 22
3
[libnbd PATCH v2] nbdsh: Catch nbd.Error from -c arguments
When using nbdsh for scripting, it is convenient to let nbdsh fail with status 1 when encountering an API failure. However, doing so by letting the nbd.Error exception leak all the way causes ABRT (at least on Fedora 32 with abrt-python3-handler installed) to assume the program crashed from a programming error, and needlessly complicates clients to have to add try: blocks. Better is if nbdsh
2020 Sep 18
1
[libnbd PATCH] nbdsh: Hide nbd.Error from abrt-python3-handler
When using nbdsh for scripting, it is convenient to let nbdsh fail with status 1 when encountering an API failure. However, doing so by letting the nbd.Error exception leak all the way causes ABRT (on Fedora 32 at least) to assume the program crashed from a programming error, and needlessly complicates clients to have to add try: blocks. Better is if nbdsh itself prints the same stack trace that
2019 Sep 11
0
[PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
nbdsh has some advantages over qemu-io: - scriptable - allows us to more finely control NBD commands, such as making subsector-sized requests and controlling how many commands are sent on the wire - can write controlled patterns - can read NBD export flags --- README | 2 ++ tests/Makefile.am | 5 +++-- tests/test-error0.sh | 13 +++++++------
2020 Sep 11
0
[libnbd PATCH v2 3/5] api: Add nbd_set_strict_mode
Right now, libnbd has refused to issue a command not advertised as supported by a server, mainly because the NBD protocol does not guarantee what the server will do, and libnbd would rather stay in sync with the server than drop the connection. However, for integration purposes, it can be handy to coerce libnbd into sending something to see how the server will react (whether it be an extension
2020 Jul 10
0
[RFC nbdkit PATCH] server: Allow --run with --vsock
Now that kernels support vsock loopback, we have no reason to forbid --vsock with --run. Signed-off-by: Eric Blake <eblake@redhat.com> --- I'm hoping to commit something like this, but right now, the testsuite is failing more times than it succeeds, with: + port=1082294412 + nbdkit --vsock --port 1082294412 memory 1M --run 'sleep 1; nbdsh -u "$uri" -c
2019 Oct 01
0
[nbdkit PATCH 6/6] tests: Test retry after partial extents
Add coverage for the previous patch. Each retry of .extents must be into a fresh extents object, to avoid mismatch between provided and expected offsets. Signed-off-by: Eric Blake <eblake at redhat.com> --- tests/Makefile.am | 2 + tests/test-retry-extents.sh | 114 ++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100755
2020 May 20
1
Re: [PATCH nbdkit] tests/test-truncate4.sh: Rewrite to use nbdsh.
On 5/20/20 7:50 AM, Richard W.M. Jones wrote: > The old test relied on issuing an asynchronous command to a qemu-io > subprocess, requiring a sleep to ensure that the command had been > carried out. ‘sleep 1’ was not long enough on s390x as you can see > from this partial trace: Nice analysis. > Here are still connecting to nbdkit from "connection A", long after >
2020 Aug 19
3
[libnbd PATCH 0/2] NBD_OPT_INFO support
This replaces 13/13 of my v2 series; and now that it has pretty good testsuite coverage and demonstrable performance improvement to nbdinfo, I'm going ahead and pushing this now. We may still want to add further nbd_opt_* commands for other fine-grained tuning of negotiation, but for now, I think things have stabilized on this end, and I can return to polishing .list_exports on the nbdkit
2019 Sep 12
1
[libnbd PATCH] nbdsh: Add test of handling globals in -c
Test that we can script the read of a specific pattern from nbdkit. Also, test that we can concatenate global functions through consecutive -c. This test fails if commit d6cbd130 is reverted. --- sh/Makefile.am | 5 ++++- sh/test-dump.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100755 sh/test-dump.sh diff --git