Skip to content
Snippets Groups Projects
Commit 46276a1a authored by Morris Jette's avatar Morris Jette
Browse files

switch/cray: Sync global state with recovered steps

If the switch/cray global state save/restore fails, avoid re-allocating
ports based upon the job steps that we can recover
parent bbef43a0
No related branches found
No related tags found
No related merge requests found
......@@ -712,6 +712,12 @@ int switch_p_unpack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer,
goto unpack_error;
}
safe_unpack32(&job->port, buffer);
#ifdef HAVE_NATIVE_CRAY
/* If the libstate save/restore failed, at least make sure that we
* do not re-allocate ports assigned to job steps that we recover. */
if ((job->port >= MIN_PORT) && (job->port <= MAX_PORT))
port_resv[job->port - MIN_PORT] = 1;
#endif
if (debug_flags & DEBUG_FLAG_SWITCH) {
info("(%s:%d: %s) switch_jobinfo_t contents:",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment