-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
errdefs: detect certain sycall errors as internal #5182
Conversation
errdefs/internal.go
Outdated
|
||
var systemErrors = []syscall.Errno{ | ||
syscall.EIO, // I/O error | ||
syscall.ENOMEM, // Out of memory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@silvin-lubecki I'm not sure if we should mark ENOMEM
and ENOSPC
as internal like others or maybe some ResourceExhausted
code would make more sense. Technically these are likely caused by too much usage from user, not internal bugs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you @tonistiigi. I like what you suggested with the specific error code, it allows some latitude to interpret it as user or internal error 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved ENOMEM
and ENOSPC
to ResourceExhausted
code instead.
977cd82
to
d90b759
Compare
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
d90b759
to
d9a9a4d
Compare
If container exits with error and has invoked OOMKiller mark the origin error as ENOMEM so that it can be detected on the client side. gRPC will set ENOMEM as codes.ResouceExhausted based on moby#5182 Signed-off-by: Tonis Tiigi <[email protected]>
If container exits with error and has invoked OOMKiller mark the origin error as ENOMEM so that it can be detected on the client side. gRPC will set ENOMEM as codes.ResouceExhausted based on moby#5182 Signed-off-by: Tonis Tiigi <[email protected]>
PTAL @silvin-lubecki 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If container exits with error and has invoked OOMKiller mark the origin error as ENOMEM so that it can be detected on the client side. gRPC will set ENOMEM as codes.ResouceExhausted based on moby#5182 Signed-off-by: Tonis Tiigi <[email protected]>
depends on #5181depends on #5163