fix(admin-config-tool): resolve xceadmin config build warnings
Cross-reference warnings ("references undefined entry") were genuine
gaps in the example configs, not validator bugs: src/configs/hosts.yaml
had a typo'd resource ref (mg -> mem) and referenced a nonexistent
host3/hostgroup pair; queues.yaml referenced hgroup1/hgroup2/ugroup1
instead of the real hg1/ug1 names; resources.yaml was missing the
r1m/r15s/tmp built-in worker load-index resources
(worker/src/resource_sync.c's init_builtin_load_indices()). Added the
missing host3 host, hg2 hostgroup, ug2 usergroup, and three resource
entries; fixed the typo'd refs.
"schema-valid but has no ClusterConfig destination" warnings for
resources.yaml's type/order/consumable/release fields were a real gap
in xcecommon/mapping.py's _build_resource, not an inherent limitation
-- the encoding (XCE_VAL_*/xce_order_t/XCE_RESF_CONSUMABLE/
XCE_RESF_RELEASE) is documented in include/xce/types.h and actively
read by the scheduler; the old docstring's claim that it was
undocumented was wrong. Only resourcemap remains genuinely unmapped
(its capnp destination fields are commented out).
Updated test_mapping.py/test_config_build.py for the new mapping
behavior and regenerated the full golden fixture's expected.bin
(legitimate representation-drift from the mapping fix, not a bug).
This commit is contained in:
parent
4ec401672b
commit
1705495a5e
9 changed files with 139 additions and 32 deletions
|
|
@ -153,14 +153,17 @@ def test_map_list_section_resources_populates_mapped_fields_only(cluster_config)
|
|||
assert r0.name == "slots"
|
||||
assert r0.desc == "job slot count"
|
||||
assert r0.interval == 0
|
||||
assert r0.valtype == 1 # XCE_VAL_NUMERIC
|
||||
assert r0.ordtype == 1 # XCE_ORD_DECR
|
||||
assert r0.flags == 0x80 # XCE_RESF_CONSUMABLE ("release" absent -> not OR'd in)
|
||||
assert r1.name == "mem"
|
||||
assert r1.interval == 60
|
||||
assert r1.valtype == 1 # XCE_VAL_NUMERIC ("type" present)
|
||||
assert r1.ordtype == 0 # "order" absent on this item -> untouched default
|
||||
assert r1.flags == 0 # "consumable"/"release" both absent -> no bits set
|
||||
|
||||
# Deliberately-unmapped fields (see module docstring) stay at default.
|
||||
assert r0.idx == 0
|
||||
assert r0.valtype == 0
|
||||
assert r0.ordtype == 0
|
||||
assert r0.flags == 0
|
||||
assert r0.lastReport == 0
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue