Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

mroute RedHat with multiple nexthops and specific table has wrong order #340

Open
benibr opened this issue Mar 11, 2021 · 0 comments
Open

Comments

@benibr
Copy link

benibr commented Mar 11, 2021

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.

<%- if @table %> table <%= @table %><% end %>

This happens also if only one gateway is specified as an array, see

if gw.kind_of?(Array)

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant