voxpupuli / puppet-network

Types and providers to manage network interfaces
https://forge.puppet.com/puppet/network
Apache License 2.0
67 stars 107 forks source link

Question: VLAN in RedHat #286

Open darktim opened 1 year ago

darktim commented 1 year ago

I am trying to set up the network on a kernel based hypervisor.

puppetserver version: 6.14.1 puppet agent version: 6.26.0 OS: Red Hat Enterprise Linux Server release 7.9 (Maipo)

create_resources('network_config', hiera('network_config'))

with the corresponding hiera data:

network_config:
  msz:
    name: eno1
    ipaddress: 10.10.20.220
    netmask: 255.255.254.0
    method: static
  mb_msz:
    name: eno1.130
    method: none
    mode: vlan
    options:
      BRIDGE: br1.130
      VLAN: 'yes'

This results in a change in every puppet agent run:

Notice: /Stage[main]/Os::Redhat/Network_config[mb_msz]/options: options changed {
  'BRIDGE' => 'br1.130'
} to BRIDGE => br1.130, VLAN => yes (corrective)

I guess the reason is in lib/puppet/provider/network_config/redhat.rb line 165:

    pairs.delete('VLAN')

When I remove this line, it seems to work (no changes any more). Do I do sth wrong, or is this a problem with the puppet module and RH7?