diff --git a/src/frontend/apiserver/controllers/jobs.go b/src/frontend/apiserver/controllers/jobs.go index 844c4186..f8a5d0df 100644 --- a/src/frontend/apiserver/controllers/jobs.go +++ b/src/frontend/apiserver/controllers/jobs.go @@ -1480,7 +1480,7 @@ func (j JobController) CreateJob(ctx *gin.Context) { UserPriority: req.JobPriority, DependCond: req.DependCond, CWD: req.CWD, - FromHost: ctx.ClientIP(), //use ip now, need use hostname ? + FromHost: req.FromHost, // bug-1676: client-asserted hostname, passed through unchanged PreExecCmd: req.PreExecCmd, PostExecCmd: req.PostExecCmd, RequeueErrorValues: req.RequeueErrorValues, diff --git a/src/frontend/apiserver/models/jobs.go b/src/frontend/apiserver/models/jobs.go index 435a270d..a2e3f902 100644 --- a/src/frontend/apiserver/models/jobs.go +++ b/src/frontend/apiserver/models/jobs.go @@ -662,6 +662,7 @@ type JobSubmitRequest struct { ChkpntDir string `json:"chkpnt_dir,omitempty"` InitChkpntPeriod int `json:"init_chkpnt_period,omitempty"` CWD string `json:"cwd,omitempty"` + FromHost string `json:"from_host,omitempty"` // client-asserted submitting hostname (bug-1676) -- passed through unchanged, not derived server-side OutDir string `json:"out_dir,omitempty"` InFile string `json:"in_file,omitempty"` OutFile string `json:"out_file,omitempty"`