diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-09-09 11:07:07 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-09-12 18:05:11 +0200 |
commit | c5bdb6afe741d34c32f779b6ef9508b6f1d05794 (patch) | |
tree | addc0b3a2b657e4fc4cd6de80f067f19c63609fc /libpod/events/events_linux.go | |
parent | 5abc08df252037e2984a2b532f17ba78fdd876d4 (diff) | |
download | podman-c5bdb6afe741d34c32f779b6ef9508b6f1d05794.tar.gz podman-c5bdb6afe741d34c32f779b6ef9508b6f1d05794.tar.bz2 podman-c5bdb6afe741d34c32f779b6ef9508b6f1d05794.zip |
fix hang with podman events file logger
podman --events-backend file events --stream=false should never hang. The
problem is that our tail library will wait for the file to be created
which makes sense when we do not run with --stream=false. To fix this we
can just always create the file when the logger is initialized. This
would also help to report errors early on in case the file is not
accessible.
Fixes part one from #15688
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/events/events_linux.go')
-rw-r--r-- | libpod/events/events_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/events/events_linux.go b/libpod/events/events_linux.go index e7801af5b..b11467aca 100644 --- a/libpod/events/events_linux.go +++ b/libpod/events/events_linux.go @@ -18,7 +18,7 @@ func NewEventer(options EventerOptions) (Eventer, error) { } return eventer, nil case strings.ToUpper(LogFile.String()): - return EventLogFile{options}, nil + return newLogFileEventer(options) case strings.ToUpper(Null.String()): return NewNullEventer(), nil case strings.ToUpper(Memory.String()): |