Bug #55404 | MEM: agent's initscript returns 1 even if agent already stopped | ||
---|---|---|---|
Submitted: | 20 Jul 2010 15:07 | Modified: | 28 Jan 2011 22:44 |
Reporter: | Leandro Morgado | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Enterprise Monitor: Installing | Severity: | S3 (Non-critical) |
Version: | Agent 2.2.1.1729 (probably all versions) | OS: | Linux |
Assigned to: | Mark Leith | CPU Architecture: | Any |
[20 Jul 2010 15:07]
Leandro Morgado
[21 Jul 2010 14:01]
Leandro Morgado
Here is a patch that corrects the incorrect exit code when issuing stop on a non running agent. diff -u mysql-monitor-agent mysql-monitor-agent.bug55404 --- mysql-monitor-agent 2010-07-21 15:59:32.000000000 +0200 +++ mysql-monitor-agent.bug55404 2010-07-21 16:00:07.000000000 +0200 @@ -259,7 +259,11 @@ fi else log_failure_msg "$MERLIN_AGENT_PSERVICE PID file could not be found!" - exit 1 + if [ "$1" = "stop" ]; then + exit 0 + else + exit 1 + fi fi ;; force
[2 Dec 2010 12:28]
Enterprise Tools JIRA Robot
Mark Leith writes: Pushed to 2.3: 1987 Mark Leith 2010-12-02 Bug#55404 / EM-4682 - MEM: agent's initscript returns 1 even if agent already stopped - Applying patch from Leandro Morgado modified: scripts/init.d/mysql-monitor-agent And 2.2: 1952 Mark Leith 2010-12-02 Bug#55404 / EM-4682 - MEM: agent's initscript returns 1 even if agent already stopped - Applying patch from Leandro Morgado modified: scripts/init.d/mysql-monitor-agent
[11 Jan 2011 16:51]
Enterprise Tools JIRA Robot
Andy Bang writes: Fix is in build 2.3.2.2050.
[18 Jan 2011 14:22]
Enterprise Tools JIRA Robot
Carsten Segieth writes: tested OK in 2.2.4.1761 and 2.3.2.2051
[28 Jan 2011 22:44]
John Russell
Added to 2.3.2 and 2.2.4 change log: The command /etc/init.d/mysql-monitor-agent stop incorrectly returned the value 1 if the &merlin_agent; was already stopped. Now this command returns a value of 0 in this case.