lyft / metadataproxy

A proxy for AWS's metadata service that gives out scoped IAM credentials from STS
Other
458 stars 69 forks source link

Prevent possibility of race condition during docker inspect #68

Closed jpb closed 6 years ago

jpb commented 6 years ago

When IP addresses are reused by docker, and this code is run concurrently, CONTAINER_MAPPING[ip] can be removed in one thread while client.inspect_container is running in another (as it does IO and can be paused by gevent). Previously, this could cause a get or delete of CONTAINER_MAPPING[ip] after client.inspect_container to fail.

ryan-lane commented 6 years ago

Awesome, thanks for the change! I'll be releasing this as 1.5.2.