Skip to content
This repository was archived by the owner on Nov 11, 2021. It is now read-only.
This repository was 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

@benibr

Description

@benibr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions