From c27bb1f190a60d201d616bebd42c60dae6afa545 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Mon, 11 Mar 2019 13:11:10 +0100 Subject: [PATCH] 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 --- neutron_dynamic_routing/tests/contrib/gate_hook.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/neutron_dynamic_routing/tests/contrib/gate_hook.sh b/neutron_dynamic_routing/tests/contrib/gate_hook.sh index c06e83ff..d5991ad6 100644 --- a/neutron_dynamic_routing/tests/contrib/gate_hook.sh +++ b/neutron_dynamic_routing/tests/contrib/gate_hook.sh @@ -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 {