voxpupuli / puppet-network

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

Change netmask to cidr for redhat/centos #209

Closed dn1s closed 2 years ago

dn1s commented 7 years ago

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Configuring_Static_Routes_in_ifcfg_files.html

As you can see redhat/centos no longer uses ipaddress/netmask for route creation therefore route files can be created but won't be applied. Fix is to remove netmask from redhat route ruby code and replace it with cidr instead.

i have a quick example how to archive this with no ruby code at all but as well without checking here: https://github.com/dn1s/puppet_network

olifre commented 6 years ago

Any news on this? It seems that as of now, there is no RedHat / CentOS based OS supported by this module anymore which has a working network_route resource, so maybe it should just fail hard instead of create a broken route.

It took me a while to figure this issue out, especially since the route-file parser parses 255.255.255.0 as CIDR 25 and creates a corresponding rule. Failure would certainly be better than misconfiguration.

dhollinger commented 6 years ago

@olifre I will try and take a look at this tonight.

dhollinger commented 6 years ago

@olifre The netmask parameter already supports CIDR format as of now. I will work on trying to enforce that in the future, once I have some bandwidth available to do so. This refactor to enforce CIDR format for netmask in EL7 will probably be done as part of the refactor to have puppet-network use the ip route command to add routes instead of just placing a file that will then require a notify to a service or exec to load.

oniGino commented 2 years ago

same problem as #281 Pretty sure this module is totally abandoned its been over a year with no dev work