Skip to content

Commit

Permalink
cray-pals: improve eventlog error messages
Browse files Browse the repository at this point in the history
Problem: cray_pals.c provides no indication of whether it has
received any events at all before it times out.

Improve the error message to say what the last event received was,
and whether any events have been received at all.
  • Loading branch information
jameshcorbett committed Jan 27, 2025
1 parent 8ffd9ca commit bffb6bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/shell/plugins/cray_pals.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ static int read_future (flux_future_t *fut,
json_t *o = NULL;
json_t *context = NULL;
json_t *array;
const char *name, *event = NULL;
const char *name = "<no events received>", *event = NULL;
size_t index = 0;
json_t *value;
json_int_t portnum;
Expand Down Expand Up @@ -566,7 +566,8 @@ static int read_future (flux_future_t *fut,
json_decref (o);
}
}
shell_log_error ("Timed out waiting for start event");
shell_log_error ("Timed out waiting for start event, last event received was %s",
name);
return -1;
}

Expand Down

0 comments on commit bffb6bf

Please sign in to comment.