docs: document graceful job kill/stop and job.terminate_interval (bug-1957)

- src/docs/xce.md: explicit signal and force kill are REST-only (signal,
  force_kill); xcecli has no signal option yet.
- src/docs/deployment.md: app.yaml row lists the job block
  (max_array_size, terminate_interval) and trusted proxies.
- xcecli jobs kill/stop/resume help describes the signal sequences.
- REST: control endpoint annotations and the signal/force_kill model fields
  describe the behaviour (swagger output not regenerated: swag fails on an
  unrelated annotation).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-10 10:07:42 +00:00
parent ff1de90ae3
commit d84a793578
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
5 changed files with 29 additions and 10 deletions

View file

@ -2036,7 +2036,11 @@ func postJobRequest(job *models.JobInfo) error {
// ControlJobByID godoc
// @Summary Perform an action on a job
// @Description Submit an action to be performed on a specific job identified by jobids
// @Description Submit an action to be performed on a specific job identified by jobids.
// @Description kill without a signal: SIGINT, SIGTERM, then SIGKILL, job.terminate_interval
// @Description seconds apart while the job runs; with a signal: that signal once; with
// @Description force_kill: SIGKILL at once. stop: SIGTSTP, then SIGSTOP after the interval
// @Description if the job has not stopped. resume: SIGCONT (cancels a stop in progress).
// @Tags jobs
// @Accept json
// @Produce json
@ -2313,6 +2317,7 @@ func (j JobController) ControlJobByID(ctx *gin.Context) {
// ControlJob godoc
// @Summary Perform an action on filtered out jobs
// @Description Submit an action to be performed on specific jobs identified by filter in request body.
// @Description kill/stop/resume signals as for POST /jobs/{jobids}/control.
// @Tags jobs
// @Accept json
// @Produce json

View file

@ -761,18 +761,18 @@ type JobControlFilter struct {
type JobControlRequest struct {
Filter JobControlFilter `json:"filter" binding:"required"`
Action string `json:"action" binding:"required"`
Signal string `json:"signal,omitempty"`
Signal string `json:"signal,omitempty"` // kill only: send this signal once instead of the graceful sequence
Comment string `json:"comment,omitempty"`
ForceKill bool `json:"force_kill,omitempty"`
Method string `json:"method,omitempty"` // "criu" as default
ForceKill bool `json:"force_kill,omitempty"` // kill: SIGKILL at once (no graceful sequence)
Method string `json:"method,omitempty"` // "criu" as default
}
type JobControlJobIDRequest struct {
Action string `json:"action" binding:"required"`
Signal string `json:"signal,omitempty"` // signal value
Signal string `json:"signal,omitempty"` // kill only: send this signal once instead of the graceful sequence
Comment string `json:"comment,omitempty"`
ForceKill bool `json:"force_kill,omitempty"`
Method string `json:"method,omitempty"` // "criu" as default
ForceKill bool `json:"force_kill,omitempty"` // kill: SIGKILL at once (no graceful sequence)
Method string `json:"method,omitempty"` // "criu" as default
}
type JobControlEvent struct {