-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modify cloud-init error pattern #3320
modify cloud-init error pattern #3320
Conversation
re.compile(r"^(.*\[WARNING\]*)$", re.MULTILINE), | ||
re.compile(r"^(.*WARNING:*)$", re.MULTILINE), | ||
re.compile(r"^(.*[ERROR]*)$", re.MULTILINE), | ||
re.compile(r"^(.*[WARNING]*)$", re.MULTILINE), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new pattern looks incorrect and wide. It matches like W
, AWRING
, IN
or something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add newly examples above, so you can test the new patterns without regressions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out. I tested the new pattern ^(.[WARNING]:) on https://regex101.com/. Also, I removed the $ sign to make the match more tolerate. For now, the only pattern strings in cloud-init.log we want to match are "[ERROR]:" and "[WARNING]:"
re.compile(r"^(.*ERROR:*)$", re.MULTILINE), | ||
re.compile(r"^(.*\[WARNING\]*)$", re.MULTILINE), | ||
re.compile(r"^(.*WARNING:*)$", re.MULTILINE), | ||
re.compile(r"^(.*\[ERROR\]:.*)", re.MULTILINE), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add examples above, which error want or unwanted. The previous pattern captured patterns like ERROR: aaa
. But they are removed. Please specify the reasons.
* modify cloud-init error pattern * modify cloud-init error pattern * modify cloud-init error pattern * modify cloud-init error pattern
Correct pattern matching list _ERROR_WARNING_pattern for cloud-init test in LISA. Previously, it does not properly catch message patter [ERROR] and [WARNING] in cloud-init.log