Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

metrics: Remove sleep while shutting down multiple containers #636

Merged
merged 1 commit into from
Aug 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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