소스 검색

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 년 전
부모
커밋
00cdbe635e
2개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. +7
    -0
      README.rst
  2. +3
    -0
      linux/network/interface.sls

+ 7
- 0
README.rst 파일 보기

@@ -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 파일 보기

@@ -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…
취소
저장