Fix installation of docker when docker-engine is not available

In such case docker.io should be installed. It happens e.g. on
Ubuntu 18.04.
In gate_hook script there was code to handle such case when
docker-engine isn't available but grep used there wasn't
very strict and it was passing because package
"golang-github-docker-engine-api-dev" matched results.

Now it will look only for "docker-engine" package and if it will
not be available, "docker.io" will be installed.

Change-Id: I805761ba4523e71a5aa06f6f6667e801184824df
Closes-Bug: #1818628
This commit is contained in:
Slawek Kaplonski 2019-03-11 13:11:10 +01:00
parent 69e9888b01
commit c27bb1f190
1 changed files with 1 additions and 6 deletions

View File

@ -75,12 +75,7 @@ function configure_docker_test_env {
sudo bash -c 'echo "tempest ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'
sudo apt-get update
if apt-cache search docker-engine | grep docker-engine; then
docker_pkg=docker-engine
else
docker_pkg=docker.io
fi
sudo apt-get install -y $docker_pkg
sudo apt-get install -y docker-engine || sudo apt-get install -y docker.io
}
function do_devstack_gate {