Bug 590721

Summary: init script looks at wrong lockfile
Product: [Fedora] Fedora Reporter: Ruben Kerkhof <ruben>
Component: mysql-mmmAssignee: BJ Dierkes <derks>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: derks
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-05-10 14:54:13 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:

Description Ruben Kerkhof 2010-05-10 14:43:06 UTC
Description of problem:

The status option of the mysql-mmm-agent and mysql-mmm-monitor init script return stopped, but the agent is running.

Version-Release number of selected component (if applicable):

[root@db2 ~]# rpm -q mysql-mmm-agent
mysql-mmm-agent-2.2.0-1.fc12.noarch


How reproducible:
[root@db2 ~]# service mysql-mmm-agent status
mmm_agentd is stopped

But it's running.
[root@db2 ~]# ps aux | grep mmm
root     12596  0.0  2.2 154808 11232 ?        S    16:16   0:00 mmm_agentd
root     12598  0.0  2.2 154940 11340 ?        S    16:16   0:00 mmm_agentd
root     13597  0.0  0.1 102744   832 pts/0    S+   16:43   0:00 grep mmm

[root@db2 ~]# bash -x /etc/init.d/mysql-mmm-agent status 2>&1 | grep lock
+ LOCKFILE=/var/lock/subsys/mysql-mmm-agent
+ local base pid lock_file= pid_file=
+ lock_file=mmm_agentd
+ '[' -f /var/lock/subsys/mmm_agentd ']'

The status function should be passed the -l $LOCKFILE option

Comment 1 Ruben Kerkhof 2010-05-10 14:54:13 UTC
This doesn't matter as long as the pidfile in the init-script and the config-file are the same. I failed to notice that the upgrade to mysql-mmm-agent-2.2.0-1 changed the pidfile to /var/run/mysql-mmm/mmm_agentd.pid in both the init script and the config file.