fix(scheduler): load user/host groups in the simulator too (bug-1943)
Only live's sched_init_config() (scheduler.c) registered the config's
named user and host groups into core.ugmgr/hgmgr. The simulator takes its
config from the replay snapshot (snapshot_load.c) and later pushes through
the core CONFIG_PUSH event (core_events.c); neither loaded groups, so a
limit whose users name a group ("ug1") never matched in sim, while the
same limit matched in live.
New xce_core_load_groups() (core.c) is the one loader, called by
sched_init_config(), the CONFIG_PUSH event and snapshot restore, each
before limit consumers are built. snapshot.c's field notes now say the
groups are rebuilt from the snapshot's config.
test_sim_group_limit_parity.c checks a ug1-scoped limit matches the same
job on both drivers and that CONFIG_PUSH alone registers ug1 and hg1.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1668a43998
commit
8b89a0ce6b
8 changed files with 431 additions and 7 deletions
|
|
@ -571,6 +571,19 @@ typedef struct {
|
|||
*/
|
||||
extern int xce_core_push_events(xce_sched_core_t*, xce_core_event_t*, int);
|
||||
|
||||
/*
|
||||
* xce_core_load_groups - registers a config's named user groups
|
||||
* (config->ugroups) and host groups (config->hgroups) into core->ugmgr/
|
||||
* core->hgmgr by name (bug-1784, bug-1943). The one group-loading path of
|
||||
* both drivers: live's sched_init_config(), the core's CONFIG_PUSH event
|
||||
* and snapshot restore all call it, and each calls it before anything that
|
||||
* may reference a group by name (the limit plugin's consumers) is built.
|
||||
* An existing group is updated in place, so limits built earlier see the
|
||||
* new membership. Returns 0, -EINVAL for a NULL core, or the first
|
||||
* groupmgr_load_configs() error. A NULL config is a no-op.
|
||||
*/
|
||||
extern int xce_core_load_groups(xce_sched_core_t*, xce_conf4sched_t*);
|
||||
|
||||
/*
|
||||
* xce_core_set_decision_cb - registers the driver's decision callback +
|
||||
* opaque driver context (task 4.4, Req 5 AC 6). May be called at any time
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue