-
Notifications
You must be signed in to change notification settings - Fork 609
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
[Carry 2337] shutdown logger after exit #2621
[Carry 2337] shutdown logger after exit #2621
Conversation
46fe32b
to
10676af
Compare
This shouldn't be a separate commit |
f351d2e
to
f2a16e4
Compare
@AkihiroSuda is it better now ? |
The commit message isn't still really descriptive |
pkg/logging/logging.go
Outdated
@@ -207,7 +208,7 @@ func loggingProcessAdapter(ctx context.Context, driver Driver, dataStore, hostAd | |||
buf := make([]byte, 32<<10) | |||
_, err := io.CopyBuffer(writer, reader, buf) | |||
if err != nil { | |||
logrus.Errorf("failed to copy stream: %s", err) | |||
log.L.Errorf("failed to copy stream: %v", err) |
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.
This should meld into the carried commit so that the carried commit is still compilable
d6055c3
to
193c92b
Compare
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.
Still contains uncompilable commits
$ git checkout a234c8eab60db7b5a0d2933729c9035ae66fa0e4
$ make
GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w -X github.com/containerd/nerdctl/pkg/version.Version=v1.7.0-10-ga234c8ea -X github.com/containerd/nerdctl/pkg/version.Revision=a234c8eab60db7b5a0d2933729c9035ae66fa0e4" -o /home/suda/gopath/src/github.com/containerd/nerdctl/_output/nerdctl github.com/containerd/nerdctl/cmd/nerdctl
# github.com/containerd/nerdctl/pkg/logging
pkg/logging/logging.go:179:4: undefined: logrus
make: *** [Makefile:57: nerdctl] Error 1
pkg/logging/logging.go
Outdated
// the logger will obtain an exclusive lock on a file until the container is | ||
// stopped and the driver has finished processing all output, | ||
// so that waiting log viewers can be signalled when the process is complete. | ||
return lockutil.WithDirLock(loggerLock, func() 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.
"DirLock" is now misnomer
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.
Why ? could you be more explicit please?
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.
loggerLock doesn't seem to be a dir
41e8522
to
c322829
Compare
Signed-off-by: Mrudul Harwani <[email protected]> fixes to squash Signed-off-by: fahed dorgaa <[email protected]> fixes to squash Signed-off-by: fahed dorgaa <[email protected]>
Signed-off-by: Mrudul Harwani <[email protected]>
…ocessed data Signed-off-by: Mrudul Harwani <[email protected]>
Signed-off-by: Mrudul Harwani <[email protected]>
…thLock Signed-off-by: Mrudul Harwani <[email protected]>
Signed-off-by: fahed dorgaa <[email protected]>
10132ee
to
21730db
Compare
carry #2337 ( originally created by @mharwani)