Skip to content

Commit 32a33f3

Browse files
committed
Fixed #27260 Handle new type and status in libpod/events/journal_linux.go
Signed-off-by: ByoungUk Lee <[email protected]>
1 parent ee9c370 commit 32a33f3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

libpod/events/journal_linux.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ func (e EventJournalD) Write(ee Event) error {
7474
}
7575
case Volume:
7676
m["PODMAN_NAME"] = ee.Name
77+
case Artifact:
78+
m["PODMAN_NAME"] = ee.Name
79+
m["PODMAN_ID"] = ee.ID
80+
if err := addLabelsToJournal(m, ee.Details.Attributes); err != nil {
81+
return err
82+
}
7783
}
7884

7985
// starting with commit 7e6e267329 we set LogLevel=notice for the systemd healthcheck unit
@@ -275,6 +281,11 @@ func newEventFromJournalEntry(entry *sdjournal.JournalEntry) (*Event, error) {
275281
if val, ok := entry.Fields["ERROR"]; ok {
276282
newEvent.Error = val
277283
}
284+
case Artifact:
285+
newEvent.ID = entry.Fields["PODMAN_ID"]
286+
if err := getLabelsFromJournal(entry, &newEvent); err != nil {
287+
return nil, err
288+
}
278289
}
279290
return &newEvent, nil
280291
}

0 commit comments

Comments
 (0)