Bug 685089

Summary: [NetApp 6.1 Bug] Software iSCSI module does not get loaded automatically during boot time
Product: Red Hat Enterprise Linux 6 Reporter: gowrav <gowrav.mahadevaiah>
Component: doc-Storage_Admin_GuideAssignee: Jacquelynn East <jeast>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: agrover, coughlan, jskeoch, mchristi, rlandman, xdl-redhat-bugzilla
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-07 02:19:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Deadline: 2011-06-30   

Description gowrav 2011-03-15 09:32:31 UTC
Description of problem:

In RHEL 6.1 Alpha OS, the Software iSCSI module is not getting loaded into kernel automatically during boot time. After installing the iSCSI Initiator Utils package, the module is expected to get loaded into kernel automatically and when "chkconfig" is turned ON for init-3,4,5 levels, iSCSI module should be loaded at boot time. However, this behavior is not seen. After OS boots, none of the iSCSI modules are loaded into kernel and hence the "iscsid" and "iscsi" daemons do not start.

# chkconfig | grep iscsi
iscsi           0:off   1:off   2:off   3:on    4:on    5:on    6:off
iscsid          0:off   1:off   2:off   3:on    4:on    5:on    6:off

# lsmod | grep -i iscsi
< no output is defined >

When we try to start the iscsid daemons manually the following error is thrown.
# iscsid
	<snip from /var/log/message file>
	Mar 14 12:54:56 IBMx336-200-172 iscsid: iSCSI logger with pid=2579 started!
	Mar 14 12:54:56 IBMx336-200-172 iscsid: Missing or Invalid version from /sys/module/scsi_transport_iscsi/version. Make sure a up to date scsi_transport_iscsi module is loaded and a up to date version of iscsid is running. Exiting...

We need to manually include all iscsi ko file using "insmod" to start the iscsi related daemons.
# modprobe -l "*iscsi*"
kernel/drivers/scsi/scsi_transport_iscsi.ko
kernel/drivers/scsi/libiscsi.ko
kernel/drivers/scsi/libiscsi_tcp.ko
kernel/drivers/scsi/iscsi_tcp.ko
kernel/drivers/scsi/iscsi_boot_sysfs.ko
kernel/drivers/scsi/be2iscsi/be2iscsi.ko
kernel/drivers/firmware/iscsi_ibft.ko

After manually inserting the .ko file, iscsid daemon starts fine.

# lsmod | grep -i iscsi
iscsi_ibft              3873  0
be2iscsi               66091  0
iscsi_boot_sysfs        9520  2 iscsi_ibft,be2iscsi
iscsi_tcp              10082  5
libiscsi_tcp           16500  4 cxgb4i,cxgb3i,libcxgbi,iscsi_tcp
libiscsi               47160  8 bnx2i,cxgb4i,cxgb3i,ib_iser,libcxgbi,be2iscsi,iscsi_tcp,libiscsi_tcp
scsi_transport_iscsi    37987  7 bnx2i,ib_iser,libcxgbi,be2iscsi,iscsi_tcp,libiscsi

[root@IBMx336-200-172 ~]# /etc/init.d/iscsid status
iscsid (pid  2544) is running...

Version-Release number of selected component (if applicable):
OS: RHEL 6.1 Alpha
Kernel: 2.6.32-118.el6.x86_64
iSCSI: iscsi-initiator-utils-6.2.0.872-17.el6.x86_64

How reproducible:
Frequent

Steps to Reproduce:
1. Install RHEL 6.1 Alpha OS.
2. Install iscsi-initiator-utils package.
3. Using "lsmod" check if the iSCSI modules are loaded.
4. Add iscsid and iscsi services to "chkconfig" list, and reboot the host.
5. After reboot, the iscsi modules are not loaded automatically. Again use "lsmod" to verify it.
6. Try to start the iscsid daemon using "/etc/init.d/iscsid start". Deamon does not start.
7. Manually insert all the iscsi modules using "insmod" command. Eg: "insmod /lib/modules/2.6.32-118.el6.x86_64/kernel/drivers/scsi/scsi_transport_iscsi.ko"
8. Again try to start iscisd daemon, and now its starts fine.
  
Actual results:
User has to manually insert all the iscsi modules after the package is installed and after reboots.

Expected results:
iSCSI modules should load into kernel automatically after the package is installed and also during boot time.


Additional info:

Comment 2 Mike Christie 2011-03-16 01:30:41 UTC
For #6 iscsid is not going to start automatically if you do not have any sessions setup to get logged into automatically.

For #7 and #8, how are you starting iscsid? Using "service iscsid start" or just running iscsid by hand?

In 6.0 we changed how iscsi starts so that is only starts when needed. So if you did not have any iscsi sessions setup for automatic start the iscsid/iscsi services are not going to start. If you run a iscsiadm command that requires them then iscsiadm will start the services. So if you did

iscsiadm -m discovery -t st -p 192.168.1.100

then iscsiadm would start the iscsid serivce for you. Then later on another reboot or restart of the service iscsid would start with the normal start command if there were sessions marked with node.start=automatic.

To force the start of iscsid/iscsi when there are no automatic sessions then you now would run

service iscsid force-start

Comment 3 gowrav 2011-03-16 10:55:54 UTC
OK, now i understand this behavior. When i booted the host without any iSCSI session configured, the iscsi daemon did not start. Later, i had to use "service iscsid force-start" or "iscsiadm -m discovery" commands to start the iscsi daemons.

I just want to understand the reason behind this design approach unlike in RHEL5 series. I was wondering if iscsi start provision can be provided to user via "chkconfig" option instead of asking user to execute commands to force-start iscsi when user wants to configure iscsi session for the very first time.

By default, iscsi daemons do not start at boot if no iscsi session are configured or if 'chkconfig' is OFF for iscsid/iscsi.  And if 'chkconfig' is turned ON for iscsid/iscsi then daemon should start at boot (though iscsi session are not configured yet). This would be very similar to how "multipathd" is starting at boot time now. Can this be done? Let me know your thoughts.

Currently, iscsi does not start at boot though 'chkconfig' is ON.

Comment 4 Mike Christie 2011-03-16 23:17:52 UTC
(In reply to comment #3) 
> I just want to understand the reason behind this design approach unlike in
> RHEL5 series. I was wondering if iscsi start provision can be provided to user
> via "chkconfig" option instead of asking user to execute commands to
> force-start iscsi when user wants to configure iscsi session for the very first
> time.

There is no chkconfig option like this. It was done because the boot developers wanted iscsid to start only when needed. So the first time you run a iscsiadm command that requires iscsid, then it will be started at that time.

I think the thought was why would you want iscsid running if there was nothing using it? It just slows boot and waste resources. I do not think we could think of any a reason why it should be running. Did you have a scenario?

Comment 5 RHEL Program Management 2011-04-04 02:09:09 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 6 Tom Coughlan 2011-04-05 12:54:28 UTC
(In reply to comment #4)

> Did you have a scenario?

Or can we close this now?

Comment 7 gowrav 2011-04-05 13:34:42 UTC
No, we do not have any particular scenario per se.

Yes we can close this BZ, however as discussed in our previous meeting, it will be useful if this behavior is well documented (may be in user guide).

Comment 8 Tom Coughlan 2011-05-03 18:22:21 UTC
I am changing the component to Storage Admin Guide. 

Mike or Andy, please draft a paragraph or two that explain the issue for users. Maybe say what the rationale for the change was. Then the doc maintainer can add that to the manual and close this. 

Tom

Comment 10 Mike Christie 2011-06-28 03:20:33 UTC
Here is something we can add:

In RHEL 6 the iSCSI service is lazily started by default. If root is not on a iSCSI device or there are no nodes marked with "node.startup = automatic" then the iSCSI service will not start until a iscsiadm command is run that requires iscsid or the iscsi kernel modules to be started. For example, running the discovery command "iscsiadm -m discovery -t st -p ip:port" will cause iscsiadm to start the iSCSI service.

To force the iscsid daemon to run and iSCSI kernel modules to load run "service iscsid force-start".