Skip to content

Commit

Permalink
metrics: Remove sleep while shutting down multiple containers
Browse files Browse the repository at this point in the history
Now that this issue has been solved kata-containers/agent#263,
it is necessary to remove the workaround of sleeping while shutting down containers.

Fixes kata-containers#635

Signed-off-by: Gabriela Cervantes <[email protected]>
  • Loading branch information
GabyCT committed Aug 22, 2018
1 parent d65d0e1 commit 18dea44
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions metrics/density/docker_memory_usage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ get_docker_memory_usage(){

for ((i=1; i<= NUM_CONTAINERS; i++)); do
containers+=($(random_name))
${DOCKER_EXE} run --rm --runtime "$RUNTIME" --name ${containers[-1]} -tid $IMAGE $CMD
${DOCKER_EXE} run --runtime "$RUNTIME" --name ${containers[-1]} -tid $IMAGE $CMD
done

if [ "$AUTO_MODE" == "auto" ]; then
Expand Down Expand Up @@ -277,16 +277,7 @@ EOF
metrics_json_add_array_element "$json"
metrics_json_end_array "Results"

# FIXME - temporary workaround for https://github.com/kata-containers/runtime/issues/406
# When that is fixed, we can go back to a hard 'docker rm -f *' with no sleep.
# Or, in fact we can leave the '--rm' on the docker run, and just change this
# to a 'docker stop *'.
for c in ${containers[@]}; do
# Use a kill, as the containers are benign, and most of the time
# a stop request ends up being a kill anyway.
docker kill $c
sleep 3
done
docker rm -f ${containers[@]}
}

save_config(){
Expand Down

0 comments on commit 18dea44

Please sign in to comment.