You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/dockerregistry/server/metrics/errorcodes.go
+37-7Lines changed: 37 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -9,14 +9,44 @@ import (
9
9
)
10
10
11
11
const (
12
+
// errCodeUnsupportedMethod happens when a storage driver does not offer
13
+
// support for a determine http method, or when it doesn't support url
14
+
// redirects. this error usually bubbles up back to clients, making it
15
+
// easy to detect. fixing it might simply involve disabling redirects
16
+
// the image registry.
12
17
errCodeUnsupportedMethod="UNSUPPORTED_METHOD"
13
-
errCodePathNotFound="PATH_NOT_FOUND"
14
-
errCodeInvalidPath="INVALID_PATH"
15
-
errCodeInvalidOffset="INVALID_OFFSET"
16
-
errCodeReadOnlyFS="READ_ONLY_FILESYSTEM"
17
-
errCodeFileTooLarge="FILE_TOO_LARGE"
18
-
errCodeDeviceOutOfSpace="DEVICE_OUT_OF_SPACE"
19
-
errCodeUnknown="UNKNOWN"
18
+
19
+
// errCodePathNotFound indicates that a given path does not exist in
20
+
// the underlying storage. it usually indicates a user error and should
21
+
// not be considered high severity.
22
+
errCodePathNotFound="PATH_NOT_FOUND"
23
+
24
+
// errCodeInvalidPath indicates the provided path does not comform to
25
+
// the upstream distribution standards.
26
+
// see https://github.com/distribution/distribution/blob/bce9fcd135940c4be187f6fc98c2e27dad9ddcea/registry/storage/driver/storagedriver.go?plain=1#L134-L139
27
+
// for details.
28
+
errCodeInvalidPath="INVALID_PATH"
29
+
30
+
// errCodeInvalidOffset indicates an attempt to read/write at an invalid
31
+
// offset. A valid offset is contextual. Storage drivers usually specify
32
+
// non-zero offsets when reading a stream of bytes from storage, or
33
+
// during chunked blob uploads.
34
+
errCodeInvalidOffset="INVALID_OFFSET"
35
+
36
+
// errCodeReadOnlyFS indicates the filesystem the registry is trying to
37
+
// write is read-only. this is a catastrophic error and needs admin
38
+
// intervention for recovery. however, clients will only notice if they
39
+
// try to push directly into the registry. pull-through will transparently
40
+
// fail and failures will only be visible in logs and metrics/alerts.
41
+
errCodeReadOnlyFS="READ_ONLY_FILESYSTEM"
42
+
43
+
// errCodeFileTooLarge indicates the file being uploaded is too large.
44
+
errCodeFileTooLarge="FILE_TOO_LARGE"
45
+
46
+
// errCodeDeviceOutOfSpace indicates the storage device is out of space.
0 commit comments