add fallback account suffix

git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@49 3f5042e3-fb1d-0410-be18-d6ca2573e517
This commit is contained in:
dev 2006-01-13 22:24:02 +00:00
parent d69a39ead7
commit 35f9a009c7
3 changed files with 24 additions and 10 deletions

View File

@ -1,4 +1,4 @@
VERSION 3.2.6p12
VERSION 3.2.6p14
PACKAGE moab
AUTHOR Cluster Resources, Inc

View File

@ -1 +1 @@
#define MSCHED_VERSION "maui-3.2.6p14-snap.1131673836"
#define MSCHED_VERSION ""

View File

@ -3560,10 +3560,6 @@ int MRMJobPreLoad(
/* NOTE: handling of tasklist information */
/* TaskList[] contains updated task ordering information */
/* must update both J->NodeList and J->Req[X]->NodeList */
/* this call should override, not add to existing info */
int MRMJobPostLoad(
@ -3588,6 +3584,7 @@ int MRMJobPostLoad(
char ErrMsg[MAX_MLINE];
char tmpLine[MAX_MLINE];
char tmpFBAccount[MAX_MLINE];
const char *FName = "MRMJobPostLoad";
@ -3814,14 +3811,31 @@ int MRMJobPostLoad(
J->Name,
MDefReason[Reason]);
if (Reason == mhrNoFunds)
/* Bug in the maui-gold interaction when FALLBACKACCOUNT is enabled
neccessitates this double check */
if (Reason == mhrNoFunds || Reason == mhrAMFailure)
{
/* If the fallbackaccount starts with a + then append it to the
primary accountname */
if (MAM[0].FallbackAccount[0] == '+')
{
snprintf(tmpFBAccount,sizeof(tmpFBAccount),"%s%s",
J->Cred.A->Name,
MAM[0].FallbackAccount + 1);
}
else
{
strcpy(tmpFBAccount,MAM[0].FallbackAccount);
}
DBG(3,fRM) DPrint("WARNING: insufficient allocation in account '%s' to run job '%s' (attempting fallback account '%s')\n",
J->Cred.A->Name,
J->Name,
MAM[0].FallbackAccount);
tmpFBAccount);
if (MAcctFind(MAM[0].FallbackAccount,&A) == SUCCESS)
if (MAcctFind(tmpFBAccount,&A) == SUCCESS)
{
J->Cred.A = A;
@ -3830,7 +3844,7 @@ int MRMJobPostLoad(
else
{
DBG(2,fRM) DPrint("ALERT: cannot locate fallback account '%s'\n",
MAM[0].FallbackAccount);
tmpFBAccount);
}
}
}