You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
change GlusterConfig to DataRedundancyConfig in configuration file
This commit is contained in:
@@ -458,9 +458,9 @@
|
|||||||
<AmazonElasticIPCount>0</AmazonElasticIPCount>
|
<AmazonElasticIPCount>0</AmazonElasticIPCount>
|
||||||
<AmazonElasticIPAddr1>unassigned</AmazonElasticIPAddr1>
|
<AmazonElasticIPAddr1>unassigned</AmazonElasticIPAddr1>
|
||||||
<AmazonElasticModule1>unassigned</AmazonElasticModule1>
|
<AmazonElasticModule1>unassigned</AmazonElasticModule1>
|
||||||
<GlusterConfig>n</GlusterConfig>
|
<DataRedundancyConfig>n</DataRedundancyConfig>
|
||||||
<GlusterCopies>0</GlusterCopies>
|
<DataRedundancyCopies>0</DataRedundancyCopies>
|
||||||
<GlusterStorageType>unassigned</GlusterStorageType>
|
<DataRedundancyStorageType>unassigned</DataRedundancyStorageType>
|
||||||
<CoreFileFlag>n</CoreFileFlag>
|
<CoreFileFlag>n</CoreFileFlag>
|
||||||
<MySQLPort>3306</MySQLPort>
|
<MySQLPort>3306</MySQLPort>
|
||||||
<MySQLPasswordConfig>unassigned</MySQLPasswordConfig>
|
<MySQLPasswordConfig>unassigned</MySQLPasswordConfig>
|
||||||
|
@@ -5180,13 +5180,13 @@ namespace oam
|
|||||||
|
|
||||||
writeLog("manualMovePmDbroot: " + dbrootIDs + " from " + residePM + " to " + toPM, LOG_TYPE_DEBUG );
|
writeLog("manualMovePmDbroot: " + dbrootIDs + " from " + residePM + " to " + toPM, LOG_TYPE_DEBUG );
|
||||||
|
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
try {
|
try {
|
||||||
getSystemConfig( "GlusterConfig", GlusterConfig);
|
getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
GlusterConfig = "n";
|
DataRedundancyConfig = "n";
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::char_separator<char> sep(", ");
|
boost::char_separator<char> sep(", ");
|
||||||
@@ -5196,7 +5196,7 @@ namespace oam
|
|||||||
++it)
|
++it)
|
||||||
{
|
{
|
||||||
//if gluster, check if there are copies on the to-pm
|
//if gluster, check if there are copies on the to-pm
|
||||||
if ( GlusterConfig == "y")
|
if ( DataRedundancyConfig == "y")
|
||||||
{
|
{
|
||||||
string pmList = "";
|
string pmList = "";
|
||||||
try {
|
try {
|
||||||
@@ -5358,7 +5358,7 @@ namespace oam
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if Gluster, do the assign command
|
//if Gluster, do the assign command
|
||||||
if ( GlusterConfig == "y")
|
if ( DataRedundancyConfig == "y")
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
string errmsg;
|
string errmsg;
|
||||||
@@ -5454,16 +5454,16 @@ namespace oam
|
|||||||
}
|
}
|
||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
try {
|
try {
|
||||||
getSystemConfig( "GlusterConfig", GlusterConfig);
|
getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
GlusterConfig = "n";
|
DataRedundancyConfig = "n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DBRootStorageType == "internal" && GlusterConfig == "n")
|
if (DBRootStorageType == "internal" && DataRedundancyConfig == "n")
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// get current Module name
|
// get current Module name
|
||||||
@@ -5598,7 +5598,7 @@ namespace oam
|
|||||||
exceptionControl("autoMovePmDbroot", API_FAILURE);
|
exceptionControl("autoMovePmDbroot", API_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GlusterConfig == "y")
|
if ( DataRedundancyConfig == "y")
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
string errmsg;
|
string errmsg;
|
||||||
@@ -5644,7 +5644,7 @@ namespace oam
|
|||||||
{
|
{
|
||||||
//if Gluster, get it's list for DBroot and move to one of those
|
//if Gluster, get it's list for DBroot and move to one of those
|
||||||
string toPmID;
|
string toPmID;
|
||||||
if ( GlusterConfig == "y")
|
if ( DataRedundancyConfig == "y")
|
||||||
{
|
{
|
||||||
string pmList = "";
|
string pmList = "";
|
||||||
try {
|
try {
|
||||||
@@ -5869,16 +5869,16 @@ namespace oam
|
|||||||
}
|
}
|
||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
try {
|
try {
|
||||||
getSystemConfig( "GlusterConfig", GlusterConfig);
|
getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
GlusterConfig = "n";
|
DataRedundancyConfig = "n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DBRootStorageType == "internal" && GlusterConfig == "n")
|
if (DBRootStorageType == "internal" && DataRedundancyConfig == "n")
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
//store in move dbroot transaction file
|
//store in move dbroot transaction file
|
||||||
@@ -6457,13 +6457,13 @@ namespace oam
|
|||||||
cout << endl << "Changes being applied" << endl << endl;
|
cout << endl << "Changes being applied" << endl << endl;
|
||||||
|
|
||||||
//added entered dbroot IDs to to-PM list and do Gluster assign if needed
|
//added entered dbroot IDs to to-PM list and do Gluster assign if needed
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
try {
|
try {
|
||||||
getSystemConfig( "GlusterConfig", GlusterConfig);
|
getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
GlusterConfig = "n";
|
DataRedundancyConfig = "n";
|
||||||
}
|
}
|
||||||
|
|
||||||
DBRootConfigList::iterator pt3 = dbrootlist.begin();
|
DBRootConfigList::iterator pt3 = dbrootlist.begin();
|
||||||
@@ -6471,7 +6471,7 @@ namespace oam
|
|||||||
{
|
{
|
||||||
todbrootConfigList.push_back(*pt3);
|
todbrootConfigList.push_back(*pt3);
|
||||||
|
|
||||||
/* if ( GlusterConfig == "y")
|
/* if ( DataRedundancyConfig == "y")
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
string errmsg;
|
string errmsg;
|
||||||
@@ -6805,12 +6805,12 @@ namespace oam
|
|||||||
int SystemDBRootCount = 0;
|
int SystemDBRootCount = 0;
|
||||||
string cloud;
|
string cloud;
|
||||||
string DBRootStorageType;
|
string DBRootStorageType;
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
try {
|
try {
|
||||||
getSystemConfig("DBRootCount", SystemDBRootCount);
|
getSystemConfig("DBRootCount", SystemDBRootCount);
|
||||||
getSystemConfig("Cloud", cloud);
|
getSystemConfig("Cloud", cloud);
|
||||||
getSystemConfig("DBRootStorageType", DBRootStorageType);
|
getSystemConfig("DBRootStorageType", DBRootStorageType);
|
||||||
getSystemConfig("GlusterConfig", GlusterConfig);
|
getSystemConfig("DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
@@ -6896,7 +6896,7 @@ namespace oam
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if gluster, request volume delete
|
// if gluster, request volume delete
|
||||||
if ( GlusterConfig == "y")
|
if ( DataRedundancyConfig == "y")
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
string errmsg1;
|
string errmsg1;
|
||||||
@@ -8261,7 +8261,7 @@ namespace oam
|
|||||||
int numberDBRootsPerPM = numberNewDBRoots/numberNewPMs;
|
int numberDBRootsPerPM = numberNewDBRoots/numberNewPMs;
|
||||||
|
|
||||||
std::vector<int> dbrootPms[dbrootCount];
|
std::vector<int> dbrootPms[dbrootCount];
|
||||||
DataRedundancyConfig DataRedundancyConfigs[numberPMs];
|
DataRedundancySetup DataRedundancyConfigs[numberPMs];
|
||||||
int startDBRootID = dbrootID;
|
int startDBRootID = dbrootID;
|
||||||
|
|
||||||
for (int pm=(pmID-1); pm < numberPMs; pm++,startDBRootID++)
|
for (int pm=(pmID-1); pm < numberPMs; pm++,startDBRootID++)
|
||||||
@@ -9582,18 +9582,18 @@ namespace oam
|
|||||||
}
|
}
|
||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
try {
|
try {
|
||||||
getSystemConfig( "GlusterConfig", GlusterConfig);
|
getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
GlusterConfig = "n";
|
DataRedundancyConfig = "n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (DBRootStorageType == "external" && GlusterConfig == "n")
|
if ( (DBRootStorageType == "external" && DataRedundancyConfig == "n")
|
||||||
||
|
||
|
||||||
(GlusterConfig == "y" && !mount) )
|
(DataRedundancyConfig == "y" && !mount) )
|
||||||
{
|
{
|
||||||
dbrootList::iterator pt3 = dbrootConfigList.begin();
|
dbrootList::iterator pt3 = dbrootConfigList.begin();
|
||||||
for( ; pt3 != dbrootConfigList.end() ; pt3++)
|
for( ; pt3 != dbrootConfigList.end() ; pt3++)
|
||||||
|
@@ -1303,7 +1303,7 @@ namespace oam
|
|||||||
};
|
};
|
||||||
typedef std::vector<DataRedundancyStorageSetup> DataRedundancyStorage;
|
typedef std::vector<DataRedundancyStorageSetup> DataRedundancyStorage;
|
||||||
|
|
||||||
struct DataRedundancyConfig_s
|
struct DataRedundancySetup_s
|
||||||
{
|
{
|
||||||
int pmID;
|
int pmID;
|
||||||
std::string pmHostname;
|
std::string pmHostname;
|
||||||
@@ -1311,7 +1311,7 @@ namespace oam
|
|||||||
std::vector<int> dbrootCopies;
|
std::vector<int> dbrootCopies;
|
||||||
DataRedundancyStorage storageLocations;
|
DataRedundancyStorage storageLocations;
|
||||||
};
|
};
|
||||||
typedef struct DataRedundancyConfig_s DataRedundancyConfig;
|
typedef struct DataRedundancySetup_s DataRedundancySetup;
|
||||||
|
|
||||||
// username / password for smbclient use
|
// username / password for smbclient use
|
||||||
const std::string USERNAME = "oamuser";
|
const std::string USERNAME = "oamuser";
|
||||||
|
@@ -1876,17 +1876,17 @@ int processCommand(string* arguments)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string GlusterConfig;
|
string DataRedundancyConfig;
|
||||||
string DataRedundancyCopies;
|
string DataRedundancyCopies;
|
||||||
string DataRedundancyStorageType;
|
string DataRedundancyStorageType;
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig("GlusterConfig", GlusterConfig);
|
oam.getSystemConfig("DataRedundancyConfig", DataRedundancyConfig);
|
||||||
oam.getSystemConfig("DataRedundancyCopies", DataRedundancyCopies);
|
oam.getSystemConfig("DataRedundancyCopies", DataRedundancyCopies);
|
||||||
oam.getSystemConfig("DataRedundancyStorageType", DataRedundancyStorageType);
|
oam.getSystemConfig("DataRedundancyStorageType", DataRedundancyStorageType);
|
||||||
}
|
}
|
||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
if ( GlusterConfig == "y" )
|
if ( DataRedundancyConfig == "y" )
|
||||||
{
|
{
|
||||||
cout << endl << "Data Redundant Configuration" << endl << endl;
|
cout << endl << "Data Redundant Configuration" << endl << endl;
|
||||||
cout << "Copies Per DBroot = " << DataRedundancyCopies << endl;
|
cout << "Copies Per DBroot = " << DataRedundancyCopies << endl;
|
||||||
@@ -1952,14 +1952,14 @@ int processCommand(string* arguments)
|
|||||||
|
|
||||||
case 14: // addDbroot parameters: dbroot-number
|
case 14: // addDbroot parameters: dbroot-number
|
||||||
{
|
{
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig( "GlusterConfig", GlusterConfig);
|
oam.getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
if (GlusterConfig == "y") {
|
if (DataRedundancyConfig == "y") {
|
||||||
cout << endl << "**** addDbroot Not Supported on Data Redundancy Configured System, use addModule command to expand your capacity" << endl;
|
cout << endl << "**** addDbroot Not Supported on Data Redundancy Configured System, use addModule command to expand your capacity" << endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2042,9 +2042,9 @@ int processCommand(string* arguments)
|
|||||||
case 15: // removeDbroot parameters: dbroot-list
|
case 15: // removeDbroot parameters: dbroot-list
|
||||||
{
|
{
|
||||||
|
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig( "GlusterConfig", GlusterConfig);
|
oam.getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{}
|
{}
|
||||||
@@ -3262,15 +3262,15 @@ int processCommand(string* arguments)
|
|||||||
}
|
}
|
||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
oam.getSystemConfig( "GlusterConfig", GlusterConfig);
|
oam.getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
if (DBRootStorageType == "internal" && GlusterConfig == "n")
|
if (DBRootStorageType == "internal" && DataRedundancyConfig == "n")
|
||||||
{
|
{
|
||||||
cout << endl << "**** switchParentOAMModule Failed : DBRoot Storage type = internal/non-data-replication" << endl;
|
cout << endl << "**** switchParentOAMModule Failed : DBRoot Storage type = internal/non-data-replication" << endl;
|
||||||
break;
|
break;
|
||||||
@@ -3307,7 +3307,7 @@ int processCommand(string* arguments)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//check for gluster system is do-able
|
//check for gluster system is do-able
|
||||||
if (GlusterConfig == "y")
|
if (DataRedundancyConfig == "y")
|
||||||
{
|
{
|
||||||
// get to-module assigned DBRoots and see if current active PM
|
// get to-module assigned DBRoots and see if current active PM
|
||||||
// has a copy
|
// has a copy
|
||||||
@@ -3574,17 +3574,17 @@ int processCommand(string* arguments)
|
|||||||
cout << endl << "**** getSystemStatus Failed = " << e.what() << endl;
|
cout << endl << "**** getSystemStatus Failed = " << e.what() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
string GlusterConfig;
|
string DataRedundancyConfig;
|
||||||
string DataRedundancyCopies;
|
string DataRedundancyCopies;
|
||||||
string DataRedundancyStorageType;
|
string DataRedundancyStorageType;
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig("GlusterConfig", GlusterConfig);
|
oam.getSystemConfig("DataRedundancyConfig", DataRedundancyConfig);
|
||||||
oam.getSystemConfig("DataRedundancyCopies", DataRedundancyCopies);
|
oam.getSystemConfig("DataRedundancyCopies", DataRedundancyCopies);
|
||||||
oam.getSystemConfig("DataRedundancyStorageType", DataRedundancyStorageType);
|
oam.getSystemConfig("DataRedundancyStorageType", DataRedundancyStorageType);
|
||||||
}
|
}
|
||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
if ( GlusterConfig == "y" )
|
if ( DataRedundancyConfig == "y" )
|
||||||
{
|
{
|
||||||
string arg1 = "";
|
string arg1 = "";
|
||||||
string arg2 = "";
|
string arg2 = "";
|
||||||
@@ -3754,13 +3754,13 @@ int processCommand(string* arguments)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if gluster, check if toPM is has a copy
|
//if gluster, check if toPM is has a copy
|
||||||
string GlusterConfig;
|
string DataRedundancyConfig;
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig("GlusterConfig", GlusterConfig);
|
oam.getSystemConfig("DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
if ( GlusterConfig == "y" )
|
if ( DataRedundancyConfig == "y" )
|
||||||
{
|
{
|
||||||
string pmList = "";
|
string pmList = "";
|
||||||
try {
|
try {
|
||||||
@@ -4224,16 +4224,16 @@ int processCommand(string* arguments)
|
|||||||
oam.getSystemConfig("DBRootStorageType", DBRootStorageType);
|
oam.getSystemConfig("DBRootStorageType", DBRootStorageType);
|
||||||
|
|
||||||
if (DBRootStorageType == "external" ){
|
if (DBRootStorageType == "external" ){
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
string cloud = oam::UnassignedName;
|
string cloud = oam::UnassignedName;
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig("Cloud", cloud);
|
oam.getSystemConfig("Cloud", cloud);
|
||||||
oam.getSystemConfig( "GlusterConfig", GlusterConfig);
|
oam.getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
if ( GlusterConfig == "n" && cloud == oam::UnassignedName)
|
if ( DataRedundancyConfig == "n" && cloud == oam::UnassignedName)
|
||||||
cout << " REMINDER: Update the /etc/fstab on " << toPM << " to include these dbroot mounts" << endl << endl;
|
cout << " REMINDER: Update the /etc/fstab on " << toPM << " to include these dbroot mounts" << endl << endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -5103,7 +5103,7 @@ int processCommand(string* arguments)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
int DataRedundancyCopies;
|
int DataRedundancyCopies;
|
||||||
string cloud = oam::UnassignedName;
|
string cloud = oam::UnassignedName;
|
||||||
int DataRedundancyNetworkType;
|
int DataRedundancyNetworkType;
|
||||||
@@ -5113,7 +5113,7 @@ int processCommand(string* arguments)
|
|||||||
try {
|
try {
|
||||||
oam.getSystemConfig("Cloud", cloud);
|
oam.getSystemConfig("Cloud", cloud);
|
||||||
oam.getSystemConfig("AmazonVPCNextPrivateIP", AmazonVPCNextPrivateIP);
|
oam.getSystemConfig("AmazonVPCNextPrivateIP", AmazonVPCNextPrivateIP);
|
||||||
oam.getSystemConfig("GlusterConfig", GlusterConfig);
|
oam.getSystemConfig("DataRedundancyConfig", DataRedundancyConfig);
|
||||||
oam.getSystemConfig("DataRedundancyCopies", DataRedundancyCopies);
|
oam.getSystemConfig("DataRedundancyCopies", DataRedundancyCopies);
|
||||||
oam.getSystemConfig("DataRedundancyNetworkType", DataRedundancyNetworkType);
|
oam.getSystemConfig("DataRedundancyNetworkType", DataRedundancyNetworkType);
|
||||||
oam.getSystemConfig("DataRedundancyStorageType", DataRedundancyStorageType);
|
oam.getSystemConfig("DataRedundancyStorageType", DataRedundancyStorageType);
|
||||||
@@ -5206,7 +5206,7 @@ int processCommand(string* arguments)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GlusterConfig == "y" && moduleType == "pm" ) {
|
if ( DataRedundancyConfig == "y" && moduleType == "pm" ) {
|
||||||
if ( localModule != parentOAMModule ) {
|
if ( localModule != parentOAMModule ) {
|
||||||
// exit out since not on active module
|
// exit out since not on active module
|
||||||
cout << endl << "**** addModule Failed : Can only run command on Active OAM Parent Module (" << parentOAMModule << ")." << endl;
|
cout << endl << "**** addModule Failed : Can only run command on Active OAM Parent Module (" << parentOAMModule << ")." << endl;
|
||||||
@@ -5435,7 +5435,7 @@ int processCommand(string* arguments)
|
|||||||
devicenetworkconfig.hostConfigList.clear();
|
devicenetworkconfig.hostConfigList.clear();
|
||||||
moduleName.clear();
|
moduleName.clear();
|
||||||
|
|
||||||
if ( GlusterConfig == "y" && DataRedundancyNetworkType == 2 && moduleType == "pm")
|
if ( DataRedundancyConfig == "y" && DataRedundancyNetworkType == 2 && moduleType == "pm")
|
||||||
{
|
{
|
||||||
string DataRedundancyIPAddress = sysConfig->getConfig("DataRedundancyConfig",dataDupIPaddr);
|
string DataRedundancyIPAddress = sysConfig->getConfig("DataRedundancyConfig",dataDupIPaddr);
|
||||||
string DataRedundancyHostname = sysConfig->getConfig("DataRedundancyConfig",dataDupHostName);
|
string DataRedundancyHostname = sysConfig->getConfig("DataRedundancyConfig",dataDupHostName);
|
||||||
@@ -5463,7 +5463,7 @@ int processCommand(string* arguments)
|
|||||||
storageDeviceList storagedevicelist;
|
storageDeviceList storagedevicelist;
|
||||||
string deviceType;
|
string deviceType;
|
||||||
|
|
||||||
if ( GlusterConfig == "y" && moduleType == "pm")
|
if ( DataRedundancyConfig == "y" && moduleType == "pm")
|
||||||
{
|
{
|
||||||
cout << endl << "System is configured with Data Redundancy, DBRoot Storage will" << endl;
|
cout << endl << "System is configured with Data Redundancy, DBRoot Storage will" << endl;
|
||||||
cout << "will be created with the Modules during this command." << endl;
|
cout << "will be created with the Modules during this command." << endl;
|
||||||
@@ -5528,7 +5528,7 @@ int processCommand(string* arguments)
|
|||||||
|
|
||||||
cout << "Add Module(s) successfully completed" << endl;
|
cout << "Add Module(s) successfully completed" << endl;
|
||||||
|
|
||||||
if ( GlusterConfig == "y" && moduleType == "pm" ) {
|
if ( DataRedundancyConfig == "y" && moduleType == "pm" ) {
|
||||||
|
|
||||||
{
|
{
|
||||||
//send messages to update fstab to new modules, if needed
|
//send messages to update fstab to new modules, if needed
|
||||||
|
@@ -93,13 +93,13 @@ void diskMonitor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//get Gluster Config setting
|
//get Gluster Config setting
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig( "GlusterConfig", GlusterConfig);
|
oam.getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
GlusterConfig = "n";
|
DataRedundancyConfig = "n";
|
||||||
}
|
}
|
||||||
|
|
||||||
int diskSpaceCheck = 0;
|
int diskSpaceCheck = 0;
|
||||||
@@ -323,7 +323,7 @@ void diskMonitor()
|
|||||||
|
|
||||||
//check for external file systems/devices
|
//check for external file systems/devices
|
||||||
if (Externalflag ||
|
if (Externalflag ||
|
||||||
(!Externalflag && GlusterConfig == "y" && moduleType == "pm") ){
|
(!Externalflag && DataRedundancyConfig == "y" && moduleType == "pm") ){
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DBRootConfigList dbrootConfigList;
|
DBRootConfigList dbrootConfigList;
|
||||||
@@ -566,7 +566,7 @@ void diskMonitor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//do Gluster status check, if configured
|
//do Gluster status check, if configured
|
||||||
if ( GlusterConfig == "y")
|
if ( DataRedundancyConfig == "y")
|
||||||
{
|
{
|
||||||
bool pass = true;
|
bool pass = true;
|
||||||
string errmsg = "unknown";
|
string errmsg = "unknown";
|
||||||
|
@@ -51,7 +51,7 @@ bool amazon = false;
|
|||||||
string PMInstanceType;
|
string PMInstanceType;
|
||||||
string UMInstanceType;
|
string UMInstanceType;
|
||||||
string AmazonPMFailover = "y";
|
string AmazonPMFailover = "y";
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
bool rootUser = true;
|
bool rootUser = true;
|
||||||
string USER = "root";
|
string USER = "root";
|
||||||
bool HDFS = false;
|
bool HDFS = false;
|
||||||
@@ -153,11 +153,11 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
//get gluster config
|
//get gluster config
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig( "GlusterConfig", GlusterConfig);
|
oam.getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
GlusterConfig = "n";
|
DataRedundancyConfig = "n";
|
||||||
}
|
}
|
||||||
|
|
||||||
//hdfs / hadoop config
|
//hdfs / hadoop config
|
||||||
|
@@ -48,7 +48,7 @@ extern bool runStandby;
|
|||||||
extern string iface_name;
|
extern string iface_name;
|
||||||
extern string PMInstanceType;
|
extern string PMInstanceType;
|
||||||
extern string UMInstanceType;
|
extern string UMInstanceType;
|
||||||
extern string GlusterConfig;
|
extern string DataRedundancyConfig;
|
||||||
extern bool rootUser;
|
extern bool rootUser;
|
||||||
extern string USER;
|
extern string USER;
|
||||||
extern bool HDFS;
|
extern bool HDFS;
|
||||||
@@ -8539,7 +8539,7 @@ int ProcessManager::switchParentOAMModule(std::string newActiveModuleName)
|
|||||||
|
|
||||||
log.writeLog(__LINE__, "switchParentOAMModule Function Started", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "switchParentOAMModule Function Started", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
if ( DBRootStorageType == "internal" && GlusterConfig == "n") {
|
if ( DBRootStorageType == "internal" && DataRedundancyConfig == "n") {
|
||||||
log.writeLog(__LINE__, "ERROR: DBRootStorageType = internal", LOG_TYPE_ERROR);
|
log.writeLog(__LINE__, "ERROR: DBRootStorageType = internal", LOG_TYPE_ERROR);
|
||||||
pthread_mutex_unlock(&THREAD_LOCK);
|
pthread_mutex_unlock(&THREAD_LOCK);
|
||||||
return API_INVALID_PARAMETER;
|
return API_INVALID_PARAMETER;
|
||||||
@@ -9138,7 +9138,7 @@ int ProcessManager::OAMParentModuleChange()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( DBRootStorageType == "internal" && failover && GlusterConfig == "n")
|
if ( DBRootStorageType == "internal" && failover && DataRedundancyConfig == "n")
|
||||||
{
|
{
|
||||||
log.writeLog(__LINE__, "DBRoot Storage configured for internal, don't do standby-active failover", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "DBRoot Storage configured for internal, don't do standby-active failover", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
@@ -9537,7 +9537,7 @@ std::string ProcessManager::getStandbyModule()
|
|||||||
|
|
||||||
//check if gluster, if so then find PMs that have copies of DBROOT #1
|
//check if gluster, if so then find PMs that have copies of DBROOT #1
|
||||||
string pmList = "";
|
string pmList = "";
|
||||||
if (GlusterConfig == "y") {
|
if (DataRedundancyConfig == "y") {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
string errmsg;
|
string errmsg;
|
||||||
@@ -10024,7 +10024,7 @@ int ProcessManager::mountDBRoot(std::string dbrootID)
|
|||||||
ProcessManager processManager(config, log);
|
ProcessManager processManager(config, log);
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
if (GlusterConfig == "y")
|
if (DataRedundancyConfig == "y")
|
||||||
return oam::API_SUCCESS;
|
return oam::API_SUCCESS;
|
||||||
|
|
||||||
//get pm assigned to that dbroot
|
//get pm assigned to that dbroot
|
||||||
|
@@ -47,7 +47,7 @@ static void mysqlMonitorThread(MonitorConfig config);
|
|||||||
string systemOAM;
|
string systemOAM;
|
||||||
string dm_server;
|
string dm_server;
|
||||||
string cloud;
|
string cloud;
|
||||||
string GlusterConfig = "n";
|
string DataRedundancyConfig = "n";
|
||||||
bool HDFS = false;
|
bool HDFS = false;
|
||||||
|
|
||||||
void updateShareMemory(processStatusList* aPtr);
|
void updateShareMemory(processStatusList* aPtr);
|
||||||
@@ -207,14 +207,14 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
//get gluster config
|
//get gluster config
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig( "GlusterConfig", GlusterConfig);
|
oam.getSystemConfig( "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
GlusterConfig = "n";
|
DataRedundancyConfig = "n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GlusterConfig == "y" ) {
|
if ( DataRedundancyConfig == "y" ) {
|
||||||
system("mount -a > /dev/null 2>&1");
|
system("mount -a > /dev/null 2>&1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -524,7 +524,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
//check if gluster, if so then find PMs that have copies of DBROOT #1
|
//check if gluster, if so then find PMs that have copies of DBROOT #1
|
||||||
string pmList = "";
|
string pmList = "";
|
||||||
if (GlusterConfig == "y") {
|
if (DataRedundancyConfig == "y") {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
string errmsg;
|
string errmsg;
|
||||||
@@ -2021,7 +2021,7 @@ static void statusControlThread()
|
|||||||
|
|
||||||
std::vector<string>dbrootList;
|
std::vector<string>dbrootList;
|
||||||
if ( DBRootStorageType == "external" ||
|
if ( DBRootStorageType == "external" ||
|
||||||
GlusterConfig == "y") {
|
DataRedundancyConfig == "y") {
|
||||||
//get system dbroots
|
//get system dbroots
|
||||||
DBRootConfigList dbrootConfigList;
|
DBRootConfigList dbrootConfigList;
|
||||||
try
|
try
|
||||||
|
@@ -46,7 +46,7 @@ extern bool runStandby;
|
|||||||
extern bool processInitComplete;
|
extern bool processInitComplete;
|
||||||
extern int fmoduleNumber;
|
extern int fmoduleNumber;
|
||||||
extern string cloud;
|
extern string cloud;
|
||||||
extern string GlusterConfig;
|
extern string DataRedundancyConfig;
|
||||||
extern bool rootUser;
|
extern bool rootUser;
|
||||||
extern string USER;
|
extern string USER;
|
||||||
extern bool HDFS;
|
extern bool HDFS;
|
||||||
@@ -1615,7 +1615,7 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
|
|||||||
flushInodeCache();
|
flushInodeCache();
|
||||||
|
|
||||||
int return_status = API_SUCCESS;
|
int return_status = API_SUCCESS;
|
||||||
if (GlusterConfig == "n")
|
if (DataRedundancyConfig == "n")
|
||||||
{
|
{
|
||||||
int retry = 1;
|
int retry = 1;
|
||||||
for ( ; retry < 5 ; retry++)
|
for ( ; retry < 5 ; retry++)
|
||||||
@@ -1689,7 +1689,7 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
|
|||||||
log.writeLog(__LINE__, "MSG RECEIVED: Mount DBRoot: " + dbrootID);;
|
log.writeLog(__LINE__, "MSG RECEIVED: Mount DBRoot: " + dbrootID);;
|
||||||
|
|
||||||
int return_status = API_SUCCESS;
|
int return_status = API_SUCCESS;
|
||||||
if (GlusterConfig == "n")
|
if (DataRedundancyConfig == "n")
|
||||||
{
|
{
|
||||||
string cmd = "export LC_ALL=C;mount " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/mount.txt 2>&1";
|
string cmd = "export LC_ALL=C;mount " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/mount.txt 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
@@ -2461,7 +2461,7 @@ pid_t ProcessMonitor::startProcess(string processModuleType, string processName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// now delete the dbrm data from local disk
|
// now delete the dbrm data from local disk
|
||||||
if ( !gOAMParentModuleFlag && !HDFS && GlusterConfig == "n") {
|
if ( !gOAMParentModuleFlag && !HDFS && DataRedundancyConfig == "n") {
|
||||||
string cmd = "rm -f " + DBRMDir + "/*";
|
string cmd = "rm -f " + DBRMDir + "/*";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
log.writeLog(__LINE__, "removed DBRM file with command: " + cmd, LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "removed DBRM file with command: " + cmd, LOG_TYPE_DEBUG);
|
||||||
@@ -5719,12 +5719,12 @@ void ProcessMonitor::unmountExtraDBroots()
|
|||||||
oam.getSystemConfig("DBRootStorageType", DBRootStorageType);
|
oam.getSystemConfig("DBRootStorageType", DBRootStorageType);
|
||||||
|
|
||||||
if ( DBRootStorageType == "hdfs" ||
|
if ( DBRootStorageType == "hdfs" ||
|
||||||
( DBRootStorageType == "internal" && GlusterConfig == "n") )
|
( DBRootStorageType == "internal" && DataRedundancyConfig == "n") )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
// if (GlusterConfig == "y")
|
// if (DataRedundancyConfig == "y")
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -5755,7 +5755,7 @@ void ProcessMonitor::unmountExtraDBroots()
|
|||||||
|
|
||||||
if (config.moduleID() != moduleID)
|
if (config.moduleID() != moduleID)
|
||||||
{
|
{
|
||||||
if ( GlusterConfig == "n" )
|
if ( DataRedundancyConfig == "n" )
|
||||||
{
|
{
|
||||||
string cmd = "umount " + startup::StartUp::installDir() + "/data" + oam.itoa(id) + " > /dev/null 2>&1";
|
string cmd = "umount " + startup::StartUp::installDir() + "/data" + oam.itoa(id) + " > /dev/null 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
@@ -5863,7 +5863,7 @@ int ProcessMonitor::checkDataMount()
|
|||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
//asign DBRoot is gluster
|
//asign DBRoot is gluster
|
||||||
if (GlusterConfig == "y")
|
if (DataRedundancyConfig == "y")
|
||||||
{
|
{
|
||||||
vector<string>::iterator p = dbrootList.begin();
|
vector<string>::iterator p = dbrootList.begin();
|
||||||
while ( p != dbrootList.end() )
|
while ( p != dbrootList.end() )
|
||||||
@@ -5886,7 +5886,7 @@ int ProcessMonitor::checkDataMount()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( DBRootStorageType == "hdfs" ||
|
if ( DBRootStorageType == "hdfs" ||
|
||||||
(DBRootStorageType == "internal" && GlusterConfig == "n") ) {
|
(DBRootStorageType == "internal" && DataRedundancyConfig == "n") ) {
|
||||||
//create OAM-Test-Flag
|
//create OAM-Test-Flag
|
||||||
vector<string>::iterator p = dbrootList.begin();
|
vector<string>::iterator p = dbrootList.begin();
|
||||||
while ( p != dbrootList.end() )
|
while ( p != dbrootList.end() )
|
||||||
@@ -5921,7 +5921,7 @@ int ProcessMonitor::checkDataMount()
|
|||||||
string dbroot = installDir + "/data" + *p;
|
string dbroot = installDir + "/data" + *p;
|
||||||
string fileName = dbroot + "/OAMdbrootCheck";
|
string fileName = dbroot + "/OAMdbrootCheck";
|
||||||
|
|
||||||
if ( GlusterConfig == "n" ) {
|
if ( DataRedundancyConfig == "n" ) {
|
||||||
//remove any local check flag for starters
|
//remove any local check flag for starters
|
||||||
string cmd = "umount " + dbroot + " > /tmp/umount.txt 2>&1";
|
string cmd = "umount " + dbroot + " > /tmp/umount.txt 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
@@ -201,21 +201,21 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
//set gluster flag if it exists
|
//set gluster flag if it exists
|
||||||
string GlusterConfig;
|
string DataRedundancyConfig;
|
||||||
string GlusterCopies;
|
string DataRedundancyCopies;
|
||||||
string GlusterStorageType;
|
string DataRedundancyStorageType;
|
||||||
try {
|
try {
|
||||||
GlusterConfig = sysConfigOld->getConfig(InstallSection, "GlusterConfig");
|
DataRedundancyConfig = sysConfigOld->getConfig(InstallSection, "DataRedundancyConfig");
|
||||||
GlusterCopies = sysConfigOld->getConfig(InstallSection, "GlusterCopies");
|
DataRedundancyCopies = sysConfigOld->getConfig(InstallSection, "DataRedundancyCopies");
|
||||||
GlusterStorageType = sysConfigOld->getConfig(InstallSection, "GlusterStorageType");
|
DataRedundancyStorageType = sysConfigOld->getConfig(InstallSection, "DataRedundancyStorageType");
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{}
|
{}
|
||||||
if ( !GlusterConfig.empty() ) {
|
if ( !DataRedundancyConfig.empty() ) {
|
||||||
try {
|
try {
|
||||||
sysConfigNew->setConfig(InstallSection, "GlusterConfig", GlusterConfig);
|
sysConfigNew->setConfig(InstallSection, "DataRedundancyConfig", DataRedundancyConfig);
|
||||||
sysConfigNew->setConfig(InstallSection, "GlusterCopies", GlusterCopies);
|
sysConfigNew->setConfig(InstallSection, "DataRedundancyCopies", DataRedundancyCopies);
|
||||||
sysConfigNew->setConfig(InstallSection, "GlusterStorageType", GlusterStorageType);
|
sysConfigNew->setConfig(InstallSection, "DataRedundancyStorageType", DataRedundancyStorageType);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{}
|
{}
|
||||||
|
Reference in New Issue
Block a user