From 0288729295df217788a7e2c42034df84188807f8 Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Sat, 6 Feb 2021 22:26:07 +0100 Subject: [PATCH] Disable auto configuration of new interfaces in NetworkManager NetworkManager in Centos images configures new network devices as soon as they appear in the default namespace, it means that we might have conflicts between the management interface's routes and address and the new VIP or member interfaces' routes and addresses during a small period of time before they are moved to the amphora-haproxy namespace. Now, the "no-auto-default=*" option is enabled in NetworkManager, it disables the configuration of new interfaces, while the management interface is still enabled/configured through cloud-init. Story 2008599 Task 41773 Change-Id: I6dd8e99b07ff557674871cb503dece96a9df3ada (cherry picked from commit a518cefda1332042d50e5ce2814f0af933c62457) (cherry picked from commit b9f622b335dd4f95f1a6004bb94159f891ca0980) (cherry picked from commit 7b2424685e9f29116d48cf2d0922f552fd4c2fdd) --- .../static/etc/NetworkManager/conf.d/no-auto-default.conf | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 elements/amphora-agent/static/etc/NetworkManager/conf.d/no-auto-default.conf diff --git a/elements/amphora-agent/static/etc/NetworkManager/conf.d/no-auto-default.conf b/elements/amphora-agent/static/etc/NetworkManager/conf.d/no-auto-default.conf new file mode 100644 index 0000000000..8fce22d00c --- /dev/null +++ b/elements/amphora-agent/static/etc/NetworkManager/conf.d/no-auto-default.conf @@ -0,0 +1,7 @@ +[main] +# Disable auto configuration for newly detected devices. +# This prevents having temporary addresses and routes in the default namespace +# between the detection of a new devices and its move to the amphora-haproxy +# namespace. +# The management interface configuration is triggered by cloud-init. +no-auto-default=*