{"record":{"id":"1ac133c12ba819b0","repo":"hashicorp/nomad","slug":"failed-to-parse-q-as-octal-v-1ac133","errorCode":null,"errorMessage":"Failed to parse %q as octal: %v","messagePattern":"Failed to parse %q as octal: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/structs.go","lineNumber":9010,"sourceCode":"\t\t\t_ = multierror.Append(&mErr, fmt.Errorf(\"must specify change script configuration value when change mode is script\"))\n\t\t}\n\n\t\tif err = t.ChangeScript.Validate(); err != nil {\n\t\t\t_ = multierror.Append(&mErr, err)\n\t\t}\n\tdefault:\n\t\t_ = multierror.Append(&mErr, TemplateChangeModeInvalidError)\n\t}\n\n\t// Verify the splay is positive\n\tif t.Splay < 0 {\n\t\t_ = multierror.Append(&mErr, fmt.Errorf(\"Must specify positive splay value\"))\n\t}\n\n\t// Verify the permissions\n\tif t.Perms != \"\" {\n\t\tif _, err := strconv.ParseUint(t.Perms, 8, 12); err != nil {\n\t\t\t_ = multierror.Append(&mErr, fmt.Errorf(\"Failed to parse %q as octal: %v\", t.Perms, err))\n\t\t}\n\t}\n\n\tif err = t.Wait.Validate(); err != nil {\n\t\t_ = multierror.Append(&mErr, err)\n\t}\n\n\treturn mErr.ErrorOrNil()\n}\n\nfunc (t *Template) Warnings() error {\n\tvar mErr multierror.Error\n\n\t// Deprecation notice for vault_grace\n\tif t.VaultGrace != 0 {\n\t\tmErr.Errors = append(mErr.Errors, fmt.Errorf(\"VaultGrace has been deprecated as of Nomad 0.11 and ignored since Vault 0.5. Please remove VaultGrace / vault_grace from template block.\"))\n\t}\n","sourceCodeStart":8992,"sourceCodeEnd":9028,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/structs.go#L8992-L9028","documentation":"Appended by template validation when the Perms field cannot be parsed as an octal file mode by strconv.ParseUint with base 8. The permissions string is not a valid octal value (e.g. contains an 8/9 or wrong format).","triggerScenarios":"Thrown at nomad/structs/structs.go:9010 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use valid octal digits only, e.g. perms = \"0644\"","Remove the perms field to use the default permissions"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}