Bug 864036 - iSCSI session are not restored after reboot
iSCSI session are not restored after reboot
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iscsi-initiator-utils (Show other bugs)
7.0
Unspecified Unspecified
medium Severity high
: rc
: ---
Assigned To: Chris Leech
Bruno Goncalves
: TestBlocker
: 958864 (view as bug list)
Depends On:
Blocks: 883874 1080147
  Show dependency treegraph
 
Reported: 2012-10-08 08:16 EDT by Bruno Goncalves
Modified: 2014-06-18 00:58 EDT (History)
5 users (show)

See Also:
Fixed In Version: iscsi-initiator-utils-6.2.0.873-7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 06:52:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bruno Goncalves 2012-10-08 08:16:16 EDT
Description of problem:
iscsid do not login automatically on discovered portals after reboot.

Version-Release number of selected component (if applicable):

iscsi-initiator-utils-6.2.0.872-18.el7.x86_64

uname -r
3.6.0-0.28.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Discovery portals
iscsiadm -m discovery -t st -p "na3170b.lab.bos.redhat.com" -I default  -P1
Target: iqn.1992-08.com.netapp:sn.151753773
	Portal: 10.16.41.222:3260,1
		Iface Name: default
	Portal: 10.16.43.127:3260,1
		Iface Name: default

2.Login to portals
iscsiadm -m node -l
Logging in to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.41.222,3260] (multiple)
Logging in to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.43.127,3260] (multiple)
Login to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.41.222,3260] successful.
Login to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.43.127,3260] successful.

iscsiadm -m session
tcp: [1] 10.16.41.222:3260,1 iqn.1992-08.com.netapp:sn.151753773
tcp: [2] 10.16.43.127:3260,1 iqn.1992-08.com.netapp:sn.151753773


3.reboot

4. check sessions after reboot
iscsiadm -m session
iscsiadm: No active sessions.

5. Manual login works
iscsiadm -m node -l
Logging in to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.41.222,3260] (multiple)
Logging in to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.43.127,3260] (multiple)
Login to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.41.222,3260] successful.
Login to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.43.127,3260] successful.



  
Actual results:
no iSCSI session

Expected results:
sessions should be restored after reboot

Additional info:
Comment 4 Bruno Goncalves 2013-03-19 11:25:19 EDT
Problem is still reproducible with:

rpm -q iscsi-initiator-utils
iscsi-initiator-utils-6.2.0.873-2.el7.x86_64

uname -r
3.7.0-0.36.el7.x86_64
Comment 5 Marian Csontos 2013-04-18 13:44:19 EDT
There is a problem with systemd dependencies at boot: iscsi is started before network.

So I tried restarting iscsid later after boot but session is still not restored.

`iscsiadm -m node -l` works for me. Adding the line to rc.local.
Comment 6 Peter Rajnoha 2013-04-19 02:53:54 EDT
There's also a note in the /etc/init.d/iscsi init script:

# Note we should have $network in Required-Start/Stop but we don't because if
# we would require network chkconfig will put us directly after NetworkManager
# when using NM, which will make our see if the network is up test succeed
# while NM is actually still configuring the network. By not requiring network
# chkconfig will use the chkconfig header to determine our start prio, starting
# us after the old network service, but before NM (netfs does this the same).

(adding Required-Start: $network iff using network.service instead of NetworkManager.service should solve the issue)
Comment 7 michal novacek 2013-05-02 10:58:32 EDT
*** Bug 958864 has been marked as a duplicate of this bug. ***
Comment 8 michal novacek 2013-05-02 11:02:19 EDT
Is there any plan on how to solve this permanently with for example systemctl.service with proper dependencies?
Comment 10 Chris Leech 2013-06-20 16:20:17 EDT
This should be fixed with iscsi-initiator-utils-6.2.0.873-7, which is in sync with f19 and has proper systemd unit files.
Comment 11 Bruno Goncalves 2013-06-21 07:36:20 EDT
The problem continues on RHEL7.

rpm -q iscsi-initiator-utils
iscsi-initiator-utils-6.2.0.873-7.el7.x86_64

uname -r 
3.10.0-0.rc4.59.el7.x86_64

iscsiadm -m discovery
na3170b.lab.bos.redhat.com:3260 via sendtargets

iscsiadm -m session
iscsiadm: No active sessions.

From /var/log/messages:

Jun 21 11:28:17 ibm-x3500m4-01 kernel: [   16.429909] Loading iSCSI transport class v2.0-870.
Jun 21 11:28:17 ibm-x3500m4-01 dbus[654]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jun 21 11:28:17 ibm-x3500m4-01 systemd[1]: Started Open-iSCSI.
Jun 21 11:28:17 ibm-x3500m4-01 iscsiadm[1118]: iscsiadm: Could not login to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.41.222,3260].
Jun 21 11:28:17 ibm-x3500m4-01 iscsiadm[1118]: iscsiadm: initiator reported error (12 - iSCSI driver not found. Please make sure it is loaded, and retry the operation)
Jun 21 11:28:17 ibm-x3500m4-01 iscsiadm[1118]: iscsiadm: Could not login to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.43.127,3260].
Jun 21 11:28:17 ibm-x3500m4-01 iscsiadm[1118]: iscsiadm: initiator reported error (12 - iSCSI driver not found. Please make sure it is loaded, and retry the operation)
Jun 21 11:28:17 ibm-x3500m4-01 iscsiadm[1118]: iscsiadm: Could not log into all portals
Jun 21 11:28:17 ibm-x3500m4-01 iscsiadm[1118]: Logging in to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.41.222,3260] (multiple)
Jun 21 11:28:17 ibm-x3500m4-01 iscsiadm[1118]: Logging in to [iface: default, target: iqn.1992-08.com.netapp:sn.151753773, portal: 10.16.43.127,3260] (multiple)
Jun 21 11:28:17 ibm-x3500m4-01 systemd[1]: iscsi.service: main process exited, code=exited, status=12/n/a
Jun 21 11:28:17 ibm-x3500m4-01 systemd[1]: Failed to start Login and scanning of iSCSI devices.
Jun 21 11:28:17 ibm-x3500m4-01 systemd[1]: Unit iscsi.service entered failed state.
Comment 12 Bruno Goncalves 2013-06-21 07:53:33 EDT
Okay seems the culprit now is selinux.

Making it permissive the sessions start after reboot.

Jun 21 11:28:18 ibm-x3500m4-01 avahi-daemon[638]: Registering new address record for fe80::e61f:13ff:fee0:1bf8 on em1.*.
Jun 21 11:28:18 ibm-x3500m4-01 avahi-daemon[638]: Registering new address record for fe80::e61f:13ff:fee0:1bf9 on em2.*.
Jun 21 11:28:18 ibm-x3500m4-01 setroubleshoot: SELinux is preventing /usr/sbin/iscsid from getattr access on the directory /etc/modprobe.d. For complete SELinux messages. run sealert -l 968e2e66-9b85-4e6f-bf17-1d4eb6b0cba7
Jun 21 11:28:18 ibm-x3500m4-01 setroubleshoot: SELinux is preventing /usr/sbin/iscsid from search access on the directory modules. For complete SELinux messages. run sealert -l ff4fcc47-5106-4ef0-82e6-a2041654710c
Jun 21 11:28:18 ibm-x3500m4-01 setroubleshoot: SELinux is preventing /usr/sbin/iscsid from search access on the directory modules. For complete SELinux messages. run sealert -l ff4fcc47-5106-4ef0-82e6-a2041654710c
Jun 21 11:28:18 ibm-x3500m4-01 avahi-daemon[638]: Registering new address record for fe80::e61f:13ff:fee0:1bfa on em3.*.
Jun 21 11:28:18 ibm-x3500m4-01 iscsid: iSCSI daemon with pid=1144 started!
Jun 21 11:28:18 ibm-x3500m4-01 iscsid: Could not insert module tcp. Kmod error -38
Jun 21 11:28:18 ibm-x3500m4-01 iscsid: Could not insert module tcp. Kmod error -38
Jun 21 11:28:18 ibm-x3500m4-01 setroubleshoot: SELinux is preventing /usr/sbin/iscsid from search access on the directory modules. For complete SELinux messages. run sealert -l ff4fcc47-5106-4ef0-82e6-a2041654710c
Jun 21 11:28:18 ibm-x3500m4-01 setroubleshoot: SELinux is preventing /usr/sbin/iscsid from getattr access on the directory /etc/modprobe.d. For complete SELinux messages. run sealert -l 968e2e66-9b85-4e6f-bf17-1d4eb6b0cba7
Jun 21 11:28:18 ibm-x3500m4-01 setroubleshoot: SELinux is preventing /usr/sbin/iscsid from search access on the directory modules. For complete SELinux messages. run sealert -l ff4fcc47-5106-4ef0-82e6-a2041654710c
Jun 21 11:28:18 ibm-x3500m4-01 setroubleshoot: SELinux is preventing /usr/sbin/iscsid from search access on the directory modules. For complete SELinux messages. run sealert -l ff4fcc47-5106-4ef0-82e6-a2041654710c
Jun 21 11:28:18 ibm-x3500m4-01 setroubleshoot: SELinux is preventing /usr/sbin/iscsid from search access on the directory modules. For complete SELinux messages. run sealert -l ff4fcc47-5106-4ef0-82e6-a2041654710c
Jun 21 11:28:19 ibm-x3500m4-01 avahi-daemon[638]: Registering new address record for fec0:0:a10:4000:e61f:13ff:fee0:1bf8 on em1.*.
Comment 13 Chris Leech 2013-06-21 10:34:09 EDT
(In reply to Bruno Goncalves from comment #12)
> Okay seems the culprit now is selinux.

What is the version of selinux-policy installed?
That should be fixed as of 3.12.1-51.
Comment 14 Bruno Goncalves 2013-06-21 11:22:51 EDT
Thank you, I was using selinux-policy-3.12.1-48.el7

With selinux-policy-3.12.1-52.el7 it seems to work.
Comment 15 Bruno Goncalves 2013-07-09 09:17:44 EDT
It has been fixed on

iscsi-initiator-utils-6.2.0.873-7.el7.x86_64

selinux-policy-3.12.1-59.el7.noarch
Comment 16 Ludek Smid 2014-06-13 06:52:23 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Note You need to log in before you can comment on or make changes to this bug.