From aec21d31756cbda4ad1d0fc5c60797d2c1eecf33 Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Thu, 25 Jul 2019 12:49:37 +0300 Subject: qapi: Add InetSocketAddress member keep-alive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's needed to provide keepalive for nbd client to track server availability. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20190725094937.32454-1-vsementsov@virtuozzo.com> Reviewed-by: Markus Armbruster Acked-by: Daniel P. Berrangé [eblake: Fix error message typo] Signed-off-by: Eric Blake --- qapi/sockets.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'qapi') diff --git a/qapi/sockets.json b/qapi/sockets.json index fc81d8d5e8..32375f3a36 100644 --- a/qapi/sockets.json +++ b/qapi/sockets.json @@ -53,6 +53,9 @@ # # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6 # +# @keep-alive: enable keep-alive when connecting to this socket. Not supported +# for passive sockets. (Since 4.2) +# # Since: 1.3 ## { 'struct': 'InetSocketAddress', @@ -61,7 +64,8 @@ '*numeric': 'bool', '*to': 'uint16', '*ipv4': 'bool', - '*ipv6': 'bool' } } + '*ipv6': 'bool', + '*keep-alive': 'bool' } } ## # @UnixSocketAddress: -- cgit v1.2.3 From b172ae2e0ed38a1d058babe6a788f97c402e0e51 Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Tue, 18 Jun 2019 14:43:23 +0300 Subject: block/nbd: add cmdline and qapi parameter reconnect-delay Reconnect will be implemented in the following commit, so for now, in semantics below, disconnect itself is a "serious error". Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20190618114328.55249-5-vsementsov@virtuozzo.com> [eblake: slipped from 4.1 to 4.2] Signed-off-by: Eric Blake --- qapi/block-core.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'qapi') diff --git a/qapi/block-core.json b/qapi/block-core.json index 0d43d4f37c..f1e7701fbe 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -3860,13 +3860,22 @@ # traditional "base:allocation" block status (see # NBD_OPT_LIST_META_CONTEXT in the NBD protocol) (since 3.0) # +# @reconnect-delay: On an unexpected disconnect, the nbd client tries to +# connect again until succeeding or encountering a serious +# error. During the first @reconnect-delay seconds, all +# requests are paused and will be rerun on a successful +# reconnect. After that time, any delayed requests and all +# future requests before a successful reconnect will +# immediately fail. Default 0 (Since 4.2) +# # Since: 2.9 ## { 'struct': 'BlockdevOptionsNbd', 'data': { 'server': 'SocketAddress', '*export': 'str', '*tls-creds': 'str', - '*x-dirty-bitmap': 'str' } } + '*x-dirty-bitmap': 'str', + '*reconnect-delay': 'uint32' } } ## # @BlockdevOptionsRaw: -- cgit v1.2.3