diff --git a/src/controller/sched.c b/src/controller/sched.c index 13f50ac..ac0b27f 100644 --- a/src/controller/sched.c +++ b/src/controller/sched.c @@ -147,6 +147,17 @@ static int xcesched_push_configs(cluster_t* c) memset(&configdata, 0x0, sizeof(configdata)); + if (c->myconf == NULL || c->myconf->cluster_config == NULL) { + /* No cluster config loaded yet (cold boot / config not pushed yet). + * Pushing configs now would dereference a NULL cluster_config and + * crash the controller (ASan SEGV on scheduler join). Skip; the + * scheduler will receive config on a later join once config is + * available. */ + WARN("%s: cluster_config not loaded yet, skipping config push", + __func__); + return 0; + } + configdata.data.conf4sched = (xce_conf4sched_t*)calloc(1, sizeof(xce_conf4sched_t)); if (configdata.data.conf4sched == NULL) {