1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-3718 Use systemd instead of mysql-Columnstore

MariaDB server is now managed using systemd instead of our own
mysql-Columnstore script. This means that MariaDB server can be stopped
/ started independently of ColumnStore
This commit is contained in:
Andrew Hutchings
2020-02-01 14:25:35 +01:00
parent 18f6688470
commit 6cf6519019
10 changed files with 24 additions and 518 deletions

View File

@@ -7750,7 +7750,7 @@ int Oam::sendDeviceNotification(std::string deviceName, NOTIFICATION_TYPE type,
*
* Function: actionMysqlCalpont
*
* Purpose: mysql-Columnstore service command
* Purpose: systemctl mariadb.service command
*
****************************************************************************/
@@ -7790,8 +7790,7 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
else
return;
// check if mysql-Columnstore is installed
string mysqlscript = "mysql-Columnstore";
string mysqlscript = "systemctl";
string command;
@@ -7801,13 +7800,13 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
{
case MYSQL_START:
{
command = "start > " + tmpdir + "/actionMysqlCalpont.log 2>&1";
command = "start";
break;
}
case MYSQL_STOP:
{
command = "stop > " + tmpdir + "/actionMysqlCalpont.log 2>&1";
command = "stop";
//set process status
try
@@ -7822,25 +7821,25 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
case MYSQL_RESTART:
{
command = "restart > " + tmpdir + "/actionMysqlCalpont.log 2>&1";
command = "restart";
break;
}
case MYSQL_RELOAD:
{
command = "reload > " + tmpdir + "/actionMysqlCalpont.log 2>&1";
command = "reload";
break;
}
case MYSQL_FORCE_RELOAD:
{
command = "force-reload > " + tmpdir + "/actionMysqlCalpont.log 2>&1";
command = "force-reload";
break;
}
case MYSQL_STATUS:
{
command = "status > " + tmpdir + "/mysql.status";
command = "status";
break;
}
@@ -7852,7 +7851,7 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
}
//RUN COMMAND
string cmd = mysqlscript + " " + command;
string cmd = mysqlscript + " " + command + " mariadb.service > " + tmpdir + "/actionMysqlCalpont.log 2>&1";
system(cmd.c_str());
if (action == MYSQL_START || action == MYSQL_RESTART)