All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 3a683642 authored by Leigh B Stoller's avatar Leigh B Stoller

Less noise when there is no console line for a node.

parent 7cf3f3ac
......@@ -832,6 +832,14 @@ sub DoConsole()
if (!defined($response)) {
fatal("RPC Error calling ConsoleInfo");
}
if ($response->code() == GENIRESPONSE_UNAVAILABLE) {
print STDERR "Server says there is no console for $node_id\n";
if (defined($webtask)) {
$webtask->output("Sorry, $node_id does not have a console line");
$webtask->Exited($response->code());
}
exit($response->code());
}
if ($response->code() != GENIRESPONSE_SUCCESS) {
$response = $sliver->ConsoleURL($sliver_urn);
if (!defined($response)) {
......
......@@ -635,7 +635,7 @@ function Do_ConsoleURL()
$retval = SUEXEC("nobody", "nobody",
"webmanage_instance -t $webtask_id -- consoleurl $uuid " .
escapeshellarg($node),
SUEXEC_ACTION_CONTINUE);
SUEXEC_ACTION_IGNORE);
$webtask = WebTask::Lookup($webtask_id);
if ($retval == 0) {
......@@ -652,6 +652,9 @@ function Do_ConsoleURL()
$webtask->Delete();
return;
}
elseif ($retval < 0) {
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
}
if ($webtask) {
SPITAJAX_ERROR(1, $webtask->TaskValue("output"));
$webtask->Delete();
......
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