Bug 2136544
| Summary: | iSCSI initiator cannot recover after target restart with large number of sessions | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | StorPool <redhat> |
| Component: | iscsi-initiator-utils | Assignee: | Chris Leech <cleech> |
| Status: | CLOSED MIGRATED | QA Contact: | Martin Hoyer <mhoyer> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.6 | CC: | mhoyer, mlombard |
| Target Milestone: | rc | Keywords: | MigratedToJIRA |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-09-23 12:55:51 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Interestingly, after doing some testing to see how many sessions is needed for this issue to happen the system eventually became able to recover expected even with 1024 sessions reliably, even though I haven't done any changes. Can you please clarify how long it takes for the system to recover with 1024 sessions and what you are observing with regard to device and session state? In our case it can hang for hours or longer and it will not recover them without rebooting the initiator. (In reply to redhat from comment #2) > Can you please clarify how long it takes for the system to recover with 1024 > sessions and what you are observing with regard to device and session state? > In our case it can hang for hours or longer and it will not recover them > without rebooting the initiator. Yes, I had the same results initially. What I'm trying to say is that after multiple attempts with lower number of sessions on the same two systems I eventually got to test this with 1024 sessions again and it worked as expected. This is an interesting, somewhat odd observation, and I could try to reproduce it locally, although I am unsure whether it will actually be helpful in understanding the problem further. Is there anything we can try or more information we can gather to assist with figuring this out? (In reply to redhat from comment #4) Indeed, it might or might not be a useful information for the devs, but I don't think it's worth trying to reproduce it at the moment. @mlombard Any chance you can take a look into this issue? (In reply to Martin Hoyer from comment #5) > (In reply to redhat from comment #4) > Indeed, it might or might not be a useful information for the devs, but I > don't think it's worth trying to reproduce it at the moment. > > @mlombard Any chance you can take a look into this issue? Ok I am going to look at it Thanks for taking on the bug investigation. Please let us know if we can test/reproduce something that will yield additional information or be helpful otherwise. Hello, Have you had the chance to take a look at the problem? We're still affected and available for any additional testing and information you might need. Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug. This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there. Due to differences in account names between systems, some fields were not replicated. Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information. To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like: "Bugzilla Bug" = 1234567 In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information. |
Description of problem: When an iSCSI initiator has a large number of sessions (1024 in the example below) open with a target server, rebooting the target or setting its firewall to reject traffic for a short period of time (15-30s) leaves some or all of the iSCSI sessions in a broken state. They cannot be logged out or logged in again using 'iscsiadm' - “Logging out of session …” messages are printed, but session/block device state is not affected. The only way to clear the state is to reboot the initiator. Also, ‘iscsiadm’ hangs when trying to print more session information. Version-Release number of selected component (if applicable): iscsi-initiator-utils.x86_64 6.2.1.4-4.git095f59c kernel.x86_64 4.18.0-372.26.1 How reproducible: Easily reproducible on every attempt. Steps to Reproduce: Setup the target with the following script (it requires 1024*512M space on /mnt, but disk size can be reduced) #!/bin/bash [[ -z $TARGETS ]] && TARGETS=1024 [[ -z $BASEDIR ]] && BASEDIR="/mnt" [[ -z $BASENAME ]] && BASENAME="iqn.2022-10.com.example" yum install -y targetcli firewall-cmd --permanent --add-port=3260/tcp firewall-cmd --reload cmds="" for tgt in $(seq "$TARGETS"); do disk="disk${tgt}" target="${BASENAME}:tgt${tgt}" cmds="${cmds}cd /backstores/fileio\n" cmds="${cmds}create disk${tgt} ${BASEDIR}/${disk} 512M\n" cmds="${cmds}cd /iscsi\n" cmds="${cmds}create ${target}\n" cmds="${cmds}cd /iscsi/${target}/tpg1/luns\n" cmds="${cmds}create /backstores/fileio/${disk}\n" cmds="${cmds}cd /iscsi/${target}/tpg1/acls\n" cmds="${cmds}create iqn.2022-10.com.example:s26\n" done echo -e "$cmds" | targetcli systemctl restart target Create sessions on the initiator: iscsiadm -m discoverydb --type sendtargets --portal 10.1.7.25 --discover # replace 10.1.7.25 with target IP iscsiadm -m node --login all One way to put the sessions in a broken state is to simply reboot the target server. Another is to reject iSCSI packets for a short interval, e.g. by running ‘iptables -A INPUT -p tcp --dport 3260 -j REJECT; sleep 30; iptables -D INPUT -p tcp --dport 3260 -j REJECT’. Actual results: The vast majority of iSCSI block devices on the initiator go from “running” into a “blocked” state (as per ‘/sys/block/sd*/device/state’), and after a while reach “transport-offline”. Trying to use the “iscsiadm -m session -P3” command hangs with the following output: [root@s26 ~]# iscsiadm -m session -P3 iSCSI Transport Class version 2.0-870 version 6.2.1.4-1 Target: iqn.2022-10.com.example:tgt1 (non-flash) Current Portal: 10.1.7.25:3260,1 Persistent Portal: 10.1.7.25:3260,1 ********** Interface: ********** Iface Name: default Iface Transport: tcp Iface Initiatorname: iqn.2022-10.com.example:s26 Iface IPaddress: 10.1.7.26 Iface HWaddress: default Iface Netdev: default SID: 1 When running the above command with strace, it seems to get stuck polling for a response: socket(AF_UNIX, SOCK_STREAM, 0) = 3 connect(3, {sa_family=AF_UNIX, sun_path=@"ISCSIADM_ABSTRACT_NAMESPACE"}, 30) = 0 write(3, "\r\0\0\0\0\0\0\0\1\0\0\0\0\[...]”, 16104) = 16104 poll([{fd=3, events=POLLIN}], 1, 1000) = 0 (Timeout) Increasing the ‘node.session.timeo.replacement_timeout’ parameter in /etc/iscsi/iscsid.conf might allow for some devices to return back to a ‘running’ state (and they can be used as normal), but still leaves the system in an overall broken state. Expected results: The iSCSI sessions should either recover, or at least be able to be manually reconnected by doing a logout & login.