RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 536826 - initscript collected problems LSB-compilant dcbd
Summary: initscript collected problems LSB-compilant dcbd
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lldpad
Version: 6.1
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Jan Zeleny
QA Contact: Yulia Kopkova
URL:
Whiteboard:
Depends On:
Blocks: 633349
TreeView+ depends on / blocked
 
Reported: 2009-11-11 14:34 UTC by Jan Ščotka
Modified: 2010-11-10 21:06 UTC (History)
2 users (show)

Fixed In Version: lldpad-0.9.38-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:06:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Ščotka 2009-11-11 14:34:02 UTC
I found 2 problems, with LSB compilant of initscript of arpwatch.
It should be based on 
https://fedoraproject.org/wiki/Packaging/SysVInitScript definition
test srcipt is situated on wiki pages:
https://wiki.test.redhat.com/BaseOs/Projects/InitScripts#testscript

see failing message in LOG:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test                                                         
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: >>>>>>>>> service start
:: [   PASS   ] ::  Service must start without problem
:: [   PASS   ] ::  Then Status command               
:: [   PASS   ] ::  Already started service           
:: [   PASS   ] ::  Again status command              
:: [   LOG    ] :: >>>>>>>>> service restart          
:: [   PASS   ] ::  Restarting of service             
:: [   PASS   ] ::  Status command                    
:: [   LOG    ] :: >>>>>>>>> service stop             
:: [   PASS   ] ::  Stopping service                  
:: [   PASS   ] ::  Status of stopped service         
:: [   PASS   ] ::  Stopping service again            
:: [   PASS   ] ::  Status of stopped service         
:: [   LOG    ] :: >>>>>>>>> pid file                 
:: [   PASS   ] :: File /var/run/dcbd.pid should exist
:: [   PASS   ] :: Running 'echo 666666 > /var/run/dcbd.pid'
:: [   PASS   ] ::  Existing pid file, but service not started 
:: [   LOG    ] :: >>>>>>>>> lock file                         
:: [   PASS   ] :: File /var/lock/subsys/dcbd should exist     
:: [   PASS   ] :: Running 'touch /var/lock/subsys/dcbd'       
:: [   FAIL   ] ::  Existing lock file, but service not started  (Expected 2, got 3)
:: [   LOG    ] :: >>>>>>>>> insufficient rights                                    
:: [   PASS   ] ::  Starting service for restarting under nonpriv user              
:: [   FAIL   ] :: Insufficient rights, restarting resrvice under nonprivileged user must fail (Expected 4, got 143)                                                                                
:: [   LOG    ] :: >>>>>>>>> operations
:: [   PASS   ] ::  Service have to implement start function
:: [   PASS   ] ::  Service have to implement restart function
:: [   PASS   ] ::  Service have to implement status function
:: [   FAIL   ] ::  Service have to implement usage function  (Expected 0,3,2, got 1)
:: [   PASS   ] ::  Service have to implement condrestart function
:: [   PASS   ] ::  Service have to implement try-restart function
:: [   PASS   ] ::  Service have to implement reload function
:: [   PASS   ] ::  Service have to implement force-reload function
:: [   LOG    ] :: >>>>>>>>> nonexist operations
:: [   FAIL   ] ::  Testing proper return code when nonexisting function (Expected 2, got 1)
:: [   LOG    ] :: >>>>>>>>> invalid arguments
:: [   FAIL   ] ::  When no arguments added to service, it must fail with proper return code  (Expected 2, got 1)
:: [   LOG    ] :: Duration: 50s
:: [   LOG    ] :: Assertions: 23 good, 5 bad

There are two bugs:
1. Existing lock file, but service not started  (Expected 2, got 3)
2. Insufficient rights, restarting resrvice under nonprivileged user must fail (Expected 4, got 143)
3. Service have to implement usage function  (Expected 0,3,2, got 1) [should be impelented or returned 2, or 3 value]

Comment 1 Jan Ščotka 2009-11-11 14:39:46 UTC
And also I forgot to comment next two states, in case that is used nonexisting function or without parameter, it should return code 2

Comment 3 RHEL Program Management 2009-11-11 14:56:02 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Jan Zeleny 2009-11-13 10:57:56 UTC
Patch has been uploaded, changing status to MODIFIED

Comment 6 releng-rhel@redhat.com 2009-12-16 21:49:55 UTC
Fixed in 'dcbd-0.9.15-6'. 'dcbd-0.9.19-2.el6' included in compose 'RHEL6.0-20091216.nightly'.
Moving to ON_QA.

Comment 16 Yulia Kopkova 2010-06-25 09:11:02 UTC
Tested with lldpad-0.9.32-2.el6

Status action should return code "2" if program is dead and /var/lock lock file exists [1]

# service lldpad start ;echo $?
0tarting lldpad: [  OK  ]
# kill -9 `pidof lldpad`
# service lldpad status ;echo $?
Checking for service lldpad: lldpad dead but pid file exists
1FAILED]
# rm -f /var/run/lldpad.pid 
# service lldpad status ;echo $?
Checking for service lldpad: lldpad dead but subsys locked
0  OK  ]

now: 0
expected: 2

---
[1] https://fedoraproject.org/wiki/Packaging/SysVInitScript#Exit_Codes_for_the_Status_Action

Comment 17 Jan Zeleny 2010-06-25 09:27:53 UTC
Please retest with latest lldpad (0.9.38), which I've built recently. Its behavior has been checked by jscotka.

Comment 21 releng-rhel@redhat.com 2010-11-10 21:06:11 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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