From 510f87a033ce5f76a7aa881f56b2bd9958c8582f Mon Sep 17 00:00:00 2001
From: Dmitry Tantsur <dtantsur@protonmail.com>
Date: Wed, 11 Sep 2024 17:37:24 +0200
Subject: [PATCH] Try limiting MTU to at least 1280

Temporary make metal3-integration non-voting until we merge the fix for
regression https://review.opendev.org/c/openstack/ironic/+/928885.

Change-Id: If8f9907df62019b3cf6d6df7d83d5ff421f6be65
---
 devstack/settings   | 11 +++++++----
 zuul.d/project.yaml |  6 ++++--
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/devstack/settings b/devstack/settings
index 2f77dadf20..b40d6e127e 100644
--- a/devstack/settings
+++ b/devstack/settings
@@ -22,9 +22,12 @@ if [ $local_mtu -gt $PUBLIC_BRIDGE_MTU ]; then
 fi
 
 # 50 bytes is overhead for vxlan (which is greater than GRE
-# allowing us to use either overlay option with this MTU.
+# allowing us to use either overlay option with this MTU).
 # However, if traffic is flowing over IPv6 tunnels, then
-# The overhead is essentially another 100 bytes. In order to
+# The overhead is essentially another 78 bytes. In order to
 # handle both cases, lets go ahead and drop the maximum by
-# 100 bytes.
-PUBLIC_BRIDGE_MTU=${OVERRIDE_PUBLIC_BRIDGE_MTU:-$((local_mtu - 100))}
+# 78 bytes, while not going below 1280 to make IPv6 work at all.
+PUBLIC_BRIDGE_MTU=${OVERRIDE_PUBLIC_BRIDGE_MTU:-$((local_mtu - 78))}
+if [ $PUBLIC_BRIDGE_MTU -lt 1280 ]; then
+    PUBLIC_BRIDGE_MTU=1280
+fi
diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml
index d8e281c22a..4264570d73 100644
--- a/zuul.d/project.yaml
+++ b/zuul.d/project.yaml
@@ -49,7 +49,9 @@
         # NOTE(TheJulia): At present, metal3 doesn't leverage
         # stable branches, and as far as we are aware these jobs
         # can be removed once this branch is made stable.
-        - metal3-integration
+        # FIXME(dtantsur): Re-enable once we merge the fix
+        # https://review.opendev.org/c/openstack/ironic/+/928885
+        # - metal3-integration
         # Non-voting jobs
         - ironic-inspector-tempest:
             voting: false
@@ -103,7 +105,7 @@
         # NOTE(TheJulia): At present, metal3 doesn't leverage
         # stable branches, and as far as we are aware these jobs
         # can be removed once this branch is made stable.
-        - metal3-integration
+        # - metal3-integration
     experimental:
       jobs:
         # TODO(dtantsur): these jobs are useful but currently hopelessly