Bug 522094

Summary: iscsi isn't lsb compliant
Product: [Fedora] Fedora Reporter: michal novacek <mnovacek>
Component: iscsi-initiator-utilsAssignee: Mike Christie <mchristi>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: agrover, dkovalsk, 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: 2009-09-09 14:03:59 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:
Bug Depends On:    
Bug Blocks: 521669    

Description michal novacek 2009-09-09 13:21:55 UTC
Description of problem:
/etc/init.d/iscsi script doesn't comply with lsb in "status" function. 

It can never return 1 because it doesn't do checks for /var/lock/iscsi.pid

How reproducible: always

Steps to Reproduce:
1. /etc/init.d/iscsi stop
2. touch /var/run/iscsi.pid
3. /etc/init.d/iscsi status
  
Actual results: return value is 2

Expected results: return value is 1

Additional info:
This should be fairly easy to do as there already is check to see whether the
program is dead and it should be sufficient to add check for /var/run and
/var/lock files and return the correct value accordingly.

Comment 1 Hans de Goede 2009-09-09 14:03:59 UTC
That is because the iscsi script does not has anything to do with a daemon. There is iscsid which has a separate iscsid script. The iscsi script is for logging into know iscsi targets (targets set to autostart in the /var/lib/iscsi database).

What you should do is:
/etc/init.d/iscsid stop
touch /var/run/iscsid.pid
/etc/init.d/iscsid status

And then things work as they should. Since the iscsi script does not start
any daemon, and since their thus is no pid file, this naturally does not work
for the iscsi service.