Przeglądaj źródła

Fixed several issues in the interface state

Fixed:
   * The udev-rules template is not tested
   * Wrong unicode character in the template leads to udev ignoring
     the rule completely
   * The template is unable to be rendered due to absent import
   * udev is not retrigerred with new rules

Change-Id: I134b5e49b883afcc5e34feaaa561d7ca70192796
Closes-Bug: PROD-16649
pull/133/head
Denis V. Meltsaykin 7 lat temu
rodzic
commit
4bd05226df
3 zmienionych plików z 16 dodań i 1 usunięć
  1. +1
    -1
      linux/files/60-net-txqueue.rules
  2. +14
    -0
      linux/network/interface.sls
  3. +1
    -0
      tests/pillar/network_extended.sls

+ 1
- 1
linux/files/60-net-txqueue.rules Wyświetl plik

@@ -1 +1 @@
KERNEL==tap[0-9a-z\-]*", RUN+="/sbin/ip link set %k txqueuelen {{ network.tap_custom_txqueuelen }}"
KERNEL=="tap[0-9a-z\-]*", RUN+="/sbin/ip link set %k txqueuelen {{ tap_custom_txqueuelen }}"

+ 14
- 0
linux/network/interface.sls Wyświetl plik

@@ -373,5 +373,19 @@ NetworkManager:
- source: salt://linux/files/60-net-txqueue.rules
- mode: 755
- template: jinja
- defaults:
tap_custom_txqueuelen: {{ network.tap_custom_txqueuelen }}

udev_reload_rules:
cmd.run:
- name: "/bin/udevadm control --reload-rules"
- onchanges:
- file: /etc/udev/rules.d/60-net-txqueue.rules

udev_retrigger:
cmd.run:
- name: "/bin/udevadm trigger --attr-match=subsystem=net"
- onchanges:
- udev_reload_rules

{%- endif %}

+ 1
- 0
tests/pillar/network_extended.sls Wyświetl plik

@@ -8,6 +8,7 @@ linux:
hostname: linux
fqdn: linux.ci.local
network_manager: false
tap_custom_txqueuelen: 10000
interface:
eth0:
enabled: true

Ładowanie…
Anuluj
Zapisz