Merge pull request #2160 from gaorong/victimContainerName

change default oom victim container name
This commit is contained in:
David Ashpole 2019-02-05 09:27:02 -08:00 committed by GitHub
commit 0995283c32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -102,6 +102,7 @@ func (self *OomParser) StreamOoms(outStream chan<- *OomInstance) {
if in_oom_kernel_log { if in_oom_kernel_log {
oomCurrentInstance := &OomInstance{ oomCurrentInstance := &OomInstance{
ContainerName: "/", ContainerName: "/",
VictimContainerName: "/",
TimeOfDeath: msg.Timestamp, TimeOfDeath: msg.Timestamp,
} }
for msg := range kmsgEntries { for msg := range kmsgEntries {

View File

@ -266,7 +266,7 @@ func TestStreamOOMs(t *testing.T) {
ProcessName: "badsysprogram", ProcessName: "badsysprogram",
TimeOfDeath: testTime, TimeOfDeath: testTime,
ContainerName: "/", ContainerName: "/",
VictimContainerName: "", VictimContainerName: "/",
}}, }},
}, },
{ // Multiple OOMs { // Multiple OOMs