diagnostic-collection icon indicating copy to clipboard operation
diagnostic-collection copied to clipboard

Cache results from docker ps command

Open AndrewHogg opened this issue 3 years ago • 1 comments

When there are a large number of nodes, the loop for translate_ipaddresses_to_docker_container_ids runs 2 for loops inside each other: for host in ${cassandraNodes} ; do for container_id in $(docker ps -q) ; do

This results in the docker ps command being run number_of_nodes * number_of_containers_on_host, which is slow / inefficient.

AndrewHogg avatar Jan 27 '22 15:01 AndrewHogg

Cache docker inspect too…

michaelsembwever avatar Jan 27 '22 15:01 michaelsembwever