Skip to content

Commit

Permalink
Improve bonding check and lower threshold
Browse files Browse the repository at this point in the history
After coreos/bugs#2065
a test for "excessive bonding link status messages"
was introduced which also is good to keep for
coreos/bugs#2374.

However, having this message printed 10 times
does not directly relate to an error.
The test should check if something like
'bond0: Gained carrier' or
'link status definitely up for interface enp0s20f0'
is coming at the end and then continue.
Add a second match for these messages that skips
the test. Also lower the threshold to see if the
logic works well.
  • Loading branch information
pothos committed Mar 19, 2020
1 parent 0d76914 commit 97b57fb
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions kola/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ var (
UpdatePayloadFile string

consoleChecks = []struct {
desc string
match *regexp.Regexp
skipFlag *register.Flag
desc string
match *regexp.Regexp
skipIfMatch *regexp.Regexp
skipFlag *register.Flag
}{
{
desc: "emergency shell",
Expand Down Expand Up @@ -112,8 +113,9 @@ var (
},
{
// https://github.com/coreos/bugs/issues/2065
desc: "excessive bonding link status messages",
match: regexp.MustCompile("(?s:link status up for interface [^,]+, enabling it in [0-9]+ ms.*?){10}"),
desc: "excessive bonding link status messages",
match: regexp.MustCompile("(?s:link status up for interface [^,]+, enabling it in [0-9]+ ms.*?){3}"),
skipIfMatch: regexp.MustCompile("(bond.*? link status definitely up for interface)|(bond.*? first active interface up)|(bond.*? Gained carrier)|(bond.*? link becomes ready)"),
},
{
// https://github.com/coreos/bugs/issues/2180
Expand Down Expand Up @@ -578,6 +580,12 @@ func CheckConsole(output []byte, t *register.Test) []string {
}
match := check.match.FindSubmatch(output)
if match != nil {
if check.skipIfMatch != nil {
skipMatch := check.skipIfMatch.FindSubmatch(output)
if skipMatch != nil {
continue
}
}
badness := check.desc
if len(match) > 1 {
// include first subexpression
Expand Down

0 comments on commit 97b57fb

Please sign in to comment.