Bug 566772

Summary: iscsid fails to stop during shutdown
Product: [Fedora] Fedora Reporter: Dave Allan <dallan>
Component: iscsi-initiator-utilsAssignee: Hans de Goede <hdegoede>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: agrover, hdegoede, mchristi
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-23 13:18:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot of the initiator shutdown none

Description Dave Allan 2010-02-19 16:49:08 UTC
Created attachment 395140 [details]
screenshot of the initiator shutdown

Description of problem:
When the system shuts down, the iscsi init script is correctly called before the network is shutdown, however, iscsid doesn't stop with the message:

Not stopping iscsid: iscsi sessions still active

Version-Release number of selected component (if applicable):
iscsi-initiator-utils-6.2.0.870-13.fc13.i686

How reproducible:
100%

Steps to Reproduce:
1. login to an iSCSI target
2. execute 'poweroff'


Additional info:
No filesystems were mounted from the iSCSI LUs & the sesssions were logged in but idle at the time of the shutdown.  This is a stock rawhide box on a KVM virtual machine with the target on tgtd on F12.  The target is the physical host that the VM runs on.  There is only one session to one target with 5 LUs.

Comment 1 Mike Christie 2010-02-19 18:55:26 UTC
Is the session that is up, used for the root ("/") partition?

It looks like the /etc/init.d/iscsid script is called. Do you know if the /etc/init.d/iscsi script is called before it?

Comment 2 Dave Allan 2010-02-19 19:29:40 UTC
The sessions actually aren't being used for anything--some of the LUs are partitioned and have filesystems on them, but they're not mounted.

The iscsi script isn't being called at all.  I didn't see it in the shutdown output, and just to make sure I hacked both iscsi and iscsid's init scripts to output a debug line before doing anything else, and I see the output from iscsid but not iscsi.  The iscsid script seems to be called twice if the sessions are active, I'm not sure if that's by design.

Comment 3 Hans de Goede 2010-04-23 12:38:42 UTC
Hi Dave,

Sorry for the late response.

The iscsid script being called twice on shutdown is by design (the second time is a retry after most stuff has been shutdown).

Can you check if you have a /var/lock/subsys/iscsi file after starting up?
I've the feeling that /etc/rc.d/init.d/iscsi is failing halfway through, in
a way that it has logged in to (some ?) sessions, but not set its lockfile
(and thus won't be stopped).

Also can you verify there is a K??iscsi under /etc/rc.d/rc0.d and
/etc/rc.d/rc6.d ?

Thanks,

Hans



p.s.

Mike as I've done some extensive surgery lately to the initscripts I'll take this one.

Comment 4 Dave Allan 2010-04-23 13:08:36 UTC
Hi Hans,

Your surgery seems to have made the patient well.  :)  I can no longer reproduce this problem on a fully updated F13 machine.  The sessions appear to be stopped at daemon shutdown as I would expect.  I had gotten into the habit of manually stopping the sessions before shutting down, so I hadn't noticed the fix until now.  Thanks!

Dave

Comment 5 Hans de Goede 2010-04-23 13:18:11 UTC
Hmm,

My changes have already been in place for a while ... ?

Anyways, closing as next release then. Feel free to re-open if it resurfaces.