Skip to content

test: try to fix 202204 waagent test issues#8932

Draft
titilambert wants to merge 1 commit into
mainfrom
test-try-to-fix-202204-waagent
Draft

test: try to fix 202204 waagent test issues#8932
titilambert wants to merge 1 commit into
mainfrom
test-try-to-fix-202204-waagent

Conversation

@titilambert

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

@titilambert

titilambert commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@titilambert titilambert marked this pull request as draft July 14, 2026 01:58
@titilambert titilambert changed the base branch from add-e2e-tests-for-mana to main July 14, 2026 01:59
@titilambert titilambert force-pushed the test-try-to-fix-202204-waagent branch from 10f1023 to 91c0efd Compare July 14, 2026 01:59
Copilot AI review requested due to automatic review settings July 14, 2026 14:29
@titilambert titilambert force-pushed the test-try-to-fix-202204-waagent branch from 91c0efd to cc8e21d Compare July 14, 2026 14:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ProtocolError ExtHandler errors when scanning waagent.log (and retain the existing Ubuntu 22.04 FIPS-specific exclusion).

Comment thread e2e/validators.go
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 thread e2e/validators.go
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 thread e2e/validators.go
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)
}
@titilambert titilambert force-pushed the test-try-to-fix-202204-waagent branch from cc8e21d to eb274a7 Compare July 14, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants