myxce/src/lib
Rongsong Shen dcb1b4fe25 feat: P0-2a C-side plumbing for host control
Add the full call chain for host control operations from the Go API
server through the C library to the controller:

- schema/controller.capnp: HostControl struct + hostctrlmsg @21
  in Request.body union
- include/typemap.h: xce_hostctrl_t* hostctrlmsg in body union
  (placed after @20 clrpreasonmsg, matching capnp ordinal)
- include/client.h, xceapi.h, request.h: declarations for
  xcecli_hostctrl, xce_hostctrl, xce_hostctrl_req
- lib/client.c: xcecli_hostctrl (validate + delegate to xce_hostctrl)
- lib/xceapi.c: xce_hostctrl (validate ctx state + send + wait reply)
- lib/request.c: xce_hostctrl_req (validate hostname/empty/nil,
  accept only HOST_OPEN/HOST_CLOSE, reject HOST_TAG/UNTAG)
- lib/helper.c: Request_body_hostctrlmsg cases in
  xce_request_body() and xce_request_msg_name()
- controller/cluster.c: OPCode_hostcontrol dispatch
- controller/include/cluster.h: do_hostcontrol_op declaration
- controller/worker.c: do_hostcontrol_op + fix pre-existing
  goto-clean bug in worker_ctrl that leaked write lock and
  reference on HOST_OPEN/HOST_CLOSE no-op paths

TDD: 8 xce_hostctrl_req validation tests (null ep, null ctrl,
null/empty hostname, HOST_DO_NONE no-op, HOST_TAG/UNTAG reject,
negative action reject, HOST_OPEN/CLOSE accept via xce_request).

116/116 xcelib tests pass. CGO_ENABLED=0 Go backend tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 07:46:41 +00:00
..
testsuite feat: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +00:00
bitset.c - introduce bitset 2026-02-13 11:01:33 +08:00
CLAUDE.md Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
client.c feat: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +00:00
configobj.c save works 2026-03-04 18:18:53 +08:00
dataq.c reformat code and job array 2025-11-07 16:14:27 +08:00
delay.c improve ordq 2025-12-17 15:28:27 +08:00
group.c save works 2026-03-04 18:18:53 +08:00
helper.c feat: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +00:00
hook.c reformat code and job array 2025-11-07 16:14:27 +08:00
htab.c save works 2025-12-18 14:55:58 +08:00
idgen.c jobid generate 2025-11-07 18:17:34 +08:00
jobj.c save works 2026-03-06 18:20:30 +08:00
kv.c use librtti for worker/queue/resource 2026-02-25 16:56:50 +08:00
kvmgr.c save works 2026-03-04 18:18:53 +08:00
meson.build feat: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +00:00
misc.c 1st workable scheduler with resource from controller 2025-12-31 15:50:52 +08:00
mylock.c - use librtti 2026-02-05 17:21:27 +08:00
netio.c merge job rusage and pending reason support 2025-12-16 14:36:28 +08:00
ordq.c pass pend reason back to controller 2025-12-23 15:29:26 +08:00
preason.c support limit 2026-01-12 15:27:54 +08:00
qobj.c save works 2026-03-05 16:03:37 +08:00
request.c feat: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +00:00
resobj.c minor improve 2026-04-14 12:52:40 +08:00
resreq.c save works 2026-03-06 18:20:30 +08:00
rusage.peg fix typo of perflag && reformat .peg 2026-02-09 10:58:30 +08:00
section.peg fix typo of perflag && reformat .peg 2026-02-09 10:58:30 +08:00
threshold.c reformat code and job array 2025-11-07 16:14:27 +08:00
utils.c - introduce bitset 2026-02-13 11:01:33 +08:00
vtaskmgr.c security communication with openssl and simplify netio 2025-11-18 11:26:36 +08:00
window.c reformat code and job array 2025-11-07 16:14:27 +08:00
wobj.c save works 2026-03-05 16:03:37 +08:00
wrap.c reformat code and job array 2025-11-07 16:14:27 +08:00
xce_resreq.peg fix typo of perflag && reformat .peg 2026-02-09 10:58:30 +08:00
xcealloc.c 1st workable scheduler with resource from controller 2025-12-31 15:50:52 +08:00
xceapi.c feat: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +00:00
xcectx.c support passing args to request handle for elimination of global var 2025-12-11 17:07:51 +08:00
xcelimit.c minor improve 2026-04-14 12:52:40 +08:00
xlist.c support limit 2026-01-12 15:27:54 +08:00
xstring.c save works 2026-03-04 18:18:53 +08:00
xvec.c using xvec related api in scheduler 2026-01-16 18:21:37 +08:00
zarray.c minor improve 2026-04-14 12:52:40 +08:00