similar to: [libnbd PATCH] nbdsh: Add -b option to simplify h.block_status

Displaying 20 results from an estimated 1000 matches similar to: "[libnbd PATCH] nbdsh: Add -b option to simplify h.block_status"

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
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
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 28
2
[libnbd PATCH] nbdsh: Add --opt-mode command line option
Similar to --base-allocation, this is a common enough configuration that cannot be performed with -c when using --uri, but which makes life easier in scripting. And like --base-allocation, I'm starting with only a long option spelling, rather than burning a short option letter. --- sh/nbdsh.pod | 21 +++++++++++++++++++-- python/nbdsh.py | 6 ++++++ sh/test-context.sh | 32
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 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
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
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
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
2023 Jan 31
1
[libnbd PATCH v2 3/3] nbdsh: Improve --help and initial banner contents.
On Tue, Jan 31, 2023 at 01:33:25PM +0200, Nir Soffer wrote: > On Tue, Jan 31, 2023 at 12:34 AM Richard W.M. Jones <rjones at redhat.com> wrote: > > > > On Fri, Nov 04, 2022 at 04:18:31PM -0500, Eric Blake wrote: > > > Document all options in --help output. If -n is not in use, then > > > enhance the banner to print the current state of h, and further tailor
2023 Jan 31
1
[libnbd PATCH v2 3/3] nbdsh: Improve --help and initial banner contents.
On Tue, Jan 31, 2023 at 11:52:27AM +0000, Richard W.M. Jones wrote: > On Tue, Jan 31, 2023 at 01:33:25PM +0200, Nir Soffer wrote: > > On Tue, Jan 31, 2023 at 12:34 AM Richard W.M. Jones <rjones at redhat.com> wrote: > > > > > > On Fri, Nov 04, 2022 at 04:18:31PM -0500, Eric Blake wrote: > > > > Document all options in --help output. If -n is not in
2020 Jul 22
2
Re: [PATCH nbdkit] server: Deprecate the -e/--exportname parameter.
On 7/21/20 12:46 PM, Eric Blake wrote: >> (2) The --run option no longer sets $exportname (to -e) nor puts the >>      export name into the $uri.  However this was always the wrong >>      thing to do since export names are per connection, not per server. >>      Existing --run scripts will see $exportname expand to "" which is >>      most likely what they
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 Sep 05
2
libnbd completion callback question
I noticed while reading the code that we have a documentation hole that may cause memory leaks for clients that are unaware, in relation to completion callbacks. The situation arises as follows: for all commands with a completion callback, I checked that the code has clean semantics: either nbd_aio_FOO() returns -1 and we never call the callback cleanup, or nbd_aio_FOO() returns a cookie and
2020 Feb 10
1
[nbdkit PATCH] split: Add support for .extents
Copies somewhat from the file plugin, with the difference that we always provide an .extents even if one or more of the split files does not support SEEK_HOLE. Testing is possible on a file system that supports sparse files when using nbdsh. Signed-off-by: Eric Blake <eblake@redhat.com> --- I'm going ahead and committing this, but am also posting this for review in case we later find
2023 Feb 24
1
no way to force-close NBD handle in nbdsh
I'm out of time this weekend, but while trying to write a test for an nbdkit bug fix (a nasty assertion failure when the client disconnects uncleanly without NBD_CMD_DISC, which is what nbdcopy does if it gets an EIO read response from the server), I realized it is extremely hard to trigger this using nbdsh, but easy to do in C or the Go bindings. In the Go bindings, we intentionally coded
2019 Jun 17
2
[nbdkit PATCH] extents: Cap maximum reply length
A devious plugin can cause an 8-fold increase in the reply size in relation to the request size, by alternating status every byte of the request. In the worst case, this can cause the client to reject our response and kill the connection because the response is too large. What's more, it consumes a lot of memory to track that many extents. Let's put an upper bound on the maximum number of
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 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