Selaa lähdekoodia

Feature: Global noifupdown check.

Issue description:

  PXE interfaces, which are used by salt should not be restarted
during salt calls, otherwise communication between salt master and
salt minion would be interrupted.
  Therefore it is possible to specify "noifupdown: True" in pillars
for this interface or group of interfaces, which are used for PXE
network.
  This pillar structure will remain until one removes it manualy.
  It is not possible to remove it during deploy and enforce network
state without touching the model.

  It is possible to override pillars from CLI like:
  # salt ctl01* state.apply linux.network.interface \
    pillar='{"linux":{"network":{"interface":{"ens3":{"noifupdown":True}}}}}'

  However it is not easy/possible to predict all interfaces for PXE
network.

Solution:
  Provide global noifupdown pillar value check.
  If it exists, noifupdown will take effect and not otherwise.
  So our deployment would have next steps:
  - Execute: linux.network.interface pillar='{"linux":{"network":{"noifupdown":True}}}'
  - Reboot node to enable kernel params like hugepages etc.
  - Execute: linux.network.interface with no params to ensure PXE.

Pipelines may pass this parameter to control noifupdown behavior.

Change-Id: I8863f972c7805e4bf4f9e104d6c0ddf055c39cb1
pull/173/head
Dzmitry Stremkouski 6 vuotta sitten
vanhempi
commit
00cdbe635e
2 muutettua tiedostoa jossa 10 lisäystä ja 0 poistoa
  1. +7
    -0
      README.rst
  2. +3
    -0
      linux/network/interface.sls

+ 7
- 0
README.rst Näytä tiedosto

@@ -1284,6 +1284,13 @@ Linux with network manager:
enabled: true
network_manager: true

Execute linux.network.interface state without ifupdown activity:

.. code-block:: bash

salt-call linux.network.interface pillar='{"linux":{"network":{"noifupdown":True}}}'


Linux with default static network interfaces, default gateway
interface and DNS servers:


+ 3
- 0
linux/network/interface.sls Näytä tiedosto

@@ -223,6 +223,9 @@ linux_interface_{{ interface_name }}:
- wireless-psk: {{ interface.wireless.key }}
{%- endif %}
{%- endif %}
{%- if pillar.linux.network.noifupdown is defined %}
- noifupdown: {{ pillar.linux.network.noifupdown }}
{%- endif %}
{%- for param in network.interface_params %}
{{ set_param(param, interface) }}
{%- endfor %}

Loading…
Peruuta
Tallenna