From af653f33711ad915abc0eaed067b1f709d750b08 Mon Sep 17 00:00:00 2001
From: Clark Boylan <clark.boylan@gmail.com>
Date: Fri, 15 Dec 2023 09:33:28 -0800
Subject: [PATCH] Pin py docker when installing docker-compose

Py docker 7.0.0 introduced an incompatibility with old python
docker-compose. Pin it to the older version to ensure compatibility.

Notes on the change can be found here:
  https://stackoverflow.com/questions/77641240/getting-docker-compose-typeerror-kwargs-from-env-got-an-unexpected-keyword-ar

And you can see our jobs installing the wrong version here and then
failing later:
  https://zuul.opendev.org/t/openstack/build/6575c9d7fb56463fa6e97b2a12d6f389/log/job-output.txt#16116-16117

Change-Id: I7ecf7c43b762855881c137e218adcc51e3a32444
---
 playbooks/roles/install-docker/tasks/main.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/playbooks/roles/install-docker/tasks/main.yaml b/playbooks/roles/install-docker/tasks/main.yaml
index d59b469a4b..2159efa1f2 100644
--- a/playbooks/roles/install-docker/tasks/main.yaml
+++ b/playbooks/roles/install-docker/tasks/main.yaml
@@ -47,7 +47,10 @@
       # to migrate to the new docker plugin system or distro packages, but
       # until then this is a quick workaround that will get things moving
       # again.
+      # The explicit pin of docker is required as py docker 7.0 introduced
+      # incompatibilities with python docker-compose.
       - requests<2.30.0
+      - docker<7.0.0
       - docker-compose
     state: present
     executable: pip3