Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 727224

Summary: matahari service agent start/stop results in rc:198
Product: Red Hat Enterprise Linux 6 Reporter: Dave Johnson <dajohnso>
Component: matahariAssignee: Andrew Beekhof <abeekhof>
Status: CLOSED NOTABUG QA Contact: Dave Johnson <dajohnso>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.2CC: matahari-maint, whayutin
Target Milestone: rc   
Target Release: 6.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-15 06:27:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Johnson 2011-08-01 15:23:00 UTC
Description of problem:
Using the Matahari Services agent, starting and stopping services always seems to result in a return code of 198.  On top of that, stopping a service occasionally results in a '$service dead but subsys locked'. 

Version-Release number of selected component (if applicable):
matahari-service-0.4.2-2.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.  install matahari broker and service agent
2.  start broker and service agent
3.  use qmf-tool or python to connect to service agent
4.  use qmf-tool or python to stop/start a service
5.  run status against service in a different shell
  
Actual results:
rc:198, maybe '$service dead but subsys locked' mesg on /etc/init/$service status output

Expected results:
service stopped or running depending on the method called with a return code of 0

Additional info:

# stopped service results in dead 
>>> cmd.getoutput("service crond status")
'crond (pid  1636) is running...'
>>> service.stop("crond",20)
OK (0) - {u'rc': 198}
>>> cmd.getoutput("service crond status")
'crond dead but subsys locked'
>>> 
>>> cmd.getoutput("service httpd status")
'httpd (pid  15737) is running...'
>>> service.stop("httpd",20)
OK (0) - {u'rc': 198}
>>> cmd.getoutput("service httpd status")
'httpd dead but subsys locked'

# even start comes back with a rc: 198 but it does seem to work, service shows running
>>> cmd.getoutput("service httpd status")
'httpd is stopped'
>>> service.start("httpd",20)
OK (0) - {u'rc': 198}
>>> cmd.getoutput("service httpd status")
'httpd (pid  22354) is running...'
>>> 

# more rc:198 but this time, no dead service msg
>>> service.stop("httpd",20)
OK (0) - {u'rc': 198}
>>> cmd.getoutput("service httpd status")
'httpd is stopped'
>>> service.start("httpd",20)
OK (0) - {u'rc': 198}
>>> cmd.getoutput("service httpd status")
'httpd (pid  22414) is running...'
>>> service.stop("httpd",20)
OK (0) - {u'rc': 198}
>>> cmd.getoutput("service httpd status")
'httpd is stopped'

# same result through qmf-tool
qmf: call 1 stop iwhd 20
Output Parameters:
    Name  Value
    =============
    rc    198

Comment 1 Andrew Beekhof 2011-08-09 04:43:10 UTC
the timeout is actually in milliseconds, so really not enough time for the operation to complete ;-)
give 20000 a go and see if you still have a problem