You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CMDB loader silently ignores unknown keys inside class and variable metadata objects. It refuses unknown top-level keys for exactly this reason, so this is inconsistent. The fork has identical code, so this is not an overlay divergence; fix it fork-first, then re-export the overlay patch.
Where
overlay/core/0002...patch:983 (applied cmdb.c:952-969) at 75db441:
if (JSON_NOT_NULL(class_exprs) &&
and the matching reg_exprs check. Keys other than class_expressions, regular_expressions, tags and comment are never looked at.
Scenario
"classes": {"maint": {"class_expression": ["!prod::"]}} (singular, misspelled) defines maint unconditionally, where a correctly spelled key with a non-any:: value would be refused. Same with "variables": {"x": {"value": 1, "tag": [...]}}. It conflicts with the comment at cmdb.c:1208-1211 ("a misspelled 'variables' would drop an interlock").
Suggested fix
Refuse unknown member names in class and variable metadata objects (fork first, then re-export as an overlay patch). Add cmdb_test cases for a misspelled class_expression and tag.
Activity