You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Merge pull request #904 from LinuxJedi/plugin-load
MCOL-3551 Use generic MariaDB Server paths
This commit is contained in:
@ -2095,12 +2095,6 @@ int main(int argc, char* argv[])
|
||||
|
||||
cmd = "mkdir -p " + installDir + "/data1/mysqldb > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "mkdir -p " + installDir + "/mysql > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "cd " + installDir + "/mysql/;ln -s " + installDir + "/data1/mysqldb db > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
//install rpms
|
||||
|
@ -311,101 +311,6 @@ void mysqlSetup()
|
||||
return;
|
||||
}
|
||||
|
||||
/******************************************************************************************
|
||||
* @brief sendUpgradeRequest
|
||||
*
|
||||
* purpose: send Upgrade Request Msg to all ACTIVE UMs
|
||||
*
|
||||
*
|
||||
******************************************************************************************/
|
||||
int sendUpgradeRequest(int IserverTypeInstall, bool pmwithum)
|
||||
{
|
||||
Oam oam;
|
||||
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
ProcessStatus procstat;
|
||||
oam.getProcessStatus("WriteEngineServer", "pm1", procstat);
|
||||
|
||||
if ( procstat.ProcessOpState == oam::ACTIVE)
|
||||
break;
|
||||
}
|
||||
catch (const std::exception& exc)
|
||||
{
|
||||
std::cerr << exc.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
SystemModuleTypeConfig systemmoduletypeconfig;
|
||||
|
||||
try
|
||||
{
|
||||
oam.getSystemConfig(systemmoduletypeconfig);
|
||||
}
|
||||
catch (const std::exception& exc)
|
||||
{
|
||||
std::cerr << exc.what() << std::endl;
|
||||
}
|
||||
|
||||
messageqcpp::ByteStream msg;
|
||||
messageqcpp::ByteStream::byte requestID = RUNUPGRADE;
|
||||
|
||||
msg << requestID;
|
||||
|
||||
int returnStatus = oam::API_SUCCESS;
|
||||
|
||||
for ( unsigned int i = 0; i < systemmoduletypeconfig.moduletypeconfig.size(); i++)
|
||||
{
|
||||
int moduleCount = systemmoduletypeconfig.moduletypeconfig[i].ModuleCount;
|
||||
|
||||
if ( moduleCount == 0)
|
||||
continue;
|
||||
|
||||
string moduleType = systemmoduletypeconfig.moduletypeconfig[i].ModuleType;
|
||||
|
||||
if ( moduleType == "um" ||
|
||||
( moduleType == "pm" && IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM ) ||
|
||||
( moduleType == "pm" && pmwithum ) )
|
||||
{
|
||||
|
||||
DeviceNetworkList::iterator pt = systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.begin();
|
||||
|
||||
for ( ; pt != systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.end(); pt++)
|
||||
{
|
||||
int opState = oam::ACTIVE;
|
||||
bool degraded;
|
||||
|
||||
try
|
||||
{
|
||||
oam.getModuleStatus((*pt).DeviceName, opState, degraded);
|
||||
|
||||
if (opState == oam::ACTIVE ||
|
||||
opState == oam::DEGRADED)
|
||||
{
|
||||
returnStatus = sendMsgProcMon( (*pt).DeviceName, msg, requestID, 30 );
|
||||
|
||||
if ( returnStatus != API_SUCCESS)
|
||||
{
|
||||
string tmpDir = startup::StartUp::tmpDir();
|
||||
|
||||
cout << "ERROR: Error return in running the MariaDB Columnstore Upgrade, check " + tmpDir + "/mysql_upgrade.log on " << (*pt).DeviceName << endl;
|
||||
return returnStatus;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (const std::exception& exc)
|
||||
{
|
||||
std::cerr << exc.what() << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return returnStatus;
|
||||
}
|
||||
|
||||
/******************************************************************************************
|
||||
* @brief sendReplicationRequest
|
||||
*
|
||||
|
@ -38,7 +38,6 @@ extern bool waitForActive();
|
||||
extern void dbrmDirCheck();
|
||||
extern void mysqlSetup();
|
||||
extern int sendMsgProcMon( std::string module, messageqcpp::ByteStream msg, int requestID, int timeout );
|
||||
extern int sendUpgradeRequest(int IserverTypeInstall, bool pmwithum = false);
|
||||
extern int sendReplicationRequest(int IserverTypeInstall, std::string password, bool pmwithum);
|
||||
extern void checkFilesPerPartion(int DBRootCount, Config* sysConfig);
|
||||
extern void checkMysqlPort( string& mysqlPort, Config* sysConfig);
|
||||
|
@ -995,19 +995,6 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
if ( oam.checkLogStatus(logFile, "System catalog appears to exist") )
|
||||
{
|
||||
/* cout << endl << "Run MariaDB Server Upgrade.. ";
|
||||
cout.flush();
|
||||
|
||||
//send message to procmon's to run upgrade script
|
||||
int status = sendUpgradeRequest(IserverTypeInstall);
|
||||
|
||||
if ( status != 0 ) {
|
||||
cout << endl << "MariaDB Columnstore Install Failed" << endl << endl;
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
cout << " DONE" << endl;
|
||||
*/
|
||||
cout.flush();
|
||||
}
|
||||
else
|
||||
|
@ -2962,15 +2962,6 @@ int main(int argc, char* argv[])
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
string pathID = installDir + "/mysql/db";
|
||||
|
||||
// check volume for attach and try to attach if not
|
||||
if ( !attachVolume(newModuleHostName, volumeName, deviceName, pathID) )
|
||||
{
|
||||
cout << "attachVolume error" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3871,19 +3862,6 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
if ( oam.checkLogStatus(dbbuilderLog, "System catalog appears to exist") )
|
||||
{
|
||||
/* cout << endl << "Run MariaDB Server Upgrade.. ";
|
||||
cout.flush();
|
||||
|
||||
//send message to procmon's to run upgrade script
|
||||
int status = sendUpgradeRequest(IserverTypeInstall, pmwithum);
|
||||
|
||||
if ( status != 0 ) {
|
||||
cout << endl << "MariaDB Columnstore Install Failed" << endl << endl;
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
cout << " DONE" << endl;
|
||||
*/
|
||||
cout.flush();
|
||||
}
|
||||
else
|
||||
|
@ -73,7 +73,7 @@ else
|
||||
$HOME/mariadb/columnstore/bin/post-install --installdir=$HOME/mariadb/columnstore
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$HOME/mariadb/columnstore
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib:$HOME/mariadb/columnstore/mysql/lib
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib
|
||||
|
||||
echo "${bold}Run postConfigure script${normal}"
|
||||
echo ""
|
||||
|
@ -79,7 +79,7 @@ else
|
||||
$HOME/mariadb/columnstore/bin/post-install --installdir=$HOME/mariadb/columnstore
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$HOME/mariadb/columnstore
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib:$HOME/mariadb/columnstore/mysql/lib
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib
|
||||
|
||||
echo "${bold}Run postConfigure script${normal}"
|
||||
echo ""
|
||||
|
@ -32,7 +32,7 @@ else
|
||||
$HOME/mariadb/columnstore/bin/post-install --installdir=$HOME/mariadb/columnstore
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$HOME/mariadb/columnstore
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib:$HOME/mariadb/columnstore/mysql/lib
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib
|
||||
|
||||
echo "Run postConfigure script"
|
||||
echo ""
|
||||
|
Reference in New Issue
Block a user