feat: filter lost_and_found sentinel from pushes; reset unavail host attrs

- create_lost_and_found(): provide hostattrs_t so makeWorker succeeds
- collect_queues/collect_workers (dataex.c): skip lost_and_found sentinel
  so it is never pushed to apiserver or scheduler
- mark_worker_unavail(): reset hosttype/hostmodel to "unknown" and zero
  all numeric attrs, then update resvals and slots — prevents stale
  capacity from being visible while the host is down
- restore_worker(): apply the same attr reset on WAL recovery so
  restored-but-unavailable workers advertise no capacity until reconnect;
  also remove dead calloc() that was immediately overwritten by makeWorker
- Extract reset_hostattrs_unknown() helper to eliminate copy-paste
- Define XCE_LOST_AND_FOUND_NAME constant in config_repl.h; replace all
  six raw "lost_and_found" string literals across config_repl.c and dataex.c
This commit is contained in:
Rongsong Shen 2026-05-14 08:44:55 +00:00
parent 2e2aaea78c
commit 1599d06bc4
6 changed files with 79 additions and 56 deletions

View file

@ -11,6 +11,9 @@ XCE is an HPC cluster management system providing job scheduling, queue manageme
## Development Commands
```bash
# Full dev build — all components (debug + ASAN)
/xce-build # Preferred: builds everything via nix develop + meson
# From src/frontend/
make build-server # Build apiserver binary → /tmp/apiserver
make build-cli # Build xcecli binary → /tmp/xce_static (CGO_ENABLED=0)
@ -18,10 +21,6 @@ make test # Unit tests (no live server required)
make test-integration # Regression suite (requires XCE_BIN and SRV_URL env vars)
make test-all # Unit + integration tests
# Full dev build — all components (from src/)
nix develop # Enter dev environment
meson setup build && ninja -C build # Build everything (all components)
# Nix package builds (from src/)
nix build --option sandbox false .#xcecore # C daemons + frontend/apiserver
nix build --option sandbox false .#xcecore_debug # Same with debug/ASAN