[DRIVERS-2600] Clean up Azure resources on task failure Created: 05/Apr/23  Updated: 19/May/23  Resolved: 19/May/23

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Task Priority: Unknown
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-2416 OIDC: Automatic token acquisition for... In Progress
Gantt End to End
has to be finished together with DRIVERS-2411 Support the Azure VM-assigned Managed... Closed
Issue split
split to RUST-1626 Clean up Azure resources on task failure Closed
split to CDRIVER-4608 Clean up Azure resources on task failure Closed
split to CSHARP-4605 Clean up Azure resources on task failure Closed
split to CXX-2669 Clean up Azure resources on task failure Closed
split to GODRIVER-2803 Clean up Azure resources on task failure Closed
split to JAVA-4926 Clean up Azure resources on task failure Closed
split to MOTOR-1113 Clean up Azure resources on task failure Closed
split to NODE-5183 Clean up Azure resources on task failure Closed
split to PHPLIB-1104 Clean up Azure resources on task failure Closed
split to PYTHON-3658 Clean up Azure resources on task failure Closed
split to RUBY-3236 Clean up Azure resources on task failure Closed
Driver Changes: Needed
Downstream Changes Summary:

Add an `expansions.update` command to the `teardown_group` in `testazurekms_task_group`.

See https://github.com/mongodb/mongo-c-driver/pull/1234/files for an example.

Engineering Lead: Kevin Albertson Kevin Albertson
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4608 Fixed 1.24.0
CXX-2669 Works as Designed
CSHARP-4605 Fixed 2.20.0
GODRIVER-2803 Fixed 1.12.0
JAVA-4926 Fixed 4.10.0
NODE-5183 Fixed 5.3.0
MOTOR-1113 Duplicate
PYTHON-3658 Fixed 4.4
PHPLIB-1104 Won't Do
RUBY-3236 Fixed 2.19.0
RUST-1626 Duplicate

 Description   

Summary

Update Evergreen config to delete Azure resources on task failure for the integration test added in DRIVERS-2411.

Motivation

DRIVERS-2411 added an integration test for Azure. If the test setup fails, it may result in resources not being deleted in Azure. This may result in test failures when limits are reached:

https://parsley.mongodb.com/evergreen/mongo_java_driver_testazurekms_variant_testazurekms_task_22cda2c78e574ea3e761926ef14dfde3d69646a6_23_04_05_18_30_41/0/task?bookmarks=0,386&shareLine=356

ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/10b880db-9bca-464f-aec4-2b9a1c96572c/resourceGroups/DRIVERS-2411/providers/Microsoft.Resources/deployments/vm_deploy_LcBmS1IG7IaE1BUhNil8GVEbo5mIMYno","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"PublicIPCountLimitReached","message":"Cannot create more than 20 public IP addresses for this subscription in this region.","details":[]}]}}

Who is the affected end user?

DBX Engineers

How does this affect the end user?

Azure KMS test fails

How likely is it that this problem or use case will occur?

Likely. It has happened several times, and requires manually deleting Azure resources.

If the problem does occur, what are the consequences and how severe are they?

Test failures.

Is this issue urgent?

No.

Is this ticket required by a downstream team?

No.

Is this ticket only for tests?

Yes.

Acceptance Criteria

Azure resources are deleted on task failure.



 Comments   
Comment by Githook User [ 07/Apr/23 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: DRIVERS-2600 Delete Network Security Group created for an Azure VM (#290)

Generated at Thu Feb 08 08:25:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.