about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rw-r--r--debian/tests/network_test_base.py5
2 files changed, 12 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 17d13197..36f46153 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+network-manager (1.28.0-2ubuntu2) UNRELEASED; urgency=medium
+
+  * debian/tests/network_test_base.py:
+    Fix race when reading the MAC address of veth interfaces with new systemd
+
+ -- Lukas Märdian <lukas.maerdian@canonical.com>  Fri, 05 Feb 2021 11:35:02 +0100
+
 network-manager (1.28.0-2ubuntu1) hirsute; urgency=medium
 
   * Resynchronize on Debian, remaining changes:
diff --git a/debian/tests/network_test_base.py b/debian/tests/network_test_base.py
index 9ef8dec3..ffbd60df 100644
--- a/debian/tests/network_test_base.py
+++ b/debian/tests/network_test_base.py
@@ -99,6 +99,11 @@ class NetworkTestBase(unittest.TestCase):
         klass.dev_w_client = devs[1]
 
         # determine and store MAC addresses
+        # Creation of the veths introduces a race with newer versions of
+        # systemd, as it  will change the initial MAC address after the device
+        # was created and networkd took control. Give it some time, so we read
+        # the correct MAC address
+        time.sleep(0.1)
         with open('/sys/class/net/%s/address' % klass.dev_w_ap) as f:
             klass.mac_w_ap = f.read().strip().upper()
         with open('/sys/class/net/%s/address' % klass.dev_w_client) as f: