lib/iscsi: Remove async logout request from iscsi_target_node_redirect()

As written in doc/iscsi.md, typically the login redirection feature
will be used in scale out iSCSI target system, which runs multiple
SPDK iSCSI target applications.

In scale out iSCSI target system, the initial portal, the current
redirect portal, and the next redirect portal are likely to be in
different SPDK iSCSI target applications.

In this case, asynchronous logout request should be sent independently
from the iSCSI target application which has the current redirect portal.

However, we had added asynchronous logout request into the iSCSI target
application which has the next redirect portal. This idea works only
for the case that login is redirected from the initial portal to a
redirect portal.

We remove asynchronous logout request from iscsi_target_node_redirect()
in this patch, and update the corresponding help documents.

The next patch will add an new RPC to send asynchronous logout
request to all connections to the specified portal group and the
specified target.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib0ac72e8cdad7e8c64e446b7495e572fac4b5bae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3779
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Shuhei Matsumoto 2020-08-14 10:41:36 +09:00 committed by Tomasz Zawadzki
parent 7a71ae51df
commit 8cf5581fa9
4 changed files with 2 additions and 10 deletions

View File

@ -4113,7 +4113,6 @@ Example response:
## iscsi_target_node_set_redirect method {#rpc_iscsi_target_node_set_redirect}
Update redirect portal of the primary portal group for the target node,
and send asynchronous logout request to all corresponding initiators.
### Parameters

View File

@ -906,11 +906,6 @@ iscsi_tgt_node_redirect(struct spdk_iscsi_tgt_node *target, int pg_tag,
snprintf(pg_map->redirect_port, MAX_PORTAL_PORT + 1, "%s", port);
}
/* Terminate connections to this public portal group by asynchronous
* logout message.
*/
iscsi_conns_request_logout(target, pg_tag);
return 0;
}

View File

@ -1119,8 +1119,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
redirect_port=args.redirect_port)
p = subparsers.add_parser('iscsi_target_node_set_redirect',
help="""Update redirect portal of the public portal group for
the target node, and send asynchronous logout request to all corresponding initiators.
help="""Update redirect portal of the public portal group for the target node.
Omit redirect host and port to clear previously set redirect settings.""")
p.add_argument('name', help='Target node name (ASCII)')
p.add_argument('pg_tag', help='Portal group tag (unique, integer > 0)', type=int)

View File

@ -375,8 +375,7 @@ def iscsi_target_node_add_pg_ig_maps(client, pg_ig_maps, name):
def iscsi_target_node_set_redirect(client, name, pg_tag, redirect_host, redirect_port):
"""Update redirect portal of the public portal group for the target node,
and send asynchronous logout request to all corresponding initiators.
"""Update redirect portal of the public portal group for the target node.
Args:
name: Target node name (ASCII)