dask / dask/dask-cloudprovider
ecs.py _cleanup_stale_resources() leaves behind Security Groups
- 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
Assessment
This issue has not been assessed yet.