Просмотр исходного кода

Merge pull request #8960 from garonsky/HPCC-15637_specify_thor_slaves_and_master

HPCC-15637 envgen - set thor master option

Reviewed-By: Michael Gardner <michael.gardner@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 лет назад
Родитель
Сommit
fe8e9ebd92
1 измененных файлов с 8 добавлено и 4 удалено
  1. 8 4
      deployment/deployutils/wizardInputs.cpp

+ 8 - 4
deployment/deployutils/wizardInputs.cpp

@@ -295,6 +295,7 @@ CInstDetails* CWizardInputs::getServerIPMap(const char* compName, const char* bu
     else
     {
       unsigned x = 0;
+      unsigned origNumOfNodes(numOfNodes);
 
       for(; x < numOfNodes ; x++)
       {
@@ -305,7 +306,7 @@ CInstDetails* CWizardInputs::getServerIPMap(const char* compName, const char* bu
         else
           pIpAddrMap = &m_ipaddressSupport;
 
-        unsigned numOfIPSAlreadyTaken = getCntForAlreadyAssignedIPS(buildSetName);
+        unsigned numOfIPSAlreadyTaken = m_arrBuildSetsWithAssignedIPs.find(buildSetName) == NotFound ? getCntForAlreadyAssignedIPS(buildSetName) : x;
 
         if( numOfIPSAlreadyTaken < pIpAddrMap->ordinality())
           addToCompIPMap(buildSetName, pIpAddrMap->item(numOfIPSAlreadyTaken), compName);
@@ -342,9 +343,12 @@ CInstDetails* CWizardInputs::getServerIPMap(const char* compName, const char* bu
           else if (!strcmp(buildSetName, "roxie"))
             sb.clear().append("non-support ");
 
-          throw MakeStringException(-1, \
-            "Total nodes: %d (%d Support Nodes + %d Non-support Nodes)\nError: Cannot assign %d number of nodes for %s due to insufficient %s nodes available. Please enter different values", \
-            ips + ipns, ips, ipns, numOfNodes, sbBuildSet.str(), sb.str());
+          if (m_arrBuildSetsWithAssignedIPs.find(buildSetName) == NotFound)
+             throw MakeStringException(-1, \
+                "Total nodes: %d (%d Support Nodes + %d Non-support Nodes)\nError: Cannot assign %d number of nodes for %s due to insufficient %s nodes available. Please enter different values", \
+                ips + ipns, ips, ipns, numOfNodes, sbBuildSet.str(), sb.str());
+          else
+              throw MakeStringException(-1, "Total nodes required: %d\nError: Unable to assign %d nodes, no more assigned ip nodes available for %s", origNumOfNodes, origNumOfNodes - getCntForAlreadyAssignedIPS(buildSetName), buildSetName);
         }
         else{
           return m_compIpMap.getValue(buildSetName);