2.7 KiB
| id | status | status_updated | status_note | component | severity | timestamp | last_seen | occurrences | files | tags | related | gitea_issue | gitea_synced_status | gitea_synced_hash | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bug-1968 | open | 2026-10-10 | newly logged | apiserver | wrong-result | 2026-10-10T11:55:48Z | 2026-10-10T11:55:48Z | 1 |
|
|
|
399 | open | a735a6546a0b |
bug-1968: apiserver job restart copies asked hosts, begin/term time and I/O paths it can never pass on
Description
Observed: (source reading, 2026-10-10; found while fixing bug-1936)
RestartJobByID() (src/frontend/apiserver/controllers/jobs.go:832) builds the new job from the request plus the old job's row, and copies options that bug-1936 now refuses at submit because no field carries them to the controller or worker:
if newJob.AskedHosts == "" {
if v, ok := oldJob["asked_hosts"].(string); ok { newJob.AskedHosts = v }
}
if v, ok := oldJob["begin_time"].(time.Time); ok { ... } // also term_time,
if v, ok := oldJob["out_dir"].(string); ok { ... } // in_file, err_file, out_file
preCheckJobRestartRequest() (:1350) validates -m asked hosts but does not refuse them the way preCheckSubmitOptions() (:1307, bug-1936) does for submit, so xcecli jobs restart -m host ... returns success and the host request is silently dropped.
Expected: restart, like submit, either passes each option on to the job or rejects it with 400 (preCheckSubmitOptions-style); options copied from the old job that cannot be honoured are not silently kept in apiserver memory only.
Impact: wrong result: a restarted job ignores the asked hosts, begin/term time and I/O paths the user gave, with no error.
Found by: review during the bug-1936 fix, 2026-10-10.
Environment
- OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64
- libc: glibc 2.42-47 (n/a: Go apiserver, CGO_ENABLED=0 tests)
- Toolchain: gcc (GCC) 15.2.0, meson 1.9.1
- Build: asan (xce.build)
- Code: scheduler-framework @ edad8c73-dirty
- Deployment: any (found by source reading)
Reproduction
- Submit a job, let it finish.
xcecli jobs restart -m <host> <jobid>(or restart a job whose original row has begin_time/out_file).- The restart returns success; the new job is placed without regard to
<host>(scheduler never receives asked hosts).
- Frequency: deterministic (code path)
- Evidence: the code quoted in Description; no logs kept.
Root cause
TODO: required for fixed/partial
Fix
TODO: required for fixed/partial
Verification
- Test: TODO: name + file; RED before the fix, GREEN after
- Suites: TODO: suite results and build profile
- Live: TODO: soak/deploy run, or n/a and why
References
- Related: none