Device Manager: Firewall filter generated for Piublic VRF doesn't have have the from clause in term t1 to redirect the traffic

Bug #1446020 reported by Suresh Balineni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
Suresh Balineni
Trunk
Fix Committed
High
Suresh Balineni

Bug Description

When public VRF is configured with floating ip pool, we need to generate firewall filters with destination addresses.
Config as follows:

root@a5-mx80-1# show routing-instances nsheth-public
instance-type vrf;
vrf-target target:64512:7;
vrf-table-label;
routing-options {
    static {
        /* subnet for the public vn */
        route 192.168.7.0/24 discard;
        /* default route points to inet.0 */
        route 0.0.0.0/0 next-table inet.0;
    }
}

root@a5-mx80-1# show forwarding-options
family inet {
    filter {
        input redirect-to-public-vrf;
    }
}

root@a5-mx80-1# show firewall
filter redirect-to-public-vrf {
    term t1 {
        from {
            destination-address {
                192.168.7.0/24;
            }
        }
        then {
            routing-instance nsheth-public;
        }
    }
    term t2 {
        then accept;
    }
}

root@a5-mx80-1# show routing-instances nsheth-public | display set
set routing-instances nsheth-public instance-type vrf
set routing-instances nsheth-public vrf-target target:64512:7
set routing-instances nsheth-public vrf-table-label
set routing-instances nsheth-public routing-options static route 192.168.7.0/24 discard
set routing-instances nsheth-public routing-options static route 0.0.0.0/0 next-table inet.0

root@a5-mx80-1# show forwarding-options | display set
set forwarding-options family inet filter input redirect-to-public-vrf

[edit]
root@a5-mx80-1# show firewall | display set
set firewall filter redirect-to-public-vrf term t1 from destination-address 192.168.7.0/24
set firewall filter redirect-to-public-vrf term t1 then routing-instance nsheth-public
set firewall filter redirect-to-public-vrf term t2 then accept

[edit]
root@a5-mx80-1#

We ran into a problem with the configuration generated for public VRF.
The firewall filter we generate to redirect the traffic doesn't have have the
from clause in term t1 (refer to the manually configured example below).

The from clause should have a list of destination addresses where each
entry in the list is the subnet for a floating-ip pool. We had configured a
public network subnet and with the external flag set. So there was a FIP
pool in our configuration.

Could you please investigate further and fix it? Please verify that the fix
works in case there's 1 pool or > 1 pool.

If for whatever reason there's no FIP pools, then it would be best to make
the code defensive and not generate term t1 at all. Generating it with an
empty from clause causes loss of connectivity to the MX - that's very bad.

-Nischal

Changed in juniperopenstack:
importance: Undecided → High
Nischal Sheth (nsheth)
tags: added: config device-manager
Revision history for this message
Suresh Balineni (sbalineni) wrote :

Implementation was already there for generating right firewall filters, but there is bug in the code.
If more than one routing instance is added to MX config, second one replacing first ones config in certain conditions.

Fixed, and Sent for code review.

Revision history for this message
Suresh Balineni (sbalineni) wrote :
Revision history for this message
Suresh Balineni (sbalineni) wrote :
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.20

Review in progress for https://review.opencontrail.org/9341
Submitter: Suresh Balineni (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : master

Review in progress for https://review.opencontrail.org/9302
Submitter: Suresh Balineni (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/9341
Committed: http://github.org/Juniper/contrail-controller/commit/fab943e8a59160c212852ef46aa14c87804b86bf
Submitter: Zuul
Branch: R2.20

commit fab943e8a59160c212852ef46aa14c87804b86bf
Author: sbalineni <email address hidden>
Date: Tue Apr 21 11:07:25 2015 -0700

Porting fix from mainline to 2.2: when more than one routing instance is added to mx config, config statements were getting re-initialized, fixed
Closes-Bug: #1446020
Change-Id: I2adff2986a89ff69e5e4eb7874d3ff90c0ca77e1

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/9302
Committed: http://github.org/Juniper/contrail-controller/commit/5efcdab9de98f080c9ef3046d4803ff5191547a6
Submitter: Zuul
Branch: master

commit 5efcdab9de98f080c9ef3046d4803ff5191547a6
Author: sbalineni <email address hidden>
Date: Mon Apr 20 13:09:07 2015 -0700

when more than one routing instance is added to mx config, config statements were getting re-initialized, fixed
Closes-Bug: #1446020
Change-Id: I59525aac1dbc99f510c197f868f35cf3b4698776

Nischal Sheth (nsheth)
information type: Proprietary → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.