feat(ha-config-bootstrap): implement --vcpus CLI, wire validation, remove vcpus from config (task 2.2)

- Add --vcpus N argp option in main.c; store in myconf.vcpus
- Replace inline argp guard with validate_vcpus() call (returns -EINVAL for <=0)
- Add validate_startup_config() in startup_validation.c: returns 0; writes
  deprecation warning into caller-supplied warn_buf when vcpus key present
- Wire validate_startup_config() into myapp_run() after conffile resolved;
  emit WARN() if warn_buf non-empty (Req 4.4)
- Remove vcpus field from cluster_config_t (clusterconfig.h)
- Preserve capnp ordinal: vcpus @7 -> vcpusDeprecated @7: Void in controller.capnp
- vtaskmgr_init uses only myconf->vcpus with hardcoded default 8
- Add stub C types in typemap.h for capnp schema extensions from task 1.1
- 96 tests pass
This commit is contained in:
Rongsong Shen 2026-05-28 04:17:06 +00:00
parent bfa41eb135
commit 3ab2e6e4bf
12 changed files with 225 additions and 8 deletions

View file

@ -14,6 +14,7 @@ controller_src = [
'reply.c',
'resources.c',
'sched.c',
'startup_validation.c',
'task.c',
'worker.c',
'apiserver.c',
@ -101,6 +102,7 @@ controller_unit_test_src = [
'testsuite/test_config_repl.c',
'testsuite/test_worker_join.c',
'testsuite/test_ha_startup.c',
'startup_validation.c',
'worker.c',
'persist.c',
'ha.c',