diff --git a/src/controller/apiserver.c b/src/controller/apiserver.c index 58425c23..7e079e85 100644 --- a/src/controller/apiserver.c +++ b/src/controller/apiserver.c @@ -647,8 +647,14 @@ int apiserver_init(cluster_t* c) int on_apiserver_join(cluster_t* c, endpoint_t* ep) { - xce_apiserver_push_configs(c, ep); + /* Push the WORKER dataset BEFORE the config push. The API server's + * OnHostConfigUpdated only applies config-sourced fields (max_slot, + * host_type/host_model) to hosts already in its store — if the config + * push arrives first, every host is skipped (bug: hosts showed max_slot + * 0 and t1 host_type "unknown" on first connect). Pushing workers first + * populates the host entries so the config push lands. */ xce_apiserver_push_workers(c, ep); + xce_apiserver_push_configs(c, ep); xce_apiserver_push_jobs(c, ep); return 0;