{"record":{"id":"1577cdfc3d2f0642","repo":"hashicorp/nomad","slug":"cannot-apply-allowed-modes-configuration-q-is-no-1577cd","errorCode":null,"errorMessage":"cannot apply allowed_modes configuration, %q is not a valid utc_mode","messagePattern":"cannot apply allowed_modes configuration, %q is not a valid utc_mode","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/docker/config.go","lineNumber":906,"sourceCode":"\t\tfor _, v := range allowedNS.IPC {\n\t\t\tif !containerapi.IpcMode(v).Valid() {\n\t\t\t\treturn fmt.Errorf(\"cannot apply allowed_modes configuration, %q is not a valid ipc_mode\", v)\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(allowedNS.Userns) > 0 {\n\t\tfor _, v := range allowedNS.Userns {\n\t\t\tif !containerapi.UsernsMode(v).Valid() {\n\t\t\t\treturn fmt.Errorf(\"cannot apply allowed_modes configuration, %q is not a valid userns_mode\", v)\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(allowedNS.UTS) > 0 {\n\t\tfor _, v := range allowedNS.UTS {\n\t\t\tif !containerapi.UTSMode(v).Valid() {\n\t\t\t\treturn fmt.Errorf(\"cannot apply allowed_modes configuration, %q is not a valid utc_mode\", v)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":888,"sourceCodeEnd":912,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/drivers/docker/config.go#L888-L912","documentation":"The UTS (hostname domain) allowlist entries are validated with containerapi.UTSMode(v).Valid(), which accepts only \"\" and \"host\". Any other value in the uts_modes allowlist fails driver setup. Note the message says 'utc_mode' — a typo in the source for UTS mode.","triggerScenarios":"Configuring uts_modes = [\"host\", \"private\"] or any non-\"\"/non-\"host\" value in the docker plugin allowlist.","commonSituations":"Operators mirror the ipc allowlist and add 'private' or 'shareable', which are invalid for UTS; confusion is worsened by the misleading 'utc_mode' wording in the message.","solutions":["Only use \"host\" (or empty string) entries in uts_modes.","Ignore the 'utc_mode' wording — this refers to uts_mode validation.","Remove any ipc-style values ('private', 'shareable') copied from other allowlists.","Validate the config with the agent before deploy."],"exampleFix":"// before\nuts_modes = [\"private\"]\n// after\nuts_modes = [\"host\"]","handlingStrategy":"validation","validationCode":"func validUts(v string) bool { return v == \"\" || v == \"host\" }\nfor _, m := range cfg.AllowedModes.UTS {\n    if !validUts(m) { return fmt.Errorf(\"invalid uts_mode %q\", m) }\n}","typeGuard":null,"tryCatchPattern":"Catch the setup error and treat it as a fatal allowlist configuration mistake; note the message typo says 'utc_mode' but means UTS.","preventionTips":["UTS mode accepts only \"\" and \"host\".","Don't copy ipc-mode values into uts_modes allowlists.","Validate allowlists with the moby container API validators before rollout."],"tags":["config","docker","validation","uts-mode"],"backgroundTag":"invalid-config-allowlist-value","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}