{"record":{"id":"308cccbec47e1ae2","repo":"containerd/containerd","slug":"failed-to-get-status-w-308ccc","errorCode":null,"errorMessage":"failed to get status: %w","messagePattern":"failed to get status: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/remotes/docker/pusher.go","lineNumber":104,"sourceCode":"\t\tctx = context.WithValue(ctx, warningSourceKey{}, WarningSource{\n\t\t\tDesc:   &desc,\n\t\t\tDigest: &desc.Digest,\n\t\t})\n\t}\n\tstatus, err := p.tracker.GetStatus(ref)\n\tif err == nil {\n\t\tif status.Committed && status.Offset == status.Total {\n\t\t\treturn nil, fmt.Errorf(\"ref %v: %w\", ref, errdefs.ErrAlreadyExists)\n\t\t}\n\t\tif unavailableOnFail && status.ErrClosed == nil {\n\t\t\t// Another push of this ref is happening elsewhere. The rest of function\n\t\t\t// will continue only when `errdefs.IsNotFound(err) == true` (i.e. there\n\t\t\t// is no actively-tracked ref already).\n\t\t\treturn nil, fmt.Errorf(\"push is on-going: %w\", errdefs.ErrUnavailable)\n\t\t}\n\t\t// TODO: Handle incomplete status\n\t} else if !errdefs.IsNotFound(err) {\n\t\treturn nil, fmt.Errorf(\"failed to get status: %w\", err)\n\t}\n\n\thosts := p.filterHosts(HostCapabilityPush)\n\tif len(hosts) == 0 {\n\t\treturn nil, fmt.Errorf(\"no push hosts: %w\", errdefs.ErrNotFound)\n\t}\n\n\tvar (\n\t\tisManifest bool\n\t\texistCheck []string\n\t\thost       = hosts[0]\n\t)\n\n\tif images.IsManifestType(desc.MediaType) || images.IsIndexType(desc.MediaType) {\n\t\tisManifest = true\n\t\texistCheck = getManifestPath(p.object, desc.Digest)\n\t} else {\n\t\texistCheck = []string{\"blobs\", desc.Digest.String()}","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/containerd/containerd/blob/4246446a2bf7d03837b0244118d858799393bd80/core/remotes/docker/pusher.go#L86-L122","documentation":"dockerPusher.push calls p.tracker.GetStatus(ref) to learn about prior push attempts. If GetStatus fails with any error other than NotFound (i.e. the tracker itself is broken or its backing store failed), the pusher cannot safely proceed and wraps the tracker error as \"failed to get status\". The original tracker error is preserved via %w for errors.Is/As inspection.","triggerScenarios":"GetStatus returning a non-NotFound error: custom StatusTracker backend (DB/redis) unreachable, corrupted status file in the external tracker, lock contention errors from a StatusTrackLocker implementation, or disk I/O errors in persistent trackers.","commonSituations":"Misconfigured external status-tracker storage; network partitions to a remote tracker service; file permission problems on persistent tracker state; buggy third-party StatusTracker plugins.","solutions":["Inspect the wrapped error (errors.Unwrap / %v of err) to find the real tracker failure","Verify the StatusTracker backend (DB, redis, file) is reachable and has correct permissions","Fall back to the default in-memory InFlightTracker if a custom tracker misbehaves","Retry once the tracker backend recovers — this is an infrastructure, not a content, problem"],"exampleFix":"// before\ntracker := NewRedisStatusTracker(badAddr)\n// after\nif err := tracker.Ping(); err != nil { log.Fatalf(\"tracker unavailable: %v\", err) }\ntracker := NewRedisStatusTracker(addr)","handlingStrategy":"try-catch","validationCode":"// verify tracker backend reachable before push\nif err := healthCheckTracker(tracker); err != nil {\n    return fmt.Errorf(\"tracker not ready: %w\", err)\n}","typeGuard":"null","tryCatchPattern":"w, err := pusher.Writer(ctx, opts...)\nif err != nil {\n    var inner error\n    if strings.Contains(err.Error(), \"failed to get status\") {\n        errors.As(err, &inner) // inspect tracker root cause\n        return fmt.Errorf(\"tracker failure, aborting push: %v\", inner)\n    }\n    return err\n}","preventionTips":["Health-check custom StatusTracker backends before push operations","Log and monitor tracker storage (DB/file) availability","Fall back to the in-memory InFlightTracker when external trackers fail","Retry pushes after tracker infrastructure recovers"],"tags":["go","push","status-tracker","infrastructure"],"backgroundTag":"status-tracker-unavailable","analyzedSha":"4246446a2bf7d03837b0244118d858799393bd80","analyzedAt":"2026-09-02T00:14:43.053Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}