[TOPOPROCES-50] Aggregating topologies does not work correctly when in one topology are termination points or links with same id as in other topology Created: 05/Jan/16  Updated: 24/Nov/17  Resolved: 02/Feb/16

Status: Resolved
Project: topoprocessing
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Samuel Kontris Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4877

 Description   

When trying to aggregate 2 topologies, where links or termination points have in both topologies same ID, then in result is one of these links or termination points (with same ID) overridden.

For example we have 2 topologies: network-topo:1 and network-topo:2.

Network-topo:1 has nodes 1, 2 and 3. Between nodes 1 and 2 is link with id l1, between 2 and 3 is l2. Node 1 has two termination points with IDs tp1 and tp2.
l1 l2
(1) ---> (2) ---> (3)
tp1
tp2

Network-topo:2 has nodes 4, 5 and 6. Between nodes 4 and 5 is link with id l3, between 5 and 6 is l1 (same ID as in first topology). Node 4 has two termination points with IDs tp3 and tp1 (same ID as in first topology).
l3 l1
(4) ---> (5) ---> (6)
tp3
tp1

Target field in request is IP. Nodes 1 and 4, 2 and 5, 3 and 6 have same IP (so they are going to be aggregated together).

As result we get topology with three (overlay) nodes: 3, 2, 1. Overlay node 3 has supporting nodes 1 and 4, overlay node 2 has 2 and 5, overlay node 1 has 3 and 6. That is OK.
Overlay node 3 should have 4 termination points (tp1, tp2, tp3 and tp1), but it has only three termination points, because tp1 is overridden.
Same problem is with links. There should be two links between overlay nodes 3 and 2 and two links between overlay nodes 2 and 1. But there is only one link between 2 and 1.

Result looks like this (in "||" are supporting nodes):

( 3 ) ---> ( 2 ) ---> ( 1 )

1,4 ---> 2,4   3,6

tp1
tp2
tp3

And it should look like this:

( 3 ) ---> ( 2 ) ---> ( 1 )

1,4 ---> 2,4 ---> 3,6

tp1
tp2
tp3
tp1

Here are underlay topologies, request and result:

— FIRST TOPOLOGY —
<topology
xmlns="urn:TBD:params:xml:ns:yang:network-topology"
xmlns:pcep="urn:opendaylight:params:xml:ns:yang:topology:pcep">
<topology-id>network-topo:1</topology-id>

<link>
<link-id>l1</link-id>
<source>
<source-node>n1</source-node>
</source>
<destination>
<dest-node>n2</dest-node>
</destination>
</link>

<link>
<link-id>l2</link-id>
<source>
<source-node>n2</source-node>
</source>
<destination>
<dest-node>n3</dest-node>
</destination>
</link>

<topology-types>
<pcep:topology-pcep></pcep:topology-pcep>
</topology-types>
<node>
<node-id>n1</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.1</pcep:ip-address>
</pcep:path-computation-client>
</node>
<node>
<node-id>n2</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.2</pcep:ip-address>
</pcep:path-computation-client>
</node>
<node>
<node-id>n3</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.3</pcep:ip-address>
</pcep:path-computation-client>
</node>
</topology>

— SECOND TOPOLOGY —
<topology
xmlns="urn:TBD:params:xml:ns:yang:network-topology"
xmlns:pcep="urn:opendaylight:params:xml:ns:yang:topology:pcep">
<topology-id>network-topo:2</topology-id>

<link>
<link-id>l3</link-id>
<source>
<source-node>n4</source-node>
</source>
<destination>
<dest-node>n5</dest-node>
</destination>
</link>

<link>
<link-id>l2</link-id>
<source>
<source-node>n5</source-node>
</source>
<destination>
<dest-node>n6</dest-node>
</destination>
</link>

<topology-types>
<pcep:topology-pcep></pcep:topology-pcep>
</topology-types>
<node>
<node-id>n4</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.1</pcep:ip-address>
</pcep:path-computation-client>
</node>
<node>
<node-id>n5</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.2</pcep:ip-address>
</pcep:path-computation-client>
</node>
<node>
<node-id>n6</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.3</pcep:ip-address>
</pcep:path-computation-client>
</node>
</topology>

— TOPOLOGY REQUEST —
<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
<n:topology-id>equal:1</n:topology-id>
<correlations>
<output-model>network-topology-model</output-model>
<correlation>
<correlation-id>1</correlation-id>
<type>aggregation-only</type>
<correlation-item>node</correlation-item>
<aggregation>
<aggregation-type>equality</aggregation-type>
<mapping>
<input-model>network-topology-model</input-model>
<underlay-topology>network-topo:1</underlay-topology>
<target-field>network-topology-pcep:path-computation-client/network-topology-pcep:ip-address</target-field>
<aggregate-inside>false</aggregate-inside>
</mapping>
<mapping>
<input-model>network-topology-model</input-model>
<underlay-topology>network-topo:2</underlay-topology>
<target-field>network-topology-pcep:path-computation-client/network-topology-pcep:ip-address</target-field>
<aggregate-inside>false</aggregate-inside>
</mapping>
</aggregation>
</correlation>
</correlations>
<link-computation xmlns="urn:opendaylight:topology:link:computation" xmlns:n="urn:opendaylight:topology:correlation">
<output-model>n:network-topology-model</output-model>
<node-info>
<node-topology>equal:1</node-topology>
<input-model>n:network-topology-model</input-model>
</node-info>
<link-info>
<link-topology>network-topo:1</link-topology>
<input-model>n:network-topology-model</input-model>
</link-info>
<link-info>
<link-topology>network-topo:2</link-topology>
<input-model>n:network-topology-model</input-model>
</link-info>
</link-computation>
</topology>

— RESULT —
<network-topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
<topology>
<topology-id>pcep-topology</topology-id>
<topology-types>
<topology-pcep xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep"></topology-pcep>
</topology-types>
</topology>
<topology>
<topology-id>equal:1</topology-id>
<node>
<node-id>node:3</node-id>
<supporting-node>
<node-ref>n1</node-ref>
<topology-ref>network-topo:1</topology-ref>
</supporting-node>
<supporting-node>
<node-ref>n4</node-ref>
<topology-ref>network-topo:2</topology-ref>
</supporting-node>
<termination-point>
<tp-id>tp:3</tp-id>
<ofport xmlns="urn:opendaylight:params:xml:ns:yang:ovsdb">3333</ofport>
</termination-point>
<termination-point>
<tp-id>tp:2</tp-id>
<ofport xmlns="urn:opendaylight:params:xml:ns:yang:ovsdb">2222</ofport>
</termination-point>
<termination-point>
<tp-id>tp:1</tp-id>
<ofport xmlns="urn:opendaylight:params:xml:ns:yang:ovsdb">4444</ofport>
</termination-point>
</node>
<node>
<node-id>node:2</node-id>
<supporting-node>
<node-ref>n2</node-ref>
<topology-ref>network-topo:1</topology-ref>
</supporting-node>
<supporting-node>
<node-ref>n5</node-ref>
<topology-ref>network-topo:2</topology-ref>
</supporting-node>
</node>
<node>
<node-id>node:1</node-id>
<supporting-node>
<node-ref>n3</node-ref>
<topology-ref>network-topo:1</topology-ref>
</supporting-node>
<supporting-node>
<node-ref>n6</node-ref>
<topology-ref>network-topo:2</topology-ref>
</supporting-node>
</node>
<link>
<link-id>link:1</link-id>
<source>
<source-node>node:2</source-node>
</source>
<supporting-link>
<link-ref>l2</link-ref>
</supporting-link>
<destination>
<dest-node>node:1</dest-node>
</destination>
</link>
<link>
<link-id>link:2</link-id>
<source>
<source-node>node:3</source-node>
</source>
<supporting-link>
<link-ref>l1</link-ref>
</supporting-link>
<destination>
<dest-node>node:2</dest-node>
</destination>
</link>
<link>
<link-id>link:3</link-id>
<source>
<source-node>node:3</source-node>
</source>
<supporting-link>
<link-ref>l3</link-ref>
</supporting-link>
<destination>
<dest-node>node:2</dest-node>
</destination>
</link>
</topology>
<topology>
<topology-id>ovsdb:1</topology-id>
</topology>
</network-topology>



 Comments   
Comment by Samuel Kontris [ 08/Jan/16 ]

Sorry, I somehow forgot to add termination points to topologies.
So node n1 in first topology (network-topo:1) should be:
<node>
<node-id>n1</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.1</pcep:ip-address>
</pcep:path-computation-client>
<termination-point>
<tp-id>tp:1</tp-id>
<ovsdb:ofport>1111</ovsdb:ofport>
</termination-point>
<termination-point>
<tp-id>tp:2</tp-id>
<ovsdb:ofport>2222</ovsdb:ofport>
</termination-point>
</node>

And node n4 in second topology (network-topo:2) should be:
<node>
<node-id>n4</node-id>
<pcep:path-computation-client>
<pcep:ip-address>192.168.1.1</pcep:ip-address>
</pcep:path-computation-client>
<termination-point>
<tp-id>tp:3</tp-id>
<ovsdb:ofport>3333</ovsdb:ofport>
</termination-point>
<termination-point>
<tp-id>tp:1</tp-id>
<ovsdb:ofport>4444</ovsdb:ofport>
</termination-point>
</node>

Comment by Andrej Záň [ 02/Feb/16 ]

https://git.opendaylight.org/gerrit/#/c/33654/

Generated at Wed Feb 07 20:40:34 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.