dask / dask/dask-cloudprovider

ecs.py _cleanup_stale_resources() leaves behind Security Groups

Open
#151 4 comments 0 reactions 0 assignees View on GitHub
bug provider/aws/ecs
Dominant language
Python
Stars
147
Forks
119
PR merge metrics
No merged PRs in 30d

Description

The issue occurs the AWS cloud provider.
It seems to me that when, for any reason, Security Groups are not garbage collected, the _cleanup_stale_resources() function fails to clean them up. That happens because _cleanup_stale_resources() enumerates only Security Groups with the tag 'createdBy' appropriately set to "dask-cloudprovider". In the AWS web console I can see that the Security Groups created by ECSCluster() do not have any tags.

I noticed the code that sets the tag when creating a Security Group has been commented out.
https://github.com/dask/dask-cloudprovider/blob/027bc1ae98210c1f3f7f080c32a6190c2990e931/dask_cloudprovider/providers/aws/ecs.py#L1074-L1076

Is there any reason for refraining from setting the tag?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.