5.0: Granular Routing policy. "match-all" tag behaves the same with or without selection

Bug #1760560 reported by Shashikiran H
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Committed
High
Manoj
Trunk
Fix Committed
High
Manoj

Bug Description

For 5.0, I have 2 similar routing policies with the only difference being "Match all" tag when I create the policy.

Currently, both of the routing policies seem to have the same affect and both seem to be doing a logical "and" of all terms provided.
Need the usecase for "Match all" tag or we need to remove this config option if its redundant or not supported.
With "Match all" selected:
<iq>
 <routing-policy-entries>
  <term>
   <term-match-condition>
    <protocol>bgpaas</protocol>
    <community></community>
    <community-list>64512:11111</community-list>
    <community-match-all>true</community-match-all>
   </term-match-condition>
   <term-action-list>
    <update>
     <as-path>
      <expand />
     </as-path>
     <community>
      <add>
       <community>64512:25614</community>
      </add>
      <remove />
      <set />
     </community>
     <local-pref>0</local-pref>
     <med>0</med>
    </update>
    <action></action>
   </term-action-list>
  </term>
 </routing-policy-entries>
</iq>

With tag removed:
<iq>
 <routing-policy-entries>
  <term>
   <term-match-condition>
    <protocol>bgpaas</protocol>
    <community></community>
    <community-list>64512:11111</community-list>
    <community-match-all>false</community-match-all>
   </term-match-condition>
   <term-action-list>
    <update>
     <as-path>
      <expand />
     </as-path>
     <community>
      <add>
       <community>64512:25614</community>
      </add>
      <remove />
      <set />
     </community>
     <local-pref>0</local-pref>
     <med>0</med>
    </update>
    <action></action>
   </term-action-list>
  </term>
 </routing-policy-entries>
</iq>

Shashikiran H (skiranh)
description: updated
Revision history for this message
Pramodh D'Souza (psdsouza) wrote :

looks like there was some confusion regarding the UI.
It turns out we can enter multiple communities (using ',' after each) and this box "match all" applies only to communities.
Additionally multiple protocols can be specified in the same way. I am assuming its a logical OR always for protocol, the backend code also does an OR.
The UI already explicitly allows multiple prefixes ( obviously a logical OR).

Please retry and let me know if there are still issues.

Revision history for this message
Nikhil Bansal (nikhilb-u) wrote :

community list and prefix list is coming as one entry instead of vector.
prefix = std::vector of length 1, capacity 1 = {{<AutogenProperty> = {_vptr.AutogenProperty = 0x14bff50 <vtable for autogen::PrefixMatchType+16>},
        prefix = "15.1.1.3/32,4.1.1.3/32", prefix_type = "exact"}

community_list = std::vector of length 1, capacity 1 = {"64512:11111,64512:33333"}

IT works when we provide the list from config editor. UI needs to check if they are parsing the input correctly

Shashikiran H (skiranh)
tags: added: ui
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/42114
Submitter: Manoj (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R5.0

Review in progress for https://review.opencontrail.org/42115
Submitter: Manoj (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/42115
Committed: http://github.com/Juniper/contrail-web-controller/commit/e7686ffe21ca88914d319efd1a0f3e1884f686dd
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit e7686ffe21ca88914d319efd1a0f3e1884f686dd
Author: Manoj Naik <email address hidden>
Date: Wed Apr 18 14:22:53 2018 -0700

Corrected the community to pass as array instead of string in routing policy

Fixed the way community was being passed.
Also removed unneccessary console log.

Change-Id: Ic113112befa364864b8602ea8b52454f02b7d8f9
Closes-Bug: #1760560

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

Reviewed: https://review.opencontrail.org/42114
Committed: http://github.com/Juniper/contrail-web-controller/commit/3e4208672d9d5f535166447942ad66f53d138ea3
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 3e4208672d9d5f535166447942ad66f53d138ea3
Author: Manoj Naik <email address hidden>
Date: Wed Apr 18 14:22:53 2018 -0700

Corrected the community to pass as array instead of string in routing policy

Fixed the way community was being passed.
Also removed unneccessary console log.

Change-Id: Ic113112befa364864b8602ea8b52454f02b7d8f9
Closes-Bug: #1760560

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.