qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org,  kwolf@redhat.com,  hreitz@redhat.com,
	berrange@redhat.com,  qemu-block@nongnu.org,  den@virtuozzo.com,
	andrey.drobyshev@virtuozzo.com,  alexander.ivanov@virtuozzo.com,
	vsementsov@yandex-team.ru
Subject: Re: [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP
Date: Wed, 02 Oct 2024 15:49:02 +0200	[thread overview]
Message-ID: <87wmiqy5rl.fsf@pond.sub.org> (raw)
In-Reply-To: <20240809161828.1342831-6-eblake@redhat.com> (Eric Blake's message of "Fri, 9 Aug 2024 11:14:26 -0500")

Eric Blake <eblake@redhat.com> writes:

> Although defaulting the handshake limit to 10 seconds was a nice QoI
> change to weed out intentionally slow clients, it can interfere with
> integration testing done with manual NBD_OPT commands over 'nbdsh
> --opt-mode'.  Expose a QMP knob 'handshake-max-secs' to allow the user
> to alter the timeout away from the default.
>
> The parameter name here intentionally matches the spelling of the
> constant added in commit fb1c2aaa98, and not the command-line spelling
> added in the previous patch for qemu-nbd; that's because in QMP,
> longer names serve as good self-documentation, and unlike the command
> line, machines don't have problems generating longer spellings.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
>  qapi/block-export.json         | 10 ++++++++++
>  include/block/nbd.h            |  6 +++---
>  block/monitor/block-hmp-cmds.c |  4 ++--
>  blockdev-nbd.c                 | 26 ++++++++++++++++++--------
>  4 files changed, 33 insertions(+), 13 deletions(-)
>
> diff --git a/qapi/block-export.json b/qapi/block-export.json
> index ce33fe378df..c110dd375ad 100644
> --- a/qapi/block-export.json
> +++ b/qapi/block-export.json
> @@ -17,6 +17,10 @@
>  #
>  # @addr: Address on which to listen.
>  #
> +# @handshake-max-secs: Time limit, in seconds, at which a client that
> +#     has not completed the negotiation handshake will be disconnected,
> +#     or 0 for no limit (since 9.2; default: 10).
> +#
>  # @tls-creds: ID of the TLS credentials object (since 2.6).
>  #
>  # @tls-authz: ID of the QAuthZ authorization object used to validate
> @@ -34,6 +38,7 @@
>  ##
>  { 'struct': 'NbdServerOptions',
>    'data': { 'addr': 'SocketAddress',
> +            '*handshake-max-secs': 'uint32',
>              '*tls-creds': 'str',
>              '*tls-authz': 'str',
>              '*max-connections': 'uint32' } }
> @@ -52,6 +57,10 @@
>  #
>  # @addr: Address on which to listen.
>  #
> +# @handshake-max-secs: Time limit, in seconds, at which a client that
> +#     has not completed the negotiation handshake will be disconnected,
> +#     or 0 for no limit (since 9.2; default: 10).
> +#
>  # @tls-creds: ID of the TLS credentials object (since 2.6).
>  #
>  # @tls-authz: ID of the QAuthZ authorization object used to validate
> @@ -72,6 +81,7 @@
>  ##
>  { 'command': 'nbd-server-start',
>    'data': { 'addr': 'SocketAddressLegacy',
> +            '*handshake-max-secs': 'uint32',
>              '*tls-creds': 'str',
>              '*tls-authz': 'str',
>              '*max-connections': 'uint32' },

Are we confident we'll never need less than a full second?

[...]



  parent reply	other threads:[~2024-10-02 13:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09 16:14 [PATCH for-9.2 0/2] NBD: tune handshake timeout Eric Blake
2024-08-09 16:14 ` [PATCH 1/2] qemu-nbd: Allow users to adjust handshake limit Eric Blake
2024-10-02 12:41   ` Vladimir Sementsov-Ogievskiy
2024-08-09 16:14 ` [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP Eric Blake
2024-10-02 13:18   ` Vladimir Sementsov-Ogievskiy
2024-10-02 13:49   ` Markus Armbruster [this message]
2024-10-02 13:58     ` Vladimir Sementsov-Ogievskiy
2024-10-02 15:14       ` Markus Armbruster
2024-10-02 15:20         ` Eric Blake
  -- strict thread matches above, loose matches on Subject: below --
2025-02-03 22:26 [PATCH 0/2] nbd: Allow debugging tuning of handshake limit Eric Blake
2025-02-03 22:26 ` [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP Eric Blake
2025-02-05  6:55   ` Markus Armbruster
2025-02-05 20:36     ` Eric Blake
2025-02-06  5:54       ` Markus Armbruster
2025-02-06  7:20   ` Vladimir Sementsov-Ogievskiy
2025-02-10 21:46     ` Eric Blake
2025-02-12 14:33       ` Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmiqy5rl.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=alexander.ivanov@virtuozzo.com \
    --cc=andrey.drobyshev@virtuozzo.com \
    --cc=berrange@redhat.com \
    --cc=den@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).