{"record":{"id":"7d3ebe37fad24931","repo":"cilium/cilium","slug":"unknown-option-s","errorCode":null,"errorMessage":"unknown option %s","messagePattern":"unknown option (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/option/option.go","lineNumber":122,"sourceCode":"\tfor k, v := range n {\n\t\t_, newVal, _, err := l.parseKeyValue(k, v)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif err := l.Validate(k, v); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\to[k] = newVal\n\t}\n\n\treturn o, nil\n}\n\nfunc (l OptionLibrary) Validate(name string, value string) error {\n\tkey, spec := l.Lookup(name)\n\tif key == \"\" {\n\t\treturn fmt.Errorf(\"unknown option %s\", name)\n\t}\n\n\tif spec.Immutable {\n\t\treturn fmt.Errorf(\"specified option is immutable (read-only)\")\n\t}\n\n\tif spec.Verify != nil {\n\t\treturn spec.Verify(key, value)\n\t}\n\n\treturn nil\n}\n\ntype OptionMap map[string]OptionSetting\n\nfunc (om OptionMap) DeepCopy() OptionMap {\n\treturn maps.Clone(om)\n}","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/pkg/option/option.go#L104-L140","documentation":"OptionLibrary.Validate looks up the option name in the registered option table; if Lookup returns an empty key, the name is unknown and this error is thrown before any value validation.","triggerScenarios":"Calling Validate (directly or via UpsertDevice/DeleteDevice flows) with an option name not present in the library, e.g. a typo like 'monitor-aggreation' or a deprecated/renamed option.","commonSituations":"Version upgrades where an option was renamed or removed; typos in ConfigMaps; case-sensitive name mismatches.","solutions":["Check the exact option name against the registered option list (Lookup/table in pkg/option).","Fix typos and match case exactly.","If upgrading, consult the changelog for renamed or removed options and update configs accordingly."],"exampleFix":"// before\nValidate(\"monitor-aggreation\", \"5\")\n// after\nValidate(\"monitor-aggregation-level\", \"5\")","handlingStrategy":"validation","validationCode":"if _, ok := knownOptions[name]; !ok {\n\treturn fmt.Errorf(\"option %q is not registered\", name)\n}","typeGuard":null,"tryCatchPattern":"if err := lib.Validate(name, value); err != nil {\n\tif strings.HasPrefix(err.Error(), \"unknown option\") {\n\t\treturn fmt.Errorf(\"%w; check spelling and current version's option list\", err)\n\t}\n\treturn err\n}","preventionTips":["Autocomplete option names from the library's option table","Review the changelog when upgrading versions","Keep option names in typed constants instead of raw strings"],"tags":["go","config-parsing","option-validation"],"backgroundTag":"unknown-config-option","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}