path: root/ansible/roles/gsm-tester/tasks/main.yml
diff options
authorPau Espin Pedrol <>2019-04-02 21:06:40 +0200
committerPau Espin Pedrol <>2019-04-03 16:06:21 +0000
commit1304063a4a7a6faea85d69be907d3ef9fdf80b89 (patch)
tree759c024dd9fd52b853667e9d9d375a0354d7ebcf /ansible/roles/gsm-tester/tasks/main.yml
parent255724fb4a3633a6091cb22ef8d515387dab5ac5 (diff)
ansible: osmo-gsm-tester: Make modem net ifaces persistent
Currently ofono doesn't catch network interface renaming (takes the name at ofono startup time). If a modem crashes, its net iface is unregistered and registered again, and it can happen that the new name is not the same as before (for instance, wwan8->wwan0 if wwan0 is located on another netns). These udev rules allow creating persistent unique names to prevent modem crashes resulting on interface name changing. dhcpcd is known to race against udev when managing dev interfaces, bringing them up before udev sometimes, and then udev is unable to rename it. By denying dhcpcd from managing modem ifaces (ww* and r* according to kernel/our rules), we get rid of this issue. Related: OS#3881 Change-Id: Ic3ef75285aa84f9aa606562cd2f6166de186c1a6
Diffstat (limited to 'ansible/roles/gsm-tester/tasks/main.yml')
1 files changed, 12 insertions, 0 deletions
diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml
index 8a854bd..c9b7429 100644
--- a/ansible/roles/gsm-tester/tasks/main.yml
+++ b/ansible/roles/gsm-tester/tasks/main.yml
@@ -274,3 +274,15 @@
src: 64-limesuite.rules
dest: /etc/udev/rules.d/
notify: restart udev
+- name: use persistent naming for modem network interfaces
+ copy:
+ src: 70-net-setup-link-modems.rules
+ dest: /etc/udev/rules.d/
+ notify: restart udev
+- name: avoid dhcpcd managing modem interfaces and racing with udev rename
+ lineinfile:
+ path: /etc/dhcpcd.conf
+ regexp: '^denyinterfaces'
+ line: 'denyinterfaces ww* r*'