Skip to content

Commit f4648d0

Browse files
authored
fix: Catch network interface deletion failure (#3353)
1 parent 13f948e commit f4648d0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

integration/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ def _delete_unused_network_interface_by_subnet(ec2_client, subnet_id):
7575
network_interface_ids += [ni["NetworkInterfaceId"] for ni in page["NetworkInterfaces"]]
7676

7777
for ni_id in network_interface_ids:
78-
ec2_client.delete_network_interface(NetworkInterfaceId=ni_id)
78+
try:
79+
ec2_client.delete_network_interface(NetworkInterfaceId=ni_id)
80+
except ClientError as e:
81+
LOG.error("Unable to delete network interface %s", ni_id, exc_info=e)
7982
time.sleep(0.5)
8083

8184
LOG.info("Deleted %s unused network interfaces under subnet %s", len(network_interface_ids), subnet_id)

0 commit comments

Comments
 (0)