Commit Graph

7 Commits

Author SHA1 Message Date
haoyun
bbe46b8c43 feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io>
Co-authored-by: zounengren <zouyee1989@gmail.com>
2022-01-07 10:27:03 +08:00
Sebastiaan van Stijn
dc92ad6520
Replace errors.Cause() with errors.Is()
Dependencies may be switching to use the new `%w` formatting
option to wrap errors; switching to use `errors.Is()` makes
sure that we are still able to unwrap the error and detect the
underlying cause.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-08 14:36:45 +02:00
Kathryn Baldauf
b4211d94e2 fail on file not found for shim reconnect on containerd restart
Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
2019-09-17 14:49:29 -07:00
Li Yuxuan
04caf1fc4e Ignore fifo error when using v2 multi-container shim
When using a multi-container shim, the fifo of the 2nd to Nth container
will not be opened when the ctx is done. This will cause an
`ErrReadClosed` that can be ignored.

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-08-17 09:40:08 +08:00
Justin Terry (VM)
828f6eb842 Fix a bug in shim log on Windows that can cause 100% CPU utilization
With the change to unified shims (ie: 1 shim per multiple tasks) the shimLog
on Windows for the 2nd-Nth worload containers will not have an associated
named pipe listener.

Due to a subtle bug in errors.Wrap passing a nil error we would unblock the
disconnected listener and return 0 byte successfull reads which would cause go
to continually read and cap the CPU.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2019-02-27 16:51:52 -08:00
Justin Terry (VM)
8362d9aa48 switch shim log Windows client/server direction
Switches the client/server direction of the shim-log pipe on Windows so
that the shim is the listener. This allows the containerd client to
reconnect as needed to the log streams.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-08-08 12:58:45 -07:00
Michael Crosby
6ba4ddfdda Add shim log pipe for log forwarding to the daemon
A fifo on unix or named pipe on Windows will be provided to the shim.
It can be located inside the `cwd` of the shim named "log".
The shims can use the existing `github.com/containerd/containerd/log` package to log debug messages.
Messages will automatically be output in the containerd's daemon logs with the correct fiels and runtime set.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-08-07 15:31:00 -04:00