1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-25 20:23:16 +03:00

MCOL-3551 Use generic MariaDB Server paths

This branch enforces the use of generic MariaDB server paths for their
binaries and data rather than custom paths.

/usr/local/mariadb/columnstore is now only for columnstore with this
patch.

It should be noted that this removes the auto-mounting of external
MariaDB UM data storage for AWS.

This is also a fix for MCOL-3510 after buildbot changes are made.

Also... MCOL-3552 Use columnstore.cnf to load plugins

The ColumnStore plugins now load using a columnstore.cnf instead of a
SQL sequence to be more in-line with MariaDB's methods.
This commit is contained in:
Andrew Hutchings
2019-10-10 14:28:02 +01:00
parent 5fd0873215
commit ebb22a96a3
58 changed files with 145 additions and 2143 deletions

View File

@@ -1697,23 +1697,6 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
break;
}
case RUNUPGRADE:
{
log.writeLog(__LINE__, "MSG RECEIVED: Run upgrade script ");
// run upgrade script
int ret = runUpgrade();
ackMsg << (ByteStream::byte) ACK;
ackMsg << (ByteStream::byte) RUNUPGRADE;
ackMsg << (ByteStream::byte) ret;
mq.write(ackMsg);
log.writeLog(__LINE__, "RUNUPGRADE: ACK back to ProcMgr return status = " + oam.itoa((int) ret));
break;
}
case PROCUNMOUNT:
{
string dbrootID;
@@ -5916,86 +5899,6 @@ bool ProcessMonitor::amazonVolumeCheck(int dbrootID)
MonitorLog log;
Oam oam;
if ( config.moduleType() == "um")
{
log.writeLog(__LINE__, "amazonVolumeCheck function called for User Module", LOG_TYPE_DEBUG);
string volumeNameID = "UMVolumeName" + oam.itoa(config.moduleID());
string volumeName = oam::UnassignedName;
string deviceNameID = "UMVolumeDeviceName" + oam.itoa(config.moduleID());
string deviceName = oam::UnassignedName;
try
{
oam.getSystemConfig( volumeNameID, volumeName);
oam.getSystemConfig( deviceNameID, deviceName);
}
catch (...)
{}
if ( volumeName.empty() || volumeName == oam::UnassignedName )
{
log.writeLog(__LINE__, "amazonVolumeCheck function exiting, no volume assigned ", LOG_TYPE_WARNING);
return false;
}
string status = oam.getEC2VolumeStatus(volumeName);
if ( status == "attached" )
{
string cmd;
string mountLog = tmpLogDir + "/um_mount.log";
cmd = SUDO + "mount " + deviceName + " " + startup::StartUp::installDir() + "/mysql/db -t ext2 -o noatime,nodiratime,user > " + mountLog;
system(cmd.c_str());
log.writeLog(__LINE__, "mount cmd: " + cmd, LOG_TYPE_DEBUG);
cmd = SUDO + "chown -R " + USER + ":" + USER + " " + startup::StartUp::installDir() + "/mysql/db";
system(cmd.c_str());
log.writeLog(__LINE__, "amazonVolumeCheck function successfully completed, volume attached: " + volumeName, LOG_TYPE_DEBUG);
return true;
}
if ( status != "available" )
{
log.writeLog(__LINE__, "amazonVolumeCheck function failed, volume not attached and not available: " + volumeName, LOG_TYPE_WARNING);
return false;
}
else
{
//get Module HostName / InstanceName
string instanceName;
try
{
ModuleConfig moduleconfig;
oam.getSystemConfig(config.moduleName(), moduleconfig);
HostConfigList::iterator pt1 = moduleconfig.hostConfigList.begin();
instanceName = (*pt1).HostName;
}
catch (...)
{}
if (oam.attachEC2Volume(volumeName, deviceName, instanceName))
{
string cmd = SUDO + "mount " + deviceName + " " + startup::StartUp::installDir() + "/mysql/db -t ext2 -o noatime,nodiratime,user > /dev/null 2>&1";
system(cmd.c_str());
log.writeLog(__LINE__, "mount cmd: " + cmd, LOG_TYPE_DEBUG);
cmd = SUDO + "chown -R " + USER + ":" + USER + " " + startup::StartUp::installDir() + "/mysql/db";
system(cmd.c_str());
return true;
}
else
{
log.writeLog(__LINE__, "amazonVolumeCheck function failed, volume failed to attached: " + volumeName, LOG_TYPE_WARNING);
return false;
}
}
}
else
{
log.writeLog(__LINE__, "amazonVolumeCheck function called for DBRoot" + oam.itoa(dbrootID), LOG_TYPE_DEBUG);
@@ -6615,56 +6518,6 @@ int ProcessMonitor::glusterUnassign(std::string dbrootID)
return oam::API_SUCCESS;
}
/******************************************************************************************
* @brief runUpgrade
*
* purpose: run upgrade script
*
******************************************************************************************/
int ProcessMonitor::runUpgrade()
{
Oam oam;
string tmpLog = tmpLogDir + "/mysql_upgrade.log";
string mysqlpw = oam.getMySQLPassword();
string passwordOption = "";
if ( mysqlpw != oam::UnassignedName )
passwordOption = " --password=" + mysqlpw;
for ( int i = 0 ; i < 10 ; i++ )
{
//run upgrade script
string cmd = startup::StartUp::installDir() + "/mysql/bin/mysql_upgrade " +
passwordOption + " > " + tmpLog + " 2>&1";
log.writeLog(__LINE__, "runUpgrade, cmd = " + cmd, LOG_TYPE_DEBUG);
int retCode = system(cmd.c_str());
if ( retCode == 0 ) {
log.writeLog(__LINE__, "mysql_upgrade.sh: Successful return", LOG_TYPE_DEBUG);
return oam::API_SUCCESS;
}
else {
if (oam.checkLogStatus(cmd, "ERROR 1045") ) {
log.writeLog(__LINE__, "mysql_upgrade.sh: Missing Password error, return success", LOG_TYPE_DEBUG);
return oam::API_SUCCESS;
}
log.writeLog(__LINE__, "mysql_upgrade.sh: Error return, check log " + tmpLog, LOG_TYPE_ERROR);
//restart mysqld and retry
try {
oam.actionMysqlCalpont(MYSQL_RESTART);
}
catch(...)
{}
sleep(1);
}
}
return oam::API_FAILURE;
}
} //end of namespace
// vim:ts=4 sw=4: