{"record":{"id":"7368411bdfc968b9","repo":"hashicorp/nomad","slug":"failed-to-parse-image-pull-timeout-v","errorCode":null,"errorMessage":"Failed to parse image_pull_timeout: %v","messagePattern":"Failed to parse image_pull_timeout: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/docker/driver.go","lineNumber":682,"sourceCode":"\n\tif authIsEmpty(authOptions) {\n\t\td.logger.Debug(\"did not find docker auth for repo\", \"repo\", repo)\n\t}\n\n\td.eventer.EmitEvent(&drivers.TaskEvent{\n\t\tTaskID:    task.ID,\n\t\tAllocID:   task.AllocID,\n\t\tTaskName:  task.Name,\n\t\tTimestamp: time.Now(),\n\t\tMessage:   \"Downloading image\",\n\t\tAnnotations: map[string]string{\n\t\t\t\"image\": dockerImageRef(repo, tag),\n\t\t},\n\t})\n\n\tpullDur, err := time.ParseDuration(driverConfig.ImagePullTimeout)\n\tif err != nil {\n\t\treturn \"\", \"\", fmt.Errorf(\"Failed to parse image_pull_timeout: %v\", err)\n\t}\n\n\treturn d.coordinator.PullImage(driverConfig.Image, authOptions, task.ID, d.emitEventFunc(task), pullDur, d.config.pullActivityTimeoutDuration)\n}\n\nfunc (d *Driver) emitEventFunc(task *drivers.TaskConfig) LogEventFn {\n\treturn func(msg string, annotations map[string]string) {\n\t\td.eventer.EmitEvent(&drivers.TaskEvent{\n\t\t\tTaskID:      task.ID,\n\t\t\tAllocID:     task.AllocID,\n\t\t\tTaskName:    task.Name,\n\t\t\tTimestamp:   time.Now(),\n\t\t\tMessage:     msg,\n\t\t\tAnnotations: annotations,\n\t\t})\n\t}\n}\n","sourceCodeStart":664,"sourceCodeEnd":700,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/drivers/docker/driver.go#L664-L700","documentation":"pullImage parses the driver's image_pull_timeout config value with time.ParseDuration; this error means the configured string is not a valid Go duration. No pull starts because the pull deadline cannot be computed.","triggerScenarios":"image_pull_timeout in the task docker config (or plugin config) is set to a string ParseDuration rejects, e.g. \"10m\", \"600\" (missing unit), \"ten minutes\", or \"5m30\".","commonSituations":"Forgetting the time unit (\"600\" instead of \"600s\"), using unsupported units like \"5min\", copy-pasting durations with spaces, or typo during hand-editing of job files.","solutions":["Use a valid Go duration string: number plus unit such as \"30s\", \"5m\", \"1h\".","Remove any spaces or extra characters from the value.","If no custom timeout is needed, delete the field to fall back to the default.","Test the string with `go tool` / mentally verify against time.ParseDuration rules."],"exampleFix":"// before\nconfig {\n  image_pull_timeout = \"600\"\n}\n// after\nconfig {\n  image_pull_timeout = \"10m\"\n}","handlingStrategy":"validation","validationCode":"func validDuration(s string) bool {\n\t_, err := time.ParseDuration(s)\n\treturn err == nil\n}\n// ensure image_pull_timeout like \"10m\", \"45s\"; reject \"600\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include a unit suffix (s, m, h) in duration strings","Run `nomad job validate` to catch bad values pre-submit","Keep durations in one place (defaults) instead of ad-hoc per-job values"],"tags":["docker","config","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"}