{"record":{"id":"707a702ff7788091","repo":"hashicorp/nomad","slug":"failed-to-parse-raft-logstore-verification-interva","errorCode":null,"errorMessage":"failed to parse raft_logstore verification interval %q: %w","messagePattern":"failed to parse raft_logstore verification interval %q: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"command/agent/agent.go","lineNumber":687,"sourceCode":"\t\tVerificationInterval: 5 * time.Minute,\n\t}\n\tif lsc := agentConfig.Server.RaftLogStoreConfig; lsc != nil {\n\t\tif lsc.Backend != \"\" {\n\t\t\tconf.RaftLogStoreConfig.Backend = lsc.Backend\n\t\t}\n\t\tconf.RaftLogStoreConfig.DisableLogCache = lsc.DisableLogCache\n\t\tif lsc.BoltDB != nil {\n\t\t\tconf.RaftLogStoreConfig.BoltDBNoFreelistSync = lsc.BoltDB.NoFreelistSync\n\t\t}\n\t\tif lsc.WAL != nil && lsc.WAL.SegmentSizeMB > 0 {\n\t\t\tconf.RaftLogStoreConfig.WALSegmentSize = lsc.WAL.SegmentSizeMB * 1024 * 1024\n\t\t}\n\t\tif lsc.Verification != nil {\n\t\t\tconf.RaftLogStoreConfig.VerificationEnabled = lsc.Verification.Enabled\n\t\t\tif lsc.Verification.Interval != \"\" {\n\t\t\t\tdur, err := time.ParseDuration(lsc.Verification.Interval)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"failed to parse raft_logstore verification interval %q: %w\",\n\t\t\t\t\t\tlsc.Verification.Interval, err)\n\t\t\t\t}\n\t\t\t\tconf.RaftLogStoreConfig.VerificationInterval = dur\n\t\t\t}\n\t\t}\n\t} else if bolt := agentConfig.Server.RaftBoltConfig; bolt != nil {\n\t\t// Backwards compatibility: migrate deprecated raft_boltdb settings\n\t\tconf.RaftLogStoreConfig.BoltDBNoFreelistSync = bolt.NoFreelistSync\n\t\t// Clear the legacy field after migration\n\t\tagentConfig.Server.RaftBoltConfig = nil\n\t}\n\n\t// Interpret job_max_source_size as bytes from string value\n\tif agentConfig.Server.JobMaxSourceSize == nil {\n\t\tagentConfig.Server.JobMaxSourceSize = new(\"1M\")\n\t}\n\tjobMaxSourceBytes, err := humanize.ParseBytes(*agentConfig.Server.JobMaxSourceSize)\n\tif err != nil {","sourceCodeStart":669,"sourceCodeEnd":705,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/command/agent/agent.go#L669-L705","documentation":"Within convertServerConfig, a raft_logstore verification_interval string is parsed with time.ParseDuration. If the string is not a valid Go duration (e.g. missing unit, wrong syntax), the agent wraps the underlying error and aborts config conversion. Valid values look like \"10s\", \"1m\", \"2h\".","triggerScenarios":"Server config has server.raft_logstore.verification { interval = \"...\" } with a non-empty string that time.ParseDuration cannot parse — e.g. \"10\" (no unit), \"ten minutes\", \"5m30\" (malformed), or an interpolated variable that expanded to empty/garbage.","commonSituations":"Writing interval = \"30\" assuming seconds are the default (Go durations require a unit); environment-variable templating injecting an unquoted or empty value; typos like \"1Omin\"; copying Prometheus-style durations like \"5m0s\" variants that are fine, vs \"5min\" which is not.","solutions":["Change verification.interval to a valid Go duration with an explicit unit, e.g. interval = \"10s\".","If a template/variable supplies the value, verify its rendered output (nomad agent -config ... output or `nomad validate`).","Remove the interval key to fall back to the default verification interval if custom timing is not needed.","Validate config with `nomad validate <config>` before restarting."],"exampleFix":"// before\nraft_logstore {\n  verification {\n    enabled  = true\n    interval = \"30\"\n  }\n}\n// after\nraft_logstore {\n  verification {\n    enabled  = true\n    interval = \"30s\"\n  }\n}","handlingStrategy":"validation","validationCode":"if _, err := time.ParseDuration(interval); err != nil {\n    return fmt.Errorf(\"raft_logstore verification interval %q is not a valid Go duration (e.g. 10s, 1m): %v\", interval, err)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include a unit in duration strings (s, m, h) — Go durations have no default unit.","Avoid non-standard units like \"min\"; use \"m\".","Validate templated configs with `nomad validate` before restart."],"tags":["nomad","config-validation","raft","duration-parsing"],"backgroundTag":"invalid-duration-format","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"}