From caf06bc4f7e1e06913509c499531ff435f4b807a Mon Sep 17 00:00:00 2001 From: "wu.chunyang" Date: Thu, 6 Jul 2023 06:36:01 +0000 Subject: [PATCH] Prevent docker from manipulating iptables by default, Docker sets the policy for the FORWARD chain to DROP. this behavior will block our public network connectivity. for more details: https://docs.docker.com/network/packet-filtering-firewalls/#docker-on-a-router Change-Id: I66408c9e65f07c3c96cabb1f7f55a312f6dc9f36 --- devstack/files/debs/trove | 1 - devstack/files/rpms/trove | 3 +-- devstack/plugin.sh | 2 ++ integration/scripts/trovestack | 22 ++++++++++++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/devstack/files/debs/trove b/devstack/files/debs/trove index 43ab35595d..09dcee8104 100644 --- a/devstack/files/debs/trove +++ b/devstack/files/debs/trove @@ -1,2 +1 @@ libxslt1-dev # testonly -docker.io diff --git a/devstack/files/rpms/trove b/devstack/files/rpms/trove index 04ae78401e..460aec629f 100644 --- a/devstack/files/rpms/trove +++ b/devstack/files/rpms/trove @@ -1,2 +1 @@ -libxslt-devel # testonly -docker \ No newline at end of file +libxslt-devel # testonly \ No newline at end of file diff --git a/devstack/plugin.sh b/devstack/plugin.sh index ca1c3cdd43..51d2acaca2 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -506,6 +506,8 @@ function create_guest_image { } function create_registry_container { + # install docker on the host. + $DEST/trove/integration/scripts/trovestack install-docker # running a docker registry container echo "Running a docker registry container..." container=$(sudo docker ps -a --format "{{.Names}}" --filter name=registry) diff --git a/integration/scripts/trovestack b/integration/scripts/trovestack index 886581ec2d..4f96d0139a 100755 --- a/integration/scripts/trovestack +++ b/integration/scripts/trovestack @@ -727,6 +727,26 @@ function cmd_test_init() { pip3 install -U git+https://opendev.org/openstack/python-troveclient@master#egg=python-troveclient } +function cmd_install_docker() { + exclaim "install and configure docker: $@" + # It seems that rocky8 or newer use podman to emulate docker cli. + # the daemon.json file may make no sense here for rocky, but it may be useful for centos distro. + sudo mkdir /etc/docker + sudo tee /etc/docker/daemon.json >/dev/null <