search for: opt_go

Displaying 20 results from an estimated 52 matches for "opt_go".

2019 Sep 11
1
Re: [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
...bd_connect_uri: negotiated structured replies on this connection libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.CHECK_REPLY -> NEWSTYLE.OPT_SET_META_CONTEXT.START libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_SET_META_CONTEXT.START -> NEWSTYLE.OPT_GO.START libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.START -> NEWSTYLE.OPT_GO.SEND libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.SEND -> NEWSTYLE.OPT_GO.SEND_EXPORTNAMELEN libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.SEND_EXPORTNAMEL...
2019 Sep 11
4
[PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
Very much a work in progress as there are still many tests using qemu-io which are candidates for conversion. You'll notice at the end of test-full.sh that the new test has some duplicated code which looks as if it ought to be refactored into a Python function. When I tried to do that, I got loads of strange Python problems which may indicate bugs in nbdsh itself or problems with my
2019 Sep 19
1
Re: [nbdkit PATCH 4/4] server: Fix OPT_GO on different export than SET_META_CONTEXT
ACK series, thanks. It seems worth raising the assert failure with Red Hat's Security team since it is a viable DoS attack on nbdkit servers. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the
2019 Sep 28
0
[nbdkit PATCH v2 6/7] server: Fix OPT_GO on different export than SET_META_CONTEXT
The NBD spec says that if a client requests SET_META_CONTEXT for exportA, but later requests NBD_OPT_GO/EXPORT_NAME for exportB, then the server should reject NBD_CMD_BLOCK_STATUS requests (that is, the context returned for exportA need not apply to exportB). When we originally added base:allocation, our argument was that we always ignore export names, so it was easier to just treat any two export n...
2019 Sep 19
0
[nbdkit PATCH 4/4] server: Fix OPT_GO on different export than SET_META_CONTEXT
The NBD spec says that if a client requests SET_META_CONTEXT for exportA, but later requests NBD_OPT_GO/EXPORT_NAME for exportB, then the server should reject NBD_CMD_BLOCK_STATUS requests (that is, the context returned for exportA need not apply to exportB). When we originally added base:allocation, our argument was that we always ignore export names, so it was easier to just treat any two export n...
2020 Sep 28
0
[libnbd PATCH 3/3] api: Add nbd_opt_list_meta_context
...*) let tls_enum = { @@ -852,7 +857,7 @@ to end the connection without finishing negotiation."; example = Some "examples/list-exports.c"; see_also = [Link "get_opt_mode"; Link "aio_is_negotiating"; Link "opt_abort"; Link "opt_go"; Link "opt_list"; - Link "opt_info"]; + Link "opt_info"; Link "opt_list_meta_context"]; }; "get_opt_mode", { @@ -960,6 +965,56 @@ corresponding L<nbd_opt_go(3)> would succeed.";...
2020 Aug 14
0
[libnbd PATCH v2 12/13] wip: api: Give aio_opt_go a completion callback
Squash this into opt_go? into opt_info? Standalone? Testing: why does python not throw an exception: $ ./run nbdsh Welcome to nbdsh, the shell for interacting with Network Block Device (NBD) servers. The ‘nbd’ module has already been imported and there is an open NBD handle called ‘h’. h.connect_tcp ("remote&quot...
2020 Sep 28
8
[libnbd PATCH 0/3] opt_list_meta_context
I'm posting this now, as I'm at the end of a workday and I got things working for manual experimentation. Still to do: - write interop tests for qemu-nbd and nbdkit (including my proposed patch addition of qemu-nbd -A to show qemu:allocation-depth) - figure out if we can make 'nbdinfo --map' use the new API to automatically select all contexts advertised by the server Eric Blake
2019 Jun 14
10
[libnbd PATCH 0/7] state machine refactoring
I'm still playing with ideas on how to split rstate from wstate (so that we can send a request without waiting for POLLIN to complete a pending reply), but this is some preliminary refactoring I found useful. I also fixed a couple of bugs while in the area (already pushed). There's a question of whether we want nbd_handle to be nearly 5k, or if we should instead keep it small and add one
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
...er half. Eric Blake (13): api: Add nbd_set_full_info and friends info: Improve info without --list api: Add nbd_is_state_negotiating for new state api: Permit several existing API in Negotiating state api: Add nbd_set_opt_mode api: Add nbd_opt_abort and nbd_aio_opt_abort api: Add nbd_opt_go and nbd_aio_opt_go examples: Update list-exports to demonstrate nbd_opt_go info: Simplify by using nbd_opt_go api: Add nbd_opt_list api: Add nbd_aio_opt_list wip: api: Give aio_opt_go a completion callback wip: api: add nbd_opt_info, nbd_aio_opt_info docs/libnbd.pod...
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
2023 Jan 30
1
[libnbd PATCH v2 3/3] nbdsh: Improve --help and initial banner contents.
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 > the advice given on useful next steps to take to mention opt_go when > using --opt-mode. I had to partially revert this patch (reverting most of it) because it unfortunately breaks the implicit handle creation :-( https://gitlab.com/nbdkit/libnbd/-/commit/5a02c7d2cc6a201f9e5531c0c20c2f3c22b805a2 I'm not actually sure how to do this correctly in Python...
2019 Sep 19
7
[nbdkit PATCH 0/4] Spec compliance patches
The first one is the nastiest - it is an assertion failure caused by a spec-compliant client and introduced by our security fix that was released in 1.14.1. Eric Blake (4): server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO server: Fix back-to-back SET_META_CONTEXT server: Forbid NUL in export and context names server: Fix OPT_GO on different export than SET_META_CONTEXT server/internal.h | 5 ++- server/backend.c | 13 ++++++ server/connections.c | 2 +-...
2020 Aug 18
3
[libnbd PATCH v3 0/2] Implementing NBD_OPT_LIST
...(C, python, ocaml, golang). The tests require nbdkit built from git on PATH, and may not be entirely idiomatic, but I at least validated that they catch issues (for example, adding an exit statement near the end of the test reliably caused failure). I'm also working on similar unit testing for opt_go/opt_list; I'm leaning more towards having opt_go have a completion handler, if only because opt_list has to have one (with opt_go, you can tell by whether the state is negotiating vs. ready whether it passed or failed, but with info, the state is always negotiating either way). That should get...
2023 Jan 31
1
[libnbd PATCH v2 3/3] nbdsh: Improve --help and initial banner contents.
...rote: > > 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 > > the advice given on useful next steps to take to mention opt_go when > > using --opt-mode. > > I had to partially revert this patch (reverting most of it) because it > unfortunately breaks the implicit handle creation :-( > > https://gitlab.com/nbdkit/libnbd/-/commit/5a02c7d2cc6a201f9e5531c0c20c2f3c22b805a2 > > I'm not actually su...
2019 Jun 14
0
[libnbd PATCH 5/7] states: Factor out NBD_REP payload prep
...external_events = [ NotifyRead, "" ]; }; diff --git a/generator/states-newstyle-opt-go.c b/generator/states-newstyle-opt-go.c index 2ee739f..3458f09 100644 --- a/generator/states-newstyle-opt-go.c +++ b/generator/states-newstyle-opt-go.c @@ -77,21 +77,13 @@ return 0; NEWSTYLE.OPT_GO.RECV_REPLY: - uint32_t len; - const size_t maxpayload = sizeof h->sbuf.or.payload; - switch (recv_into_rbuf (h)) { case -1: SET_NEXT_STATE (%.DEAD); return -1; case 0: - /* Read the following payload if it is short enough to fit in the - * static buffer. If it's too long,...
2020 Aug 14
0
[libnbd PATCH v2 06/13] api: Add nbd_opt_abort and nbd_aio_opt_abort
...y setting h->current_opt prior to entering NEWSTYLE. We also need a couple of new states to implement NBD_OPT_ABORT; this was not deemed worth a separate sub-group and new states-newstyle-opt-abort.c file, so I just inlined it in NEWSTYLE instead. One nice benefit of these new states: when NBD_OPT_GO fails and we are not in opt mode, or when we require TLS but the server does not support it, we can now hang up gracefully instead of abruptly disconnecting from a newstyle-fixed server. This is observable when using qemu-nbd, in that we now silence the former noise from qemu: $ truncate --size=5...
2020 Oct 02
4
[libnbd PATCH v2 0/2] opt_list_meta_context
In v2: ack'ed preliminary patches have been pushed, and I've added a lot of testsuite coverage as well as putting the new API to use in nbdinfo. Eric Blake (2): api: Add nbd_opt_list_meta_context info: List available meta-contexts lib/internal.h | 1 + generator/API.ml | 84 ++++++++-
2023 Jan 31
1
[libnbd PATCH v2 3/3] nbdsh: Improve --help and initial banner contents.
...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 > > > the advice given on useful next steps to take to mention opt_go when > > > using --opt-mode. > > > > I had to partially revert this patch (reverting most of it) because it > > unfortunately breaks the implicit handle creation :-( > > > > https://gitlab.com/nbdkit/libnbd/-/commit/5a02c7d2cc6a201f9e5531c0c20c2f3c22b805a2 &gt...
2020 Sep 28
2
[libnbd PATCH] nbdsh: Add --opt-mode command line option
...teraction with opt mode +output=$(nbdkit -U - null --run 'nbdsh \ + -u "nbd+unix://?socket=$unixsocket" --opt-mode --base-allocation \ + -c " +try: + h.can_meta_context(nbd.CONTEXT_BASE_ALLOCATION) + assert(False) +except nbd.Error: + pass +" \ + -c "h.opt_go()" \ + -c "print(h.can_meta_context(nbd.CONTEXT_BASE_ALLOCATION))"') +if test "x$output" != xTrue; then + echo "$0: unexpected output: $output" + fail=1 +fi + exit $fail -- 2.28.0