lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <22E823DBB7698E489DC113638F7470729F082E@DGGEMM506-MBS.china.huawei.com>
Date:   Thu, 28 Sep 2017 06:42:48 +0000
From:   "Tangchen (UVP)" <tang.chen@...wei.com>
To:     "open-iscsi@...glegroups.com" <open-iscsi@...glegroups.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "Zhangyanfei (YF)" <yanfei.zhang@...wei.com>,
        guijianfeng <guijianfeng@...wei.com>,
        "Tangchen (UVP)" <tang.chen@...wei.com>
Subject: [iscsiadm] iscsiadm creates multiple same sessions when run with
 --login option in parallel. 

Hi guys,

If we run iscsiadm -m node --login command through the same IP address 4 times, only one session will be created.
But if we run them in parallel, then 4 same sessions could be created.
( Here, xxx.xxx.xxx.xxx is the IP address to the IPSAN. I'm using the same IP in these 4 commands. )

# iscsiadm -m node -p xxx.xxx.xxx.xxx  --login &
# iscsiadm -m node -p xxx.xxx.xxx.xxx  --login &
# iscsiadm -m node -p xxx.xxx.xxx.xxx  --login &
# iscsiadm -m node -p xxx.xxx.xxx.xxx  --login &
Logging in to [iface: default, target: iqn. xxx.xxx.xxx.xxx, portal: xxx.xxx.xxx.xxx] (multiple)
Logging in to [iface: default, target: iqn. xxx.xxx.xxx.xxx, portal: xxx.xxx.xxx.xxx] (multiple)
Logging in to [iface: default, target: iqn. xxx.xxx.xxx.xxx, portal: xxx.xxx.xxx.xxx] (multiple)
Logging in to [iface: default, target: iqn. xxx.xxx.xxx.xxx, portal: xxx.xxx.xxx.xxx] (multiple)
Login to [iface: default, target: xxx.xxx.xxx.xxx, portal: xxx.xxx.xxx.xxx] successful.
Login to [iface: default, target: xxx.xxx.xxx.xxx, portal: xxx.xxx.xxx.xxx] successful.
Login to [iface: default, target: xxx.xxx.xxx.xxx, portal: xxx.xxx.xxx.xxx] successful.
Login to [iface: default, target: xxx.xxx.xxx.xxx, portal: xxx.xxx.xxx.xxx] successful.

# iscsiadm -m session
tcp: [1] xxx.xxx.xxx.xxx (non-flash)
tcp: [2] xxx.xxx.xxx.xxx (non-flash)
tcp: [3] xxx.xxx.xxx.xxx (non-flash)
tcp: [4] xxx.xxx.xxx.xxx (non-flash)

If we check the net connection in /proc/net/nf_conntrack, they are 4 TCP connections with different src ports.
And if we run logout command only once, all the 4 sessions will be destroyed.

Unfortunately, service like multipathd cannot tell the difference between them. If we have 4 same sessions, 
4 paths will be created connecting to the dm device. But actually they are the same paths.

Referring to the code, iscsiadm command does prevent creating same session by checking /sys/class/iscsi_session/ dir.
But no multi-thread protection in there. 

Any idea how to solve this problem ?

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ