Fixing property for pid_file from "mysqladmin --print-defaults"

This will correctly report the status of the mysql process where the pid file is not in the default location

bug 1096212

Change-Id: Iab83b1c1c67baed7473373f978691d5895e5f4f0
This commit is contained in:
justin-hopper 2013-01-04 14:44:13 -08:00
parent cbe81d1461
commit f60bda25dc
2 changed files with 3 additions and 1 deletions

2
.gitignore vendored
View File

@ -18,3 +18,5 @@ rdtest.log
reddwarf/versioninfo
AUTHORS
Changelog
reddwarf.iml
atlassian-ide-plugin.xml

View File

@ -198,7 +198,7 @@ class MySqlAppStatus(object):
except ProcessExecutionError as e:
if not MYSQLD_ARGS:
MYSQLD_ARGS = load_mysqld_options()
pid_file = MYSQLD_ARGS.get('pid-file',
pid_file = MYSQLD_ARGS.get('pid_file',
'/var/run/mysqld/mysqld.pid')
if os.path.exists(pid_file):
LOG.info("Service Status is CRASHED.")