diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-08 02:25:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 02:25:08 +0200 |
commit | 41de7b14e0c69be15a7f19c69d5bfb374be62466 (patch) | |
tree | e5fb728f00220d99a4f2cee031e69e6740204073 /libpod/events/journal_linux.go | |
parent | 35ecf498dc1fb20a56af615d9324d1707cc56fb9 (diff) | |
parent | 62a04f2b0397784232b1da474ecfc2f2a89018e1 (diff) | |
download | podman-41de7b14e0c69be15a7f19c69d5bfb374be62466.tar.gz podman-41de7b14e0c69be15a7f19c69d5bfb374be62466.tar.bz2 podman-41de7b14e0c69be15a7f19c69d5bfb374be62466.zip |
Merge pull request #3745 from baude/eventsjournaldremovematch
systemd library conflict with seektail and addmatch
Diffstat (limited to 'libpod/events/journal_linux.go')
-rw-r--r-- | libpod/events/journal_linux.go | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go index ae96e3b3b..7d195dc79 100644 --- a/libpod/events/journal_linux.go +++ b/libpod/events/journal_linux.go @@ -54,14 +54,17 @@ func (e EventJournalD) Read(options ReadOptions) error { if err != nil { return errors.Wrapf(err, "failed to generate event options") } - podmanJournal := sdjournal.Match{Field: "SYSLOG_IDENTIFIER", Value: "podman"} //nolint - j, err := sdjournal.NewJournal() //nolint + j, err := sdjournal.NewJournal() //nolint if err != nil { return err } - if err := j.AddMatch(podmanJournal.String()); err != nil { - return errors.Wrap(err, "failed to add filter for event log") - } + // TODO AddMatch and Seek seem to conflict + // Issue filed upstream -> https://github.com/coreos/go-systemd/issues/315 + // Leaving commented code in case upstream fixes things + //podmanJournal := sdjournal.Match{Field: "SYSLOG_IDENTIFIER", Value: "podman"} //nolint + //if err := j.AddMatch(podmanJournal.String()); err != nil { + // return errors.Wrap(err, "failed to add filter for event log") + //} if len(options.Since) == 0 && len(options.Until) == 0 && options.Stream { if err := j.SeekTail(); err != nil { return errors.Wrap(err, "failed to seek end of journal") @@ -96,6 +99,12 @@ func (e EventJournalD) Read(options ReadOptions) error { if err != nil { return err } + // TODO this keeps us from feeding the podman event parser with + // with regular journal content; it can be removed if the above + // problem with AddMatch is resolved. + if entry.Fields["PODMAN_EVENT"] == "" { + continue + } newEvent, err := newEventFromJournalEntry(entry) if err != nil { // We can't decode this event. |