Browse Source

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 years ago
parent
commit
00cdbe635e
2 changed files with 10 additions and 0 deletions
  1. +7
    -0
      README.rst
  2. +3
    -0
      linux/network/interface.sls

+ 7
- 0
README.rst View File

enabled: true enabled: true
network_manager: 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 Linux with default static network interfaces, default gateway
interface and DNS servers: interface and DNS servers:



+ 3
- 0
linux/network/interface.sls View File

- wireless-psk: {{ interface.wireless.key }} - wireless-psk: {{ interface.wireless.key }}
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
{%- if pillar.linux.network.noifupdown is defined %}
- noifupdown: {{ pillar.linux.network.noifupdown }}
{%- endif %}
{%- for param in network.interface_params %} {%- for param in network.interface_params %}
{{ set_param(param, interface) }} {{ set_param(param, interface) }}
{%- endfor %} {%- endfor %}

Loading…
Cancel
Save