Commit 69ae28a9 authored by Russ Fish's avatar Russ Fish

Disambiguate the rest of the "Transient error" messages, showing suexec return codes as well.

parent e5c505d6
......@@ -669,12 +669,12 @@ function ChangeDelayConfig($uid, $pid, $unix_gid, $args, &$errors) {
$xmlname = tempnam("/tmp", "delay_config");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(2); please try again later.";
return null;
}
......@@ -712,11 +712,11 @@ function ChangeDelayConfig($uid, $pid, $unix_gid, $args, &$errors) {
}
}
else
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
}
else {
# All other errors reported to tbops since they are bad!
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
return null;
......
......@@ -617,7 +617,7 @@ function SetNodeType($node_type, $args, &$errors) {
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error(3); please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -634,7 +634,7 @@ function SetNodeType($node_type, $args, &$errors) {
}
}
else
$errors[] = "Transient error(4); please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
}
return null;
}
......
......@@ -284,7 +284,7 @@ function SetSiteVar($name, $args, &$errors) {
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error(3); please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -301,7 +301,7 @@ function SetSiteVar($name, $args, &$errors) {
}
}
else
$errors[] = "Transient error(4); please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
}
return null;
}
......
......@@ -152,12 +152,12 @@ class Experiment
$xmlname = tempnam("/tmp", "editexp");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(2); please try again later.";
return null;
}
......@@ -179,7 +179,7 @@ class Experiment
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -196,7 +196,8 @@ class Experiment
}
}
else
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(4, $retval); ".
"please try again later.";
}
return null;
}
......
......@@ -105,12 +105,12 @@ class Group
$xmlname = tempnam("/tmp", "newgroup");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(2); please try again later.";
return null;
}
......@@ -134,7 +134,7 @@ class Group
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -151,7 +151,7 @@ class Group
}
}
else
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
}
return null;
}
......@@ -164,14 +164,14 @@ class Group
if (!preg_match("/^GROUP\s+([^\/]+)\/(\d+)\s+/",
$suexec_output_array[count($suexec_output_array)-1],
$matches)) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(5); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
return null;
}
$group = $matches[2];
$newgroup = Group::Lookup($group);
if (! $newgroup) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(6); please try again later.";
TBERROR("Could not lookup new group $group", 0);
return null;
}
......@@ -193,12 +193,12 @@ class Group
$xmlname = tempnam("/tmp", "editgroup");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(2); please try again later.";
return null;
}
......@@ -223,7 +223,7 @@ class Group
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -240,7 +240,7 @@ class Group
}
}
else
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
}
return null;
}
......
......@@ -154,7 +154,7 @@ class Image
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error(3); please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -171,7 +171,7 @@ class Image
}
}
else
$errors[] = "Transient error(4); please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
}
return null;
}
......@@ -184,14 +184,14 @@ class Image
if (!preg_match("/^IMAGE\s+([^\/]+)\/(\d+)\s+/",
$suexec_output_array[count($suexec_output_array)-1],
$matches)) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(5); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
return null;
}
$image = $matches[2];
$newimage = image::Lookup($image);
if (! $newimage) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(6); please try again later.";
TBERROR("Could not lookup new image $image", 0);
return null;
}
......@@ -214,12 +214,12 @@ class Image
$xmlname = tempnam("/tmp", "editimageid");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(2); please try again later.";
return null;
}
......@@ -241,7 +241,7 @@ class Image
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -258,7 +258,7 @@ class Image
}
}
else
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
}
return null;
}
......
......@@ -371,12 +371,12 @@ function NewMmList($uid, $args, &$errors) {
$xmlname = tempnam("/tmp", "newmmlist");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(2); please try again later.";
return null;
}
......@@ -395,7 +395,7 @@ function NewMmList($uid, $args, &$errors) {
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -412,7 +412,7 @@ function NewMmList($uid, $args, &$errors) {
}
}
else
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
}
return null;
}
......
......@@ -89,12 +89,12 @@ class OSinfo
$xmlname = tempnam("/tmp", "newosid");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(2); please try again later.";
return null;
}
......@@ -117,7 +117,7 @@ class OSinfo
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -134,7 +134,7 @@ class OSinfo
}
}
else
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
}
return null;
}
......@@ -147,14 +147,14 @@ class OSinfo
if (!preg_match("/^OSID\s+([^\/]+)\/(\d+)\s+/",
$suexec_output_array[count($suexec_output_array)-1],
$matches)) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(5); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
return null;
}
$osid = $matches[2];
$newosid = OSinfo::Lookup($osid);
if (! $newosid) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(6); please try again later.";
TBERROR("Could not lookup new osid $osid", 0);
return null;
}
......
......@@ -244,12 +244,12 @@ class Project
$xmlname = tempnam("/tmp", "newproj");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$error = "Transient error; please try again later.";
$error = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$error = "Transient error; please try again later.";
$error = "Transient error(2); please try again later.";
return null;
}
......@@ -271,7 +271,7 @@ class Project
if ($retval) {
if ($retval < 0) {
$error = "Transient error; please try again later.";
$error = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -288,14 +288,14 @@ class Project
if (!preg_match("/^Project\s+([-\w]+)\/(\d+)\s+/",
$suexec_output_array[count($suexec_output_array)-1],
$matches)) {
$error = "Transient error; please try again later.";
$error = "Transient error(4, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
return null;
}
$pid_idx = $matches[2];
$newproj = Project::Lookup($pid_idx);
if (! $newproj) {
$error = "Transient error; please try again later.";
$error = "Transient error(5); please try again later.";
TBERROR("Could not lookup new project $pid_idx", 0);
return null;
}
......
......@@ -334,12 +334,12 @@ function NewPubKey($args, &$errors) {
$xmlname = tempnam("/tmp", "addpubkey");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(2); please try again later.";
return null;
}
......@@ -358,7 +358,7 @@ function NewPubKey($args, &$errors) {
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -375,7 +375,7 @@ function NewPubKey($args, &$errors) {
}
}
else
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
}
return null;
}
......
......@@ -162,12 +162,12 @@ class User
$xmlname = tempnam("/tmp", "moduserinfo");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(2); please try again later.";
return null;
}
......@@ -189,7 +189,7 @@ class User
if ($retval) {
if ($retval < 0) {
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -206,7 +206,7 @@ class User
}
}
else
$errors[] = "Transient error; please try again later.";
$errors[] = "Transient error(4, $retval); please try again later.";
}
return null;
}
......@@ -514,12 +514,12 @@ class User
$xmlname = tempnam("/tmp", "newuser");
if (! $xmlname) {
TBERROR("Could not create temporary filename", 0);
$error = "Transient error; please try again later.";
$error = "Transient error(1); please try again later.";
return null;
}
if (! ($fp = fopen($xmlname, "w"))) {
TBERROR("Could not open temp file $xmlname", 0);
$error = "Transient error; please try again later.";
$error = "Transient error(2); please try again later.";
return null;
}
......@@ -538,7 +538,7 @@ class User
if ($retval) {
if ($retval < 0) {
$error = "Transient error; please try again later.";
$error = "Transient error(3, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
else {
......@@ -555,14 +555,14 @@ class User
if (!preg_match("/^User\s+(\w+)\/(\d+)\s+/",
$suexec_output_array[count($suexec_output_array)-1],
$matches)) {
$error = "Transient error; please try again later.";
$error = "Transient error(4, $retval); please try again later.";
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
return null;
}
$uid_idx = $matches[2];
$newuser = User::Lookup($uid_idx);
if (! $newuser) {
$error = "Transient error; please try again later.";
$error = "Transient error(5); please try again later.";
TBERROR("Could not lookup new user $uid_idx", 0);
return null;
}
......
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