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

@ -151,6 +151,11 @@ func NewKillJobsCmd(configManager *config.ConfigManager) *cobra.Command {
Use: "kill",
Short: "Kill jobs",
Long: `Kill jobs by job IDs or filters.
The job gets SIGINT, then SIGTERM, then SIGKILL, one interval apart (the
API server's job.terminate_interval, default 10 s), each only while it is
still running, so it can catch SIGINT/SIGTERM and clean up.
Examples:
xce jobs kill jobid1,jobid2,... # kill jobs by job IDs
xce jobs kill <array-id>[k] # kill element k of an array
@ -190,6 +195,11 @@ func NewStopJobsCmd(configManager *config.ConfigManager) *cobra.Command {
Use: "stop",
Short: "Stop jobs",
Long: `Stop jobs by job IDs or filters.
The job gets SIGTSTP first, so it can catch it, prepare and stop itself;
SIGSTOP follows after the interval (job.terminate_interval, default 10 s)
if it has not stopped.
Examples:
xce jobs stop jobid1,jobid2,... # stop jobs by job IDs
xce jobs stop <array-id>[k] # stop element k of an array
@ -229,6 +239,9 @@ func NewResumeJobsCmd(configManager *config.ConfigManager) *cobra.Command {
Use: "resume",
Short: "Resume jobs",
Long: `Resume jobs by job IDs or filters.
The job gets SIGCONT; a stop still in progress is cancelled.
Examples:
xce jobs resume jobid1,jobid2,... # resume jobs by job IDs
xce jobs resume <array-id>[k] # resume element k of an array