force reservations with feature list to be locked down to initially allocated node list

git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@11 3f5042e3-fb1d-0410-be18-d6ca2573e517
This commit is contained in:
dev 2005-07-15 01:47:31 +00:00
parent 02e6eefd2b
commit 8e156981cb
2 changed files with 35 additions and 1 deletions

View File

@ -1237,7 +1237,7 @@ int MResToXML(
int *AList;
char tmpString[MAX_MLINE];
char tmpString[MAX_MBUFFER];
if ((R == NULL) || (E == NULL))
{

View File

@ -6295,6 +6295,8 @@ int UIResCreate(
int index;
char Pattern[MAX_MBUFFER];
char *PatPtr;
int PatSize;
char *ptr;
char *TokPtr;
@ -6657,6 +6659,38 @@ int UIResCreate(
NodeCount = NIndex;
}
/* When the feature list is set, and a HOST_REGEX or "ALL"
* is used, we replace the Pattern with the resulting nodelist.
* This ensures the reservation is checkpointed properly */
if ((strcmp(FeatureList,NONE) != 0) && (strstr(Pattern,"TASKS") == NULL))
{
PatPtr = Pattern;
PatSize = sizeof(Pattern);
PatPtr[0] = '\0';
for (nindex = 0;nindex < NodeCount;nindex++)
{
if (PatSize < 100)
{
DBG(0,fSCHED) DPrint("ERROR: regex buffer overflow creating reservation '%s'\n", ResID);
return(FAILURE);
}
if (nindex != 0)
{
MUSNPrintF(&PatPtr,&PatSize,"|%s",
NodeList[nindex].N->Name);
}
else
{
MUSNPrintF(&PatPtr,&PatSize,"%s",
NodeList[nindex].N->Name);
}
}
}
/* translate dedicated proc request to per node proc request */
SPC = tmpRQ.DRes.Procs;