Skip to content
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

Add retry logic for ExtPolicy "ResourceNotFound" test failure #3311

Merged
merged 4 commits into from
Jan 31, 2025

Conversation

mgunnala
Copy link

Description

Issue #

We are seeing intermittent test failures for the ExtPolicy (ext_policy.py) scenario on Mooncake and Government clouds. The failures are only seen in the following scenario (test case 4):

  • block custom script with policy, then try to delete -> fails as expected
  • allow custom script with policy and retry the delete -> succeeds as expected
  • enable custom script -> this should succeed, but we occasionally see a "ResourceNotFound" error

2025-01-28T13:41:18Z.314 [ERROR] ******** [Failed] ExtPolicy: Fail: Unexpected error while trying to enable Microsoft.Azure.Extensions.CustomScript. Extension is allowed by policy so this operation should have completed successfully.
Error: (ResourceNotFound) The Resource 'Microsoft.Compute/virtualMachines/lisa-WALinuxAgent-20250128-130736-786-e72-n0/extensions/CustomScript' under resource group 'lisa-WALinuxAgent-20250128-130736-786-e72' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.Compute/virtualMachines/lisa-WALinuxAgent-20250128-130736-786-e72-n0/extensions/CustomScript' under resource group 'lisa-WALinuxAgent-20250128-130736-786-e72' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix!

As a workaround, this PR adds logic to retry 'enable' if the operation fails with a ResourceNotFound error.


PR information

  • Ensure development PR is based on the develop branch.
  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

tests_e2e/tests/ext_policy/ext_policy.py Outdated Show resolved Hide resolved
tests_e2e/tests/ext_policy/ext_policy.py Outdated Show resolved Hide resolved
@maddieford maddieford merged commit c0d0207 into Azure:develop Jan 31, 2025
11 checks passed
@mgunnala mgunnala deleted the policy_e2e_fix branch January 31, 2025 21:35
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.

3 participants