Commit dfd3679a authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add check of swap/admission_control_debug to set debug on/off.

Drop the backup table I create when updating the permissions table so
that schema-scheck does not complain.
parent f6241939
...@@ -1030,6 +1030,7 @@ sub UpdateNodeTypeXpidPermissions() ...@@ -1030,6 +1030,7 @@ sub UpdateNodeTypeXpidPermissions()
" libadminctrl_table TO nodetypeXpid_permissions "); " libadminctrl_table TO nodetypeXpid_permissions ");
DBQueryWarn("drop table if exists libadminctrl_table"); DBQueryWarn("drop table if exists libadminctrl_table");
DBQueryWarn("drop table if exists libadminctrl_backup");
DBQueryWarn("select release_lock('libadminctrl')"); DBQueryWarn("select release_lock('libadminctrl')");
return -1 return -1
if (!$query_result); if (!$query_result);
...@@ -1061,6 +1062,7 @@ sub TBAdmissionControlCheck($$$$) ...@@ -1061,6 +1062,7 @@ sub TBAdmissionControlCheck($$$$)
# #
# Admin people do not get checks (when in admin mode of course). # Admin people do not get checks (when in admin mode of course).
# #
return 1 return 1
if (TBAdmin($uid)); if (TBAdmin($uid));
...@@ -1071,6 +1073,9 @@ sub TBAdmissionControlCheck($$$$) ...@@ -1071,6 +1073,9 @@ sub TBAdmissionControlCheck($$$$)
return 1 return 1
if ($pid eq TBOPSPID()); if ($pid eq TBOPSPID());
$debug = 1
if (TBGetSiteVar("swap/admission_control_debug"));
# #
# Now we need the number of nodes needed by the experiment. # Now we need the number of nodes needed by the experiment.
# #
...@@ -1108,6 +1113,9 @@ sub TBAdmissionControlCheck($$$$) ...@@ -1108,6 +1113,9 @@ sub TBAdmissionControlCheck($$$$)
# #
sub TBUpdateNodeTypeXpidPermissions() sub TBUpdateNodeTypeXpidPermissions()
{ {
$debug = 1
if (TBGetSiteVar("swap/admission_control_debug"));
return UpdateNodeTypeXpidPermissions(); return UpdateNodeTypeXpidPermissions();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment