You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-05 16:15:50 +03:00
change adddbroot for amazon
This commit is contained in:
@@ -14,7 +14,7 @@ fi
|
|||||||
|
|
||||||
if [ "$1" = "create" ]; then
|
if [ "$1" = "create" ]; then
|
||||||
if [ "$2" = "" ]; then
|
if [ "$2" = "" ]; then
|
||||||
echo "Enter of the volume, in GiB (1-1024)"
|
echo "Enter size of the volume, in GiB (1-1024)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
volumeSize="$2"
|
volumeSize="$2"
|
||||||
|
@@ -5930,7 +5930,7 @@ namespace oam
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void Oam::addDbroot(const int dbrootNumber, DBRootConfigList& dbrootlist)
|
void Oam::addDbroot(const int dbrootNumber, DBRootConfigList& dbrootlist, string EBSsize)
|
||||||
{
|
{
|
||||||
int SystemDBRootCount = 0;
|
int SystemDBRootCount = 0;
|
||||||
string cloud;
|
string cloud;
|
||||||
@@ -5957,6 +5957,20 @@ namespace oam
|
|||||||
if ( (cloud == "amazon-ec2" || cloud == "amazon-vpc") &&
|
if ( (cloud == "amazon-ec2" || cloud == "amazon-vpc") &&
|
||||||
DBRootStorageType == "external" )
|
DBRootStorageType == "external" )
|
||||||
{
|
{
|
||||||
|
if ( volumeSize == oam::UnassignedName )
|
||||||
|
{
|
||||||
|
if ( EBSsize != oam::UnassignedName ) {
|
||||||
|
volumeSize = EBSsize;
|
||||||
|
setSystemConfig("PMVolumeSize", volumeSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( EBSsize != oam::UnassignedName ) {
|
||||||
|
volumeSize = EBSsize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( newSystemDBRootCount > MAX_DBROOT_AMAZON )
|
if ( newSystemDBRootCount > MAX_DBROOT_AMAZON )
|
||||||
{
|
{
|
||||||
cout << "ERROR: Failed add, total Number of DBRoots would be over maximum of " << MAX_DBROOT_AMAZON << endl;
|
cout << "ERROR: Failed add, total Number of DBRoots would be over maximum of " << MAX_DBROOT_AMAZON << endl;
|
||||||
|
@@ -2244,7 +2244,7 @@ namespace oam
|
|||||||
/**
|
/**
|
||||||
*@brief add DBRoot
|
*@brief add DBRoot
|
||||||
*/
|
*/
|
||||||
EXPORT void addDbroot(const int dbrootNumber, DBRootConfigList& dbrootlist);
|
EXPORT void addDbroot(const int dbrootNumber, DBRootConfigList& dbrootlist, std::string EBSsize = oam::UnassignedName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@brief distribute Fstab Updates
|
*@brief distribute Fstab Updates
|
||||||
|
@@ -1684,6 +1684,17 @@ int processCommand(string* arguments)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string cloud;
|
||||||
|
bool amazon = false;
|
||||||
|
try {
|
||||||
|
oam.getSystemConfig("Cloud", cloud);
|
||||||
|
}
|
||||||
|
catch(...) {}
|
||||||
|
|
||||||
|
string::size_type pos = cloud.find("amazon",0);
|
||||||
|
if (pos != string::npos)
|
||||||
|
amazon = true;
|
||||||
|
|
||||||
if (arguments[1] == "")
|
if (arguments[1] == "")
|
||||||
{
|
{
|
||||||
// need atleast 1 arguments
|
// need atleast 1 arguments
|
||||||
@@ -1691,20 +1702,28 @@ int processCommand(string* arguments)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arguments[2] != "")
|
|
||||||
{
|
|
||||||
// error out if extra arguments exist to catch if they meant to use assigndbrootpmconfig
|
|
||||||
cout << endl << "**** addDbroot Failed : Extra Parameter passed, enter 'help' for additional information" << endl;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
int dbrootNumber = atoi(arguments[1].c_str());
|
int dbrootNumber = atoi(arguments[1].c_str());
|
||||||
|
|
||||||
|
string EBSsize = oam::UnassignedName;
|
||||||
|
if (amazon)
|
||||||
|
{
|
||||||
|
if ( arguments[2] != "")
|
||||||
|
EBSsize = arguments[2];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cout << endl;
|
||||||
|
oam.getSystemConfig("PMVolumeSize", EBSsize);
|
||||||
|
|
||||||
|
string prompt = "Enter EBS storage size in GB: (" + EBSsize + "): ";
|
||||||
|
EBSsize = dataPrompt(prompt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//get dbroots ids for reside PM
|
//get dbroots ids for reside PM
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DBRootConfigList dbrootlist;
|
DBRootConfigList dbrootlist;
|
||||||
oam.addDbroot(dbrootNumber, dbrootlist);
|
oam.addDbroot(dbrootNumber, dbrootlist, EBSsize);
|
||||||
|
|
||||||
cout << endl << " New DBRoot IDs added = ";
|
cout << endl << " New DBRoot IDs added = ";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user