Mysterious amazon/amazon-ecs-agent containers

I an running a Rancher instance in AWS that is configured to run Amazon Linux AMIs (ami-7172b611 – it’s not an Amazon ECS-optimized AMIs). I have the cluster hosts configured via an autoscaling group.

For some reason which I can’t determine yet, I see dozens of stopped amazon/amazon-ecs-agent containers. Does anyone know where these could be coming from? I assume there is configuration somehwere that I accidentally ticked. See below for a screenshot.

Additional Environment Information:
Rancher Server Version: 1.1.2
envrironment: cattle
docker version: 1.11

Thanks,

Brian

Without having tried your AMI, my first guess would be an old container accidentally baked into the AMI and gets imported by the rancher/agent… each one would have the exact same container id, which would then confuse us as they are supposed to be unique even across hosts.

Interesting thought… I jumped on each of my docker cluster AMI instances and ran docker ps -a and docker images -a, but I did not see the expected reference to the amazon/amazon-ecs-agent container.

Any suggestion how to efficiently/programatically remove all these mystery amazon/amazon-ecs-agent containers from the Rancher webui? There are probably ~100 and they are quite distracting.

CLI, it’s only in 1.2 but should work against 1.1.x… https://github.com/rancher/cli/releases

Or I’m on my phone, but something resembling this in browser console:

s.all('container').filterBy('name','ecs-agent').forEach(function(c) { c.remove(); })

Thanks for the pointers, @vincent!

I was able to use the rancher cli to remove the containers. Very slick!

BTW, where can one find the browser console. I did not know that existed and could not find it.

Thanks,

Brian

I just meant the browser’s built-in developer tools console…