64 lines
2.7 KiB
Markdown
64 lines
2.7 KiB
Markdown
---
|
|
id: "bug-1968"
|
|
status: "open"
|
|
status_updated: "2026-10-10"
|
|
status_note: "newly logged"
|
|
component: "apiserver"
|
|
severity: "wrong-result"
|
|
timestamp: "2026-10-10T11:55:48Z"
|
|
last_seen: "2026-10-10T11:55:48Z"
|
|
occurrences: 1
|
|
files: ["src/frontend/apiserver/controllers/jobs.go"]
|
|
tags: ["apiserver", "restart", "submit"]
|
|
related: ["bug-1936"]
|
|
gitea_issue: 399
|
|
gitea_synced_status: "open"
|
|
gitea_synced_hash: "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:
|
|
```go
|
|
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
|
|
1. Submit a job, let it finish.
|
|
2. `xcecli jobs restart -m <host> <jobid>` (or restart a job whose original row has begin_time/out_file).
|
|
3. 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
|