3.5 KiB
| id | status | status_updated | status_note | component | severity | timestamp | last_seen | occurrences | files | tags | related | fix_commits | gitea_issue | gitea_synced_status | gitea_synced_hash | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bug-1874 | fixed | 2026-09-28 | scheduler | noise | 2026-09-28T03:52:37Z | 2026-09-28T03:58:49Z | 1 |
|
|
|
312 | fixed | 525a89cedf6d |
bug-1874: scheduler warns about deprecated job_elect_fn for xce_sched_fcfs on every start
Description
Observed:
[2026-09-28 11:52:49,740] [51152] [ WARN] [ plugin_register] plugin 'xce_sched_fcfs' selects jobs via the deprecated job_elect_fn hook; migrate to xce_job_picker_iface_t (scheduler-core spec, Req 5 'Migration from old job_elect_fn')
Expected: no warning: the normal-mode job picker is builtin_fcfs, not the legacy plugin. Impact: a WARN on every scheduler start that asks the operator to migrate something they do not use; noise only. Found by: user report from a pc13v HA deploy, 2026-09-28
Environment
- OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64
- libc: glibc 2.42-47 (interpreter /nix/store/wb6rhpznjfczwlwx23zmdrrw74bayxw4-glibc-2.42-47/lib/ld-linux-x86-64.so.2)
- Toolchain: gcc (GCC) 15.2.0, meson 1.9.1
- Build: asan (xce.build)
- Code: scheduler-framework @
8cadeeb2(last commit without the fix) - Deployment: first seen on pc13v: 3-node HA (ctrl-1..3) + scheduler + apiserver + real root xcecd under systemd, deploy dir /tmp/xce-ha-deploy, 2026-09-28 11:52 +0800 (pc13v's OS, libc and exact commit were not recorded; the values above are from the reproduction on this dev host, same nix toolchain)
Reproduction
- Start xce_scheduler at
8cadeeb2(any deployment, e.g./xce-deploy-ha) grep 'deprecated job_elect_fn' <scheduler log>
- Frequency: deterministic (every start)
- Evidence: the xcecd/scheduler/controller/apiserver logs pasted in the user's report, 2026-09-28 (quoted above)
Root cause
sched_register_plugins() (scheduler.c) registers the legacy xce_sched_fcfs plugin on every start alongside builtin_fcfs, and plugin_register() (plugin.c) warned for every job_elect_fn-only plugin it adapted to the picker interface, whether or not that plugin would ever be selected. In normal mode the picker is always builtin_fcfs (sched_set_default_job_pick_plugin()); only --sim can name another.
Fix
plugin_register() still adapts a job_elect_fn plugin but only marks it (plugin->legacy_picker); sched_resolve_job_picker() (schedobj.c) logs the deprecation once (legacy_picker_warned) when such a plugin is actually selected as the picker.
Verification
- Test: test_legacy_picker_deprecation_flagged_on_selection_not_registration in src/scheduler/testsuite/test_picker_wiring.c (new: registration leaves legacy_picker_warned unset, selection sets it) and test_register_legacy_job_elect_fn_only_plugin_uses_wrapper_without_warning in test_plugin_picker_registration.c, which captures the log: 0 warnings at registration (it asserted 1 before the change)
- Suites: full ASAN build (xce-build all): 113/113 suites after the updated scheduler picker-registration test; controller 1250/0, harness 141/0, worker diskstats 4/0, scheduler picker wiring 11/0 + picker registration 4/0, apiserver TestRootWarning PASS
- Live: pc13v retest at
4c134127(debug build, 2026-09-28 14:47 +0800):ag -i error logs/finds nothing;ag -i warn logs/shows only the WAL-unencrypted advisory; no job_elect_fn deprecation warning
References
- Related: none