Bug 590721 - init script looks at wrong lockfile
init script looks at wrong lockfile
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: mysql-mmm (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: BJ Dierkes
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-10 10:43 EDT by Ruben Kerkhof
Modified: 2010-05-10 10:54 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-10 10:54:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ruben Kerkhof 2010-05-10 10:43:06 EDT
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 10:54:13 EDT
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.