fix(apiserver): send exdata, exec cwd and exec home with submitted jobs (bug-1936)
Cause: modelJobToSubmit() filled only cmdline, execuser, launch_type and pre/post-exec of job_startinfo_t, so the extended data the submit handler builds (env, *_limit incl. -W run limit, file transfers, interactive mode), the cwd and the exec home never reached the controller or the worker. Fix: map the start info in a pure submitStartInfo() (exdata from ExtendData, execcwd from ExecCWD or CWD, exechome from ExecHome) that modelJobToSubmit copies into the C struct; decode exdata back in cJobToModel/cJobArrayToModels so the store keeps ExtendData and CWD. Reject extend_data the worker's parse_exdata() cannot take (not a JSON object, over EXDATA_LENGTH-1 bytes) and drop an empty transfer list instead of sending a null. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7a9d75d661
commit
d01ced9bd0
5 changed files with 236 additions and 14 deletions
|
|
@ -1920,7 +1920,9 @@ func processJobRequest(ctx *gin.Context, req *models.JobSubmitRequest, defaultVa
|
|||
extendData[i] = entry
|
||||
}
|
||||
}
|
||||
extendDataMap["transfer_files"] = extendData
|
||||
if len(extendData) > 0 {
|
||||
extendDataMap["transfer_files"] = extendData
|
||||
}
|
||||
}
|
||||
|
||||
// handle env into json format
|
||||
|
|
@ -1990,6 +1992,12 @@ func processJobRequest(ctx *gin.Context, req *models.JobSubmitRequest, defaultVa
|
|||
req.ExtendData = string(updatedExtendDataBytes)
|
||||
}
|
||||
|
||||
// bug-1936: ExtendData is the job's exdata at the worker; reject what
|
||||
// the worker could not parse instead of failing the job at launch.
|
||||
if err := backend.ValidateExdata(req.ExtendData); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue