salt icon indicating copy to clipboard operation
salt copied to clipboard

MTU is output twice when used in network.managed

Open Dravu opened this issue 11 years ago • 2 comments

It appears that two commits got made (https://github.com/saltstack/salt/commit/3d3b219047b236a951b988ddfa1056f627ad3958 and https://github.com/saltstack/salt/commit/029dbe8036df47e89afbd2636bfcd1aa64946136) that handle the output of the MTU for a network interface to its ifcfg file. This duplication is making it so that if you specify a MTU in network.managed, the MTU gets output to the ifcfg file twice.

An example of one of the template files with the duplicate MTU setting can be found at: https://github.com/saltstack/salt/blob/2015.8/salt/templates/rh_ip/rh7_eth.jinja

bond0:
  network.managed:
    - enabled: True
    - type: eth
    - proto: none
    - require:
      - network: eno7
      - network: eno8
    - mtu: 1500

would generate:

DEVICE="bond0"
USERCTL="no"
BOOTPROTO="none"
ONBOOT="yes"
MTU="1500"
MTU="1500"

Dravu avatar Nov 23 '15 22:11 Dravu

@Dravu, thanks for the report. This seems to be something that was fixed in parallel on two different branches and not caught in the subsequent merge forward.

jfindlay avatar Nov 25 '15 17:11 jfindlay

Looks like a fix is in here so I'm going to go ahead and close this.

cachedout avatar Nov 30 '15 23:11 cachedout