mroute RedHat with multiple nexthops and specific table has wrong order
Expected Behavior
It should be possible to add mroutes with multiple gateways to a specific table
Actual Behavior
When setting a mroute with muliple nexthops (eg ECMP) and an explicit defined table, the resulting command in the route file has the wrong order and is therefore not applied on network (re-)start
The table parameter is added after the vias which works with a single gateway but not with multiple nexthops.
https://github.com/example42/puppet-network/blob/2f02cf9a0d141b4dae64735b0bac08a303d8126e/templates/mroute-RedHat.erb#L12
This happens also if only one gateway is specified as an array, see https://github.com/example42/puppet-network/blob/2f02cf9a0d141b4dae64735b0bac08a303d8126e/templates/mroute-RedHat.erb#L7
Steps to Reproduce the Problem
network::mroute { 'eth0':
routes => {
'1.1.1.1/32' => [ '192.168.1.1', '192.168.2.1', ],
}
table => 'fallback'
}
Suggested fix
Move the table to the beginning of the line, before all gateways. Tested manually, works.
Specifications
tested with 3.5.3 but shouln'd have changed since