summaryrefslogtreecommitdiff
path: root/tests/unittests
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2019-07-17 20:23:42 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-07-17 20:23:42 +0000
commitb3a87fc0a2c88585cf77fa9d2756e96183c838f7 (patch)
tree864100255e53cb243db586af364adea541248055 /tests/unittests
parent060b1a1ca7b2385aa7f4ed42720063fa557e0671 (diff)
downloadvyos-cloud-init-b3a87fc0a2c88585cf77fa9d2756e96183c838f7.tar.gz
vyos-cloud-init-b3a87fc0a2c88585cf77fa9d2756e96183c838f7.zip
net: update net sequence, include wait on netdevs, opensuse netrules path
On systems with many interfaces, processing udev events may take a while. Cloud-init expects devices included in a provided network-configuration to be present when attempting to configure them. This patch adds a step in net configuration where it will check for devices provided in the configuration and if not found, issue udevadm settle commands to wait for them to appear. Additionally, the default path for udev persistent network rules 70-persistent-net.rules may also be written to systems which include the 75-net-generator.rules. During boot, cloud-init and the generator may race and interleave values causing issues. OpenSUSE will now use a newer file, 85-persistent-net-cloud-init.rules which will take precedence over values created by 75-net-generator and avoid collisions on the same file. LP: #1817368
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/test_net.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
index 18efce98..de4e7f4f 100644
--- a/tests/unittests/test_net.py
+++ b/tests/unittests/test_net.py
@@ -515,7 +515,7 @@ nameserver 172.19.0.12
[main]
dns = none
""".lstrip()),
- ('etc/udev/rules.d/70-persistent-net.rules',
+ ('etc/udev/rules.d/85-persistent-net-cloud-init.rules',
"".join(['SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ',
'ATTR{address}=="fa:16:3e:ed:9a:59", NAME="eth0"\n']))],
'out_sysconfig_rhel': [
@@ -619,7 +619,7 @@ nameserver 172.19.0.12
[main]
dns = none
""".lstrip()),
- ('etc/udev/rules.d/70-persistent-net.rules',
+ ('etc/udev/rules.d/85-persistent-net-cloud-init.rules',
"".join(['SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ',
'ATTR{address}=="fa:16:3e:ed:9a:59", NAME="eth0"\n']))],
'out_sysconfig_rhel': [
@@ -750,7 +750,7 @@ nameserver 172.19.0.12
[main]
dns = none
""".lstrip()),
- ('etc/udev/rules.d/70-persistent-net.rules',
+ ('etc/udev/rules.d/85-persistent-net-cloud-init.rules',
"".join(['SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ',
'ATTR{address}=="fa:16:3e:ed:9a:59", NAME="eth0"\n']))],
'out_sysconfig_rhel': [