Bug 590721 - init script looks at wrong lockfile
Summary: init script looks at wrong lockfile
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql-mmm
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: BJ Dierkes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-10 14:43 UTC by Ruben Kerkhof
Modified: 2010-05-10 14:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-10 14:54:13 UTC
Type: ---


Attachments (Terms of Use)

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.


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