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

@ -34,6 +34,7 @@ typedef struct {
uint64_t config_generation; /* monotonic audit counter */
time_t conf_stale_timeout; /* seconds before saved config flagged stale (default 86400) */
int conf_stale; /* 1 when saved config older than conf_stale_timeout */
int vcpus; /* Req 4.3: --vcpus CLI value; 0 = use config default */
} myconf_t;
extern cluster_config_t* get_default_conf(void*);