[GENIUS-276] updateDpnTepInterfaceInfoToConfig doesn't update dpnTepsState correctly Created: 09/May/19  Updated: 08/Jan/20  Resolved: 08/Jan/20

Status: Resolved
Project: genius
Component/s: ITM
Affects Version/s: None
Fix Version/s: Neon

Type: Bug Priority: High
Reporter: Yi Yang Assignee: nidhi adhvaryu
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

genius master


Priority: Highest

 Description   

Although updateDpnTepInterfaceInfoToConfig called ITMBatchingUtils.update to change dpnTepsState per srcDpnId, but ResourceBatchingManager will overwrite the old one with new one, new one doesn't contain the old one, this can be read out from source code.

case ActionableResource.UPDATE:
Object updated = actResource.getInstance();
Object original = actResource.getOldInstance();
resHandler.update(tx, dsType, actResource.getInstanceIdentifier(), original,
updated,transactionObjects);
break;

Because we don't setOldInstance when call  ITMBatchingUtils.update. The actual test result has confirmed this.

vagrant@odl:~/karaf-0.9.0-SNAPSHOT$ grep ", remoteDpn TunnelName " data/log/karaf.log
2019-05-09T01:52:12,568 | INFO | jobcoordinator-main-task-2 | ItmInternalTunnelAddWorker | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | ofTunnelPortName of0383160132b, remoteDpn TunnelName tuna37285b5abf, dstDpnId 176824911782496
2019-05-09T01:52:12,607 | INFO | jobcoordinator-main-task-2 | ItmInternalTunnelAddWorker | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | ofTunnelPortName of630c73993ed, remoteDpn TunnelName tund705cf3c875, dstDpnId 259598474342123
2019-05-09T01:52:34,579 | INFO | jobcoordinator-main-task-2 | ItmInternalTunnelAddWorker | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | ofTunnelPortName ofc577a5608d6, remoteDpn TunnelName tun050445aeaad, dstDpnId 176824911782496
2019-05-09T01:52:34,586 | INFO | jobcoordinator-main-task-2 | ItmInternalTunnelAddWorker | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | ofTunnelPortName of630c73993ed, remoteDpn TunnelName tunc0442208f5e, dstDpnId 44194128541826
2019-05-09T01:52:34,589 | INFO | jobcoordinator-main-task-2 | ItmInternalTunnelAddWorker | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | ofTunnelPortName ofc577a5608d6, remoteDpn TunnelName tunda48ca3f373, dstDpnId 259598474342123
2019-05-09T01:52:34,590 | INFO | jobcoordinator-main-task-2 | ItmInternalTunnelAddWorker | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | ofTunnelPortName of0383160132b, remoteDpn TunnelName tune929b964c6e, dstDpnId 44194128541826
vagrant@odl:~/karaf-0.9.0-SNAPSHOT$ grep "addTunnelEndPointInfoToCache" data/log/karaf.log
2019-05-09T01:52:13,165 | INFO | opendaylight-cluster-data-notification-dispatcher-46 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | addTunnelEndPointInfoToCache: call added, tunnel tund705cf3c875, src dpn 176824911782496, dst dpn 259598474342123
2019-05-09T01:52:35,101 | INFO | opendaylight-cluster-data-notification-dispatcher-69 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | addTunnelEndPointInfoToCache: call added, tunnel tune929b964c6e, src dpn 259598474342123, dst dpn 44194128541826
vagrant@odl:~/karaf-0.9.0-SNAPSHOT$



 Comments   
Comment by Yi Yang [ 10/May/19 ]

vagrant@odl:~/karaf-0.9.0-SNAPSHOT$ grep -r "addTunnelEndPointInfoToCache" data/log/karaf.log
2019-05-10T00:34:55,708 | INFO | opendaylight-cluster-data-notification-dispatcher-50 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | addTunnelEndPointInfoToCache: call added, tunnel tund962e18e076, src dpn 22354318084393, dst dpn 207790482554426
2019-05-10T00:34:56,240 | INFO | opendaylight-cluster-data-notification-dispatcher-66 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | addTunnelEndPointInfoToCache: call added, tunnel tuna3f42a25df9, src dpn 207790482554426, dst dpn 22354318084393
2019-05-10T00:35:10,583 | INFO | opendaylight-cluster-data-notification-dispatcher-64 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT |

My test has testified this, https://git.opendaylight.org/gerrit/#/c/81966/ did fix it.

addTunnelEndPointInfoToCache: call added, tunnel tuna6d316383be, src dpn 251290173143295, dst dpn 207790482554426
2019-05-10T00:35:11,089 | INFO | opendaylight-cluster-data-notification-dispatcher-65 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | addTunnelEndPointInfoToCache: call added, tunnel tund962e18e076, src dpn 22354318084393, dst dpn 207790482554426
2019-05-10T00:35:11,089 | INFO | opendaylight-cluster-data-notification-dispatcher-65 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | addTunnelEndPointInfoToCache: call added, tunnel tun67b07c60a06, src dpn 22354318084393, dst dpn 251290173143295
2019-05-10T00:35:11,090 | INFO | opendaylight-cluster-data-notification-dispatcher-65 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | addTunnelEndPointInfoToCache: call added, tunnel tuna70171c0a08, src dpn 251290173143295, dst dpn 22354318084393
2019-05-10T00:35:11,090 | INFO | opendaylight-cluster-data-notification-dispatcher-65 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | addTunnelEndPointInfoToCache: call added, tunnel tuna6d316383be, src dpn 251290173143295, dst dpn 207790482554426
2019-05-10T00:35:11,091 | INFO | opendaylight-cluster-data-notification-dispatcher-65 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | addTunnelEndPointInfoToCache: call added, tunnel tuna3f42a25df9, src dpn 207790482554426, dst dpn 22354318084393
2019-05-10T00:35:11,091 | INFO | opendaylight-cluster-data-notification-dispatcher-65 | DpnTepStateCache | 267 - org.opendaylight.genius.itm-impl - 0.7.0.SNAPSHOT | addTunnelEndPointInfoToCache: call added, tunnel tun70e53cde7bd, src dpn 207790482554426, dst dpn 251290173143295
vagrant@odl:~/karaf-0.9.0-SNAPSHOT$

Comment by nidhi adhvaryu [ 08/Jan/20 ]

this issue occurs, when computes were scaled-in and scaled-out with the same vtep ip, ITM full mesh was not created.During scale-in, ITM caches were not completely cleaned up resulting in stale DPN in ITM. This prevented the full mesh creation.

So this, https://git.opendaylight.org/gerrit/#/c/genius/+/81888/ patch has addressed the issue.

the patch is merged already.

Comment by nidhi adhvaryu [ 08/Jan/20 ]

fix is already merged on https://git.opendaylight.org/gerrit/#/c/genius/+/81888/

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