Commit 333c8aee authored by Leigh Stoller's avatar Leigh Stoller

More tweaks to termination handling, to get the interval timer to

stop.
parent 7c0384bf
......@@ -58,6 +58,7 @@ $geni_response_codes =
define("GENIRESPONSE_BADARGS", 1);
define("GENIRESPONSE_REFUSED", 7);
define("GENIRESPONSE_TIMEDOUT", 8);
define("GENIRESPONSE_SEARCHFAILED", 12);
define("GENIRESPONSE_VLAN_UNAVAILABLE", 24);
define("GENIRESPONSE_INSUFFICIENT_BANDWIDTH", 25);
define("GENIRESPONSE_INSUFFICIENT_NODES", 26);
......
......@@ -388,7 +388,13 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
StatusWatchCallBack.active = 0;
}
if (json.code) {
instanceStatus = "unknown";
// GENIRESPONSE_SEARCHFAILED
if (json.code == 12) {
instanceStatus = "terminated";
}
elsif (lastStatus != "terminated") {
instanceStatus = "unknown";
}
}
else {
instanceStatus = json.value.status;
......
......@@ -47,7 +47,8 @@ function StatusSetupAjax($needmodify)
$uuid = $ajax_args["uuid"];
$instance = Instance::Lookup($uuid);
if (!$instance) {
SPITAJAX_ERROR(1, "no such instance uuid: $uuid");
SPITAJAX_ERROR(GENIRESPONSE_SEARCHFAILED,
"no such instance uuid: $uuid");
return 1;
}
$creator = GeniUser::Lookup("sa", $instance->creator_uuid());
......
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