test: try to fix 202204 waagent test issues#8932
Draft
titilambert wants to merge 1 commit into
Draft
Conversation
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
10f1023 to
91c0efd
Compare
91c0efd to
cc8e21d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the E2E waagent log validator to reduce flakiness (notably on Ubuntu 22.04 VHDs) by waiting for expected WALinuxAgent ExtHandler log entries to appear and by filtering certain transient ExtHandler error lines.
Changes:
- Add polling (up to 60s) for waagent.log to contain both the “AutoUpdate disabled” line and the expected ExtHandler “running as process” line.
- Filter out
ProtocolErrorExtHandler errors when scanning waagent.log (and retain the existing Ubuntu 22.04 FIPS-specific exclusion).
Comment on lines
+2970
to
+2972
| s.T.Logf("waagent log poll attempt %d: waiting for ExtHandler to be ready (hasAutoUpdate=%v, hasRunning=%v)", | ||
| attempt, hasAutoUpdate, hasRunning) | ||
| time.Sleep(pollInterval) |
Comment on lines
+2966
to
+2967
| s.T.Fatalf("timed out after %s waiting for waagent.log to contain expected entries.\nMissing:\n %s\nLast log contents:\n%s", | ||
| pollTimeout, strings.Join(missing, "\n "), logContents) |
Comment on lines
+2985
to
2988
| grepCmd := fmt.Sprintf("sudo grep 'ERROR ExtHandler' %s | grep -v 'ProtocolError' || true", waagentLogFile) | ||
| if isUbuntu2204FIPS { | ||
| grepCmd = fmt.Sprintf("sudo grep 'ERROR ExtHandler' %s | grep -v 'Cannot convert PFX to PEM' || true", waagentLogFile) | ||
| grepCmd = fmt.Sprintf("sudo grep 'ERROR ExtHandler' %s | grep -v 'ProtocolError' | grep -v 'Cannot convert PFX to PEM' || true", waagentLogFile) | ||
| } |
cc8e21d to
eb274a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #