Database connectivity workaround for Magnum (#1917)
See: https://bugs.launchpad.net/magnum/+bug/2067345
diff --git a/images/magnum/Dockerfile b/images/magnum/Dockerfile
index cdb28bf..a930684 100644
--- a/images/magnum/Dockerfile
+++ b/images/magnum/Dockerfile
@@ -15,7 +15,10 @@
ARG MAGNUM_GIT_REF=c613ea4e419edc0086116da07e93cf19206746e1
ADD --keep-git-dir=true https://opendev.org/openstack/magnum.git#${MAGNUM_GIT_REF} /src/magnum
RUN git -C /src/magnum fetch --unshallow
+COPY patches/magnum /patches/magnum
+RUN git -C /src/magnum apply --verbose /patches/magnum/*
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
+sed -i s/^oslo.db===.*$/oslo.db==14.1.0/ /upper-constraints.txt
pip3 install \
--constraint /upper-constraints.txt \
/src/magnum \