diff options
author | Matthew Heon <mheon@redhat.com> | 2019-04-26 10:50:57 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2019-04-26 10:50:57 -0400 |
commit | e05af783295c9f4a0b210c0e6d368cf8c6dfe7c6 (patch) | |
tree | 242c630eea8c26d67a91641bfe45f439d7a6acfb /libpod/events/journal_linux.go | |
parent | 04d6ff058270006b98961e0f973ff6ee4c3ba8e8 (diff) | |
download | podman-e05af783295c9f4a0b210c0e6d368cf8c6dfe7c6.tar.gz podman-e05af783295c9f4a0b210c0e6d368cf8c6dfe7c6.tar.bz2 podman-e05af783295c9f4a0b210c0e6d368cf8c6dfe7c6.zip |
Do not hard fail on non-decodable events
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/events/journal_linux.go')
-rw-r--r-- | libpod/events/journal_linux.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go index e6b54db1d..8ba5bc2c7 100644 --- a/libpod/events/journal_linux.go +++ b/libpod/events/journal_linux.go @@ -7,6 +7,7 @@ import ( "github.com/coreos/go-systemd/journal" "github.com/coreos/go-systemd/sdjournal" "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) // EventJournalD is the journald implementation of an eventer @@ -87,7 +88,11 @@ func (e EventJournalD) Read(options ReadOptions) error { } newEvent, err := newEventFromJournalEntry(entry) if err != nil { - return err + // We can't decode this event. + // Don't fail hard - that would make events unusable. + // Instead, log and continue. + logrus.Errorf("Unable to decode event: %v", err) + continue } include := true for _, filter := range eventOptions { |