containerd / fifo

fifo pkg for Go
https://containerd.io
Apache License 2.0
85 stars 30 forks source link

Resize fifo to 1024K #55

Open kkkkun opened 6 months ago

kkkkun commented 6 months ago

The container which writes logs synchronously would be blocked in the following scenarios:

  1. Container writes logs synchronously to stdout or stderr .
  2. Upgrade containerd and speed a lot of time.

So it is important to resize fifo in container runtime. After commit, the pipe_max_size had adjusted to 1024K.

kkkkun commented 2 months ago

/assign @thaJeztah

kkkkun commented 2 months ago

The failed tests seem not to be related to the change.

thaJeztah commented 2 months ago

The failed tests seem not to be related to the change.

Hm.. interesting; linting failure I suspect is because of an old version of GolangCI-lint, which is not yet aware of the max builtin? Not sure why that only shows up now.

Running [/home/runner/golangci-lint-1.51.1-linux-amd64/golangci-lint run --out-format=github-actions --path-prefix=src/github.com/containerd/fifo] in [/home/runner/work/fifo/fifo/src/github.com/containerd/fifo] ...
  Error: undefined: max (typecheck)

  Error: issues found

Don't know about the other one (I'm not too familiar with all of this repository);

=== RUN   TestFifoCloseWhileReadingAndWriting
    fifo_test.go:450: 
            Error Trace:    /home/runner/work/fifo/fifo/src/github.com/containerd/fifo/fifo_test.go:450
            Error:          An error is expected but got nil.
            Test:           TestFifoCloseWhileReadingAndWriting
    fifo_test.go:454: Read should not succeed
--- FAIL: TestFifoCloseWhileReadingAndWriting (0.50s)
thaJeztah commented 2 months ago

Can you rebase your PR? https://github.com/containerd/fifo/pull/58 should have fixed the CI failures

kkkkun commented 2 months ago

Can you rebase your PR? #58 should have fixed the CI failures

Done. I do not understand the failed test.

=== RUN   TestFifoCloseWhileReadingAndWriting
    fifo_test.go:450: 
            Error Trace:    /home/runner/work/fifo/fifo/src/github.com/containerd/fifo/fifo_test.go:450
            Error:          An error is expected but got nil.
            Test:           TestFifoCloseWhileReadingAndWriting
    fifo_test.go:454: Read should not succeed
--- FAIL: TestFifoCloseWhileReadingAndWriting (0.50s)