1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-3793 Fix UM ACTIVE / DEGRADED flip-flop

OAM mysqld status check was recording the pid of mysqld but this was
being masked by another variable. So on every ACTIVE check it would
flip to DEGRADED and on every DEGRADED check it would flip to ACTIVE.

Variable masking is now removed. Also fixed a typo in the systemd check.
This commit is contained in:
Andrew Hutchings
2020-02-17 09:53:02 +00:00
parent f9e5bdbc8d
commit 9605c951dc

View File

@ -7796,7 +7796,7 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
string pidtmp = tmpdir + "/mysql.pid";
int no_systemd = system("systemctl cat mariadb.server > /dev/null 2>&1");
int no_systemd = system("systemctl cat mariadb.service > /dev/null 2>&1");
switch (action)
{
@ -7938,7 +7938,7 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
FILE *cmd_pipe = popen("pidof -s mysqld", "r");
fgets(buf, 512, cmd_pipe);
pid_t pid = strtoul(buf, NULL, 10);
pid = strtoul(buf, NULL, 10);
pclose( cmd_pipe );
@ -7968,7 +7968,7 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
FILE *cmd_pipe = popen("pidof -s mysqld", "r");
fgets(buf, 512, cmd_pipe);
pid_t pid = strtoul(buf, NULL, 10);
pid = strtoul(buf, NULL, 10);
pclose( cmd_pipe );