fail on file not found for shim reconnect on containerd restart

Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
This commit is contained in:
Kathryn Baldauf
2019-09-13 17:25:48 -07:00
parent 87bff67128
commit b4211d94e2
6 changed files with 28 additions and 7 deletions

View File

@@ -21,13 +21,15 @@ package v2
import (
"context"
"io"
"net"
"path/filepath"
"time"
"github.com/containerd/fifo"
"golang.org/x/sys/unix"
)
func openShimLog(ctx context.Context, bundle *Bundle) (io.ReadCloser, error) {
func openShimLog(ctx context.Context, bundle *Bundle, _ func(string, time.Duration) (net.Conn, error)) (io.ReadCloser, error) {
return fifo.OpenFifo(ctx, filepath.Join(bundle.Path, "log"), unix.O_RDONLY|unix.O_CREAT|unix.O_NONBLOCK, 0700)
}