iscsi endless conn error investigation

iscsi target removed without initiator logging out


symptom :

"detected conn error" error message from kernel

 "conn 0 login rejected" error messages from iscsid


investigation:

From implementation point of view, the kernel iscsi driver noticed the loss of connection by means of a transport checking timer function - iscsi_check_transport_timeouts. It then sent out the event to iscsid through the ISCSI_NL_GRP_ISCSID multicast group. iscsid received the event and tried to reopen the connection. But the session reopen failed because of the login failure and iscsid kept trying to reopen the session until the deletion of the iscsi session.



Kernel code path:
1. setup an iscsi connection
iscsi_sw_tcp_conn_create -> iscsi_tcp_conn_setup -> iscsi_conn_setup : sets up a transport_timer (iscsi_check_transport_timeouts)


2. ping to target timeout and send an event to iscsid
iscsi_check_transport_timeouts -> iscsi_conn_failure -> iscsi_conn_error_event -> iscsi_multicast_skb


Userspace code path:
1. receives the connection error event from kernel and tries to recover it the first time
krecv_pdu_begin -> ctldev_handle -> iscsi_sched_ev_context (async)-> session_conn_error -> __conn_error_handle -> session_conn_reopen


2. session connection reopen will eventually sent out login request to target portal group
session_conn_reopen ->  iscsi_conn_connect (async)-> session_conn_poll -> iscsi_login_req


3. login response is received and the error is printed according to the status detail, then the error handling logic tries to reopen the session again, which causes the endless login retry, thus the error message.
iscsi_sched_ev_context (async)-> session_conn_recv_pdu -> iscsi_recv_login_rsp -> __check_iscsi_status_class: prints the error message

                                                                               -> iscsi_login_eh -> session_conn_reopen


Spec:

ttps://tools.ietf.org/html/rfc7143#section-7.1.4.3 specifies. If the failed connection was the last or only connection in the session, a new connection establishment is mandatory. 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值