<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:22:30 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[NETVIRT-799] NeutronPortChangeListener: handleNeutronPortUpdated doesn&apos;t catch, that Subnet ID for neutron port was changed (port was updated)</title>
                <link>https://jira.opendaylight.org/browse/NETVIRT-799</link>
                <project id="10144" key="NETVIRT">netvirt</project>
                    <description>&lt;p&gt;Issue was introduced by this gerrit change:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/45969&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/45969&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=6770&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=6770&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;at NeutronPortChangeListener.java, handleNeutronPortUpdated method:&lt;/p&gt;

&lt;p&gt;445	+        final DataStoreJobCoordinator portDataStoreCoordinator = DataStoreJobCoordinator.getInstance();&lt;br/&gt;
446	+        portDataStoreCoordinator.enqueueJob(&quot;PORT- &quot; + portupdate.getUuid().getValue(), new&lt;br/&gt;
447	+                Callable&amp;lt;List&amp;lt;ListenableFuture&amp;lt;Void&amp;gt;&amp;gt;&amp;gt;() {&lt;br/&gt;
448	+                    @Override&lt;br/&gt;
449	+                    public List&amp;lt;ListenableFuture&amp;lt;Void&amp;gt;&amp;gt; call() throws Exception {&lt;br/&gt;
450	+                        WriteTransaction wrtConfigTxn = dataBroker.newWriteOnlyTransaction();&lt;br/&gt;
451	+                        List&amp;lt;ListenableFuture&amp;lt;Void&amp;gt;&amp;gt; futures = new ArrayList&amp;lt;&amp;gt;();&lt;br/&gt;
452	+&lt;br/&gt;
453	+                        Uuid vpnIdNew = null;&lt;br/&gt;
454	+                        final Uuid subnetIdOr = portupdate.getFixedIps().get(0).getSubnetId();&lt;br/&gt;
455	+                        final Uuid subnetIdUp = portupdate.getFixedIps().get(0).getSubnetId();&lt;br/&gt;
456	+                        // check if subnet UUID has changed upon change in fixedIP &lt;br/&gt;
457	+                        final Boolean subnetUpdated = subnetIdUp.equals(subnetIdOr) ? false : true;&lt;br/&gt;
458	+&lt;br/&gt;
459	+                        if (subnetUpdated) {&lt;br/&gt;
460	+                            Subnetmap subnetMapOld = nvpnManager.removePortsFromSubnetmapNode(subnetIdOr, portoriginal&lt;br/&gt;
461	+                                    .getUuid(), null);&lt;br/&gt;
462	+                            Uuid vpnIdOld = (subnetMapOld != null) ? subnetMapOld.getVpnId() : null;&lt;br/&gt;
463	+                            if (vpnIdOld != null) {&lt;br/&gt;
464	+                                // send port removed from subnet notification &lt;br/&gt;
465	+                                // only sent when the port was part of a VPN &lt;br/&gt;
466	+                                String elanInstanceName = portoriginal.getNetworkId().getValue();&lt;br/&gt;
467	+                                InstanceIdentifier&amp;lt;ElanInstance&amp;gt; elanIdentifierId = InstanceIdentifier.builder(ElanInstances&lt;br/&gt;
468	+                                        .class).child(ElanInstance.class, new ElanInstanceKey(elanInstanceName)).build();&lt;br/&gt;
469	+                                Optional&amp;lt;ElanInstance&amp;gt; elanInstance = NeutronvpnUtils.read(dataBroker,&lt;br/&gt;
470	+                                        LogicalDatastoreType.CONFIGURATION, elanIdentifierId);&lt;br/&gt;
471	+                                long elanTag = elanInstance.get().getElanTag();&lt;br/&gt;
472	+                                try &lt;/p&gt;
{
473	+                                    checkAndPublishPortRemoveNotification(subnetMapOld.getSubnetIp(), subnetIdOr,
474	+                                            portoriginal.getUuid(), elanTag);
475	+                                    LOG.debug(&quot;Port removed from subnet notification sent&quot;);
476	+                                }
&lt;p&gt; catch (Exception e) &lt;/p&gt;
{
477	+                                    LOG.error(&quot;Port removed from subnet notification failed&quot;, e);
478	+                                }
&lt;p&gt;479	+                            }&lt;br/&gt;
480	+                            Subnetmap subnetMapNew = nvpnManager.updateSubnetmapNodeWithPorts(subnetIdUp, portupdate.getUuid(),&lt;br/&gt;
481	+                                    null);&lt;br/&gt;
482	+                            vpnIdNew = (subnetMapNew != null) ? subnetMapNew.getVpnId() : null;&lt;br/&gt;
483	+                            if (vpnIdNew != null) {&lt;br/&gt;
484	+                                // send port added to subnet notification &lt;br/&gt;
485	+                                // only sent when the port is part of a VPN &lt;br/&gt;
486	+                                String elanInstanceName = portupdate.getNetworkId().getValue();&lt;br/&gt;
487	+                                InstanceIdentifier&amp;lt;ElanInstance&amp;gt; elanIdentifierId = InstanceIdentifier.builder(ElanInstances&lt;br/&gt;
488	+                                        .class).child(ElanInstance.class, new ElanInstanceKey(elanInstanceName)).build();&lt;br/&gt;
489	+                                Optional&amp;lt;ElanInstance&amp;gt; elanInstance = NeutronvpnUtils.read(dataBroker,&lt;br/&gt;
490	+                                        LogicalDatastoreType&lt;br/&gt;
491	+                                        .CONFIGURATION, elanIdentifierId);&lt;br/&gt;
492	+                                long elanTag = elanInstance.get().getElanTag();&lt;br/&gt;
493	+                                try &lt;/p&gt;
{
494	+                                    checkAndPublishPortAddNotification(subnetMapNew.getSubnetIp(), subnetIdUp, portupdate
495	+                                            .getUuid(), elanTag);
496	+                                    LOG.debug(&quot;Port added to subnet notification sent&quot;);
497	+                                }
&lt;p&gt; catch (Exception e) &lt;/p&gt;
{
498	+                                    LOG.error(&quot;Port added to subnet notification failed&quot;, e);
499	+                                }
&lt;p&gt;500	+                            }&lt;br/&gt;
501	+                        }&lt;br/&gt;
...&lt;/p&gt;

&lt;p&gt;At lines 454, 455 we set values for subnetIdOr and subnetIdUp, but these variables will always have the same value, because we get SubnetId for both two variables from updated neutron port (portupdate) =&amp;gt; comparation at line 457 will always give False =&amp;gt; condition in line 459 will be never executed. &lt;/p&gt;

&lt;p&gt;So this makes handleNeutronPortUpdated unable to catch, that Subnet ID for neutron port was changed (port was updated), hence, to threat a case, when we add a second subnet to a neutron network.&lt;/p&gt;

&lt;p&gt;See appropriate log with added debug traces in attachement&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="20720">NETVIRT-799</key>
            <summary>NeutronPortChangeListener: handleNeutronPortUpdated doesn&apos;t catch, that Subnet ID for neutron port was changed (port was updated)</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="valentina.krasnobaeva@6wind.com">Valentina Krasnobaeva</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Jul 2017 10:39:44 +0000</created>
                <updated>Mon, 30 Oct 2017 15:36:04 +0000</updated>
                            <resolved>Thu, 24 Aug 2017 09:00:20 +0000</resolved>
                                    <version>Carbon</version>
                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="38179" author="valentina.krasnobaeva@6wind.com" created="Fri, 21 Jul 2017 10:40:31 +0000"  >&lt;p&gt;(In reply to Valentina Krasnobaeva from comment #0)&lt;br/&gt;
&amp;gt; Issue was introduced by this gerrit change:&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/45969&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/45969&lt;/a&gt;&lt;br/&gt;
&amp;gt; &lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=6770&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=6770&lt;/a&gt;&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; at NeutronPortChangeListener.java, handleNeutronPortUpdated method:&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; 445	+        final DataStoreJobCoordinator portDataStoreCoordinator =&lt;br/&gt;
&amp;gt; DataStoreJobCoordinator.getInstance();&lt;br/&gt;
&amp;gt; 446	+        portDataStoreCoordinator.enqueueJob(&quot;PORT- &quot; +&lt;br/&gt;
&amp;gt; portupdate.getUuid().getValue(), new&lt;br/&gt;
&amp;gt; 447	+                Callable&amp;lt;List&amp;lt;ListenableFuture&amp;lt;Void&amp;gt;&amp;gt;&amp;gt;() {&lt;br/&gt;
&amp;gt; 448	+                    @Override&lt;br/&gt;
&amp;gt; 449	+                    public List&amp;lt;ListenableFuture&amp;lt;Void&amp;gt;&amp;gt; call() throws&lt;br/&gt;
&amp;gt; Exception {&lt;br/&gt;
&amp;gt; 450	+                        WriteTransaction wrtConfigTxn =&lt;br/&gt;
&amp;gt; dataBroker.newWriteOnlyTransaction();&lt;br/&gt;
&amp;gt; 451	+                        List&amp;lt;ListenableFuture&amp;lt;Void&amp;gt;&amp;gt; futures = new&lt;br/&gt;
&amp;gt; ArrayList&amp;lt;&amp;gt;();&lt;br/&gt;
&amp;gt; 452	+&lt;br/&gt;
&amp;gt; 453	+                        Uuid vpnIdNew = null;&lt;br/&gt;
&amp;gt; 454	+                        final Uuid subnetIdOr =&lt;br/&gt;
&amp;gt; portupdate.getFixedIps().get(0).getSubnetId();&lt;br/&gt;
&amp;gt; 455	+                        final Uuid subnetIdUp =&lt;br/&gt;
&amp;gt; portupdate.getFixedIps().get(0).getSubnetId();&lt;br/&gt;
&amp;gt; 456	+                        // check if subnet UUID has changed upon change&lt;br/&gt;
&amp;gt; in fixedIP &lt;br/&gt;
&amp;gt; 457	+                        final Boolean subnetUpdated =&lt;br/&gt;
&amp;gt; subnetIdUp.equals(subnetIdOr) ? false : true;&lt;br/&gt;
&amp;gt; 458	+&lt;br/&gt;
&amp;gt; 459	+                        if (subnetUpdated) {&lt;br/&gt;
&amp;gt; 460	+                            Subnetmap subnetMapOld =&lt;br/&gt;
&amp;gt; nvpnManager.removePortsFromSubnetmapNode(subnetIdOr, portoriginal&lt;br/&gt;
&amp;gt; 461	+                                    .getUuid(), null);&lt;br/&gt;
&amp;gt; 462	+                            Uuid vpnIdOld = (subnetMapOld != null) ?&lt;br/&gt;
&amp;gt; subnetMapOld.getVpnId() : null;&lt;br/&gt;
&amp;gt; 463	+                            if (vpnIdOld != null) {&lt;br/&gt;
&amp;gt; 464	+                                // send port removed from subnet&lt;br/&gt;
&amp;gt; notification &lt;br/&gt;
&amp;gt; 465	+                                // only sent when the port was part of&lt;br/&gt;
&amp;gt; a VPN &lt;br/&gt;
&amp;gt; 466	+                                String elanInstanceName =&lt;br/&gt;
&amp;gt; portoriginal.getNetworkId().getValue();&lt;br/&gt;
&amp;gt; 467	+                                InstanceIdentifier&amp;lt;ElanInstance&amp;gt;&lt;br/&gt;
&amp;gt; elanIdentifierId = InstanceIdentifier.builder(ElanInstances&lt;br/&gt;
&amp;gt; 468	+                                       &lt;br/&gt;
&amp;gt; .class).child(ElanInstance.class, new&lt;br/&gt;
&amp;gt; ElanInstanceKey(elanInstanceName)).build();&lt;br/&gt;
&amp;gt; 469	+                                Optional&amp;lt;ElanInstance&amp;gt; elanInstance =&lt;br/&gt;
&amp;gt; NeutronvpnUtils.read(dataBroker,&lt;br/&gt;
&amp;gt; 470	+                                       &lt;br/&gt;
&amp;gt; LogicalDatastoreType.CONFIGURATION, elanIdentifierId);&lt;br/&gt;
&amp;gt; 471	+                                long elanTag =&lt;br/&gt;
&amp;gt; elanInstance.get().getElanTag();&lt;br/&gt;
&amp;gt; 472	+                                try &lt;/p&gt;
{
&amp;gt; 473	+                                   
&amp;gt; checkAndPublishPortRemoveNotification(subnetMapOld.getSubnetIp(), subnetIdOr,
&amp;gt; 474	+                                            portoriginal.getUuid(),
&amp;gt; elanTag);
&amp;gt; 475	+                                    LOG.debug(&quot;Port removed from subnet
&amp;gt; notification sent&quot;);
&amp;gt; 476	+                                }
&lt;p&gt; catch (Exception e) &lt;/p&gt;
{
&amp;gt; 477	+                                    LOG.error(&quot;Port removed from subnet
&amp;gt; notification failed&quot;, e);
&amp;gt; 478	+                                }
&lt;p&gt;&amp;gt; 479	+                            }&lt;br/&gt;
&amp;gt; 480	+                            Subnetmap subnetMapNew =&lt;br/&gt;
&amp;gt; nvpnManager.updateSubnetmapNodeWithPorts(subnetIdUp, portupdate.getUuid(),&lt;br/&gt;
&amp;gt; 481	+                                    null);&lt;br/&gt;
&amp;gt; 482	+                            vpnIdNew = (subnetMapNew != null) ?&lt;br/&gt;
&amp;gt; subnetMapNew.getVpnId() : null;&lt;br/&gt;
&amp;gt; 483	+                            if (vpnIdNew != null) {&lt;br/&gt;
&amp;gt; 484	+                                // send port added to subnet&lt;br/&gt;
&amp;gt; notification &lt;br/&gt;
&amp;gt; 485	+                                // only sent when the port is part of a&lt;br/&gt;
&amp;gt; VPN &lt;br/&gt;
&amp;gt; 486	+                                String elanInstanceName =&lt;br/&gt;
&amp;gt; portupdate.getNetworkId().getValue();&lt;br/&gt;
&amp;gt; 487	+                                InstanceIdentifier&amp;lt;ElanInstance&amp;gt;&lt;br/&gt;
&amp;gt; elanIdentifierId = InstanceIdentifier.builder(ElanInstances&lt;br/&gt;
&amp;gt; 488	+                                       &lt;br/&gt;
&amp;gt; .class).child(ElanInstance.class, new&lt;br/&gt;
&amp;gt; ElanInstanceKey(elanInstanceName)).build();&lt;br/&gt;
&amp;gt; 489	+                                Optional&amp;lt;ElanInstance&amp;gt; elanInstance =&lt;br/&gt;
&amp;gt; NeutronvpnUtils.read(dataBroker,&lt;br/&gt;
&amp;gt; 490	+                                        LogicalDatastoreType&lt;br/&gt;
&amp;gt; 491	+                                        .CONFIGURATION,&lt;br/&gt;
&amp;gt; elanIdentifierId);&lt;br/&gt;
&amp;gt; 492	+                                long elanTag =&lt;br/&gt;
&amp;gt; elanInstance.get().getElanTag();&lt;br/&gt;
&amp;gt; 493	+                                try &lt;/p&gt;
{
&amp;gt; 494	+                                   
&amp;gt; checkAndPublishPortAddNotification(subnetMapNew.getSubnetIp(), subnetIdUp,
&amp;gt; portupdate
&amp;gt; 495	+                                            .getUuid(), elanTag);
&amp;gt; 496	+                                    LOG.debug(&quot;Port added to subnet
&amp;gt; notification sent&quot;);
&amp;gt; 497	+                                }
&lt;p&gt; catch (Exception e) &lt;/p&gt;
{
&amp;gt; 498	+                                    LOG.error(&quot;Port added to subnet
&amp;gt; notification failed&quot;, e);
&amp;gt; 499	+                                }
&lt;p&gt;&amp;gt; 500	+                            }&lt;br/&gt;
&amp;gt; 501	+                        }&lt;br/&gt;
&amp;gt; ...&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; At lines 454, 455 we set values for subnetIdOr and subnetIdUp, but these&lt;br/&gt;
&amp;gt; variables will always have the same value, because we get SubnetId for both&lt;br/&gt;
&amp;gt; two variables from updated neutron port (portupdate) =&amp;gt; comparation at line&lt;br/&gt;
&amp;gt; 457 will always give False =&amp;gt; condition in line 459 will be never executed. &lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; So this makes handleNeutronPortUpdated unable to catch, that Subnet ID for&lt;br/&gt;
&amp;gt; neutron port was changed (port was updated), hence, to threat a case, when&lt;br/&gt;
&amp;gt; we add a second subnet to a neutron network.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; See appropriate log with added debug traces in attachement&lt;/p&gt;</comment>
                            <comment id="38180" author="hariprasidh" created="Fri, 18 Aug 2017 13:21:12 +0000"  >&lt;p&gt;(In reply to Valentina Krasnobaeva from comment #0)&lt;br/&gt;
&amp;gt; Issue was introduced by this gerrit change:&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/45969&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/45969&lt;/a&gt;&lt;br/&gt;
&amp;gt; &lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=6770&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=6770&lt;/a&gt;&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; at NeutronPortChangeListener.java, handleNeutronPortUpdated method:&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; 445	+        final DataStoreJobCoordinator portDataStoreCoordinator =&lt;br/&gt;
&amp;gt; DataStoreJobCoordinator.getInstance();&lt;br/&gt;
&amp;gt; 446	+        portDataStoreCoordinator.enqueueJob(&quot;PORT- &quot; +&lt;br/&gt;
&amp;gt; portupdate.getUuid().getValue(), new&lt;br/&gt;
&amp;gt; 447	+                Callable&amp;lt;List&amp;lt;ListenableFuture&amp;lt;Void&amp;gt;&amp;gt;&amp;gt;() {&lt;br/&gt;
&amp;gt; 448	+                    @Override&lt;br/&gt;
&amp;gt; 449	+                    public List&amp;lt;ListenableFuture&amp;lt;Void&amp;gt;&amp;gt; call() throws&lt;br/&gt;
&amp;gt; Exception {&lt;br/&gt;
&amp;gt; 450	+                        WriteTransaction wrtConfigTxn =&lt;br/&gt;
&amp;gt; dataBroker.newWriteOnlyTransaction();&lt;br/&gt;
&amp;gt; 451	+                        List&amp;lt;ListenableFuture&amp;lt;Void&amp;gt;&amp;gt; futures = new&lt;br/&gt;
&amp;gt; ArrayList&amp;lt;&amp;gt;();&lt;br/&gt;
&amp;gt; 452	+&lt;br/&gt;
&amp;gt; 453	+                        Uuid vpnIdNew = null;&lt;br/&gt;
&amp;gt; 454	+                        final Uuid subnetIdOr =&lt;br/&gt;
&amp;gt; portupdate.getFixedIps().get(0).getSubnetId();&lt;br/&gt;
&amp;gt; 455	+                        final Uuid subnetIdUp =&lt;br/&gt;
&amp;gt; portupdate.getFixedIps().get(0).getSubnetId();&lt;br/&gt;
&amp;gt; 456	+                        // check if subnet UUID has changed upon change&lt;br/&gt;
&amp;gt; in fixedIP &lt;br/&gt;
&amp;gt; 457	+                        final Boolean subnetUpdated =&lt;br/&gt;
&amp;gt; subnetIdUp.equals(subnetIdOr) ? false : true;&lt;br/&gt;
&amp;gt; 458	+&lt;br/&gt;
&amp;gt; 459	+                        if (subnetUpdated) {&lt;br/&gt;
&amp;gt; 460	+                            Subnetmap subnetMapOld =&lt;br/&gt;
&amp;gt; nvpnManager.removePortsFromSubnetmapNode(subnetIdOr, portoriginal&lt;br/&gt;
&amp;gt; 461	+                                    .getUuid(), null);&lt;br/&gt;
&amp;gt; 462	+                            Uuid vpnIdOld = (subnetMapOld != null) ?&lt;br/&gt;
&amp;gt; subnetMapOld.getVpnId() : null;&lt;br/&gt;
&amp;gt; 463	+                            if (vpnIdOld != null) {&lt;br/&gt;
&amp;gt; 464	+                                // send port removed from subnet&lt;br/&gt;
&amp;gt; notification &lt;br/&gt;
&amp;gt; 465	+                                // only sent when the port was part of&lt;br/&gt;
&amp;gt; a VPN &lt;br/&gt;
&amp;gt; 466	+                                String elanInstanceName =&lt;br/&gt;
&amp;gt; portoriginal.getNetworkId().getValue();&lt;br/&gt;
&amp;gt; 467	+                                InstanceIdentifier&amp;lt;ElanInstance&amp;gt;&lt;br/&gt;
&amp;gt; elanIdentifierId = InstanceIdentifier.builder(ElanInstances&lt;br/&gt;
&amp;gt; 468	+                                       &lt;br/&gt;
&amp;gt; .class).child(ElanInstance.class, new&lt;br/&gt;
&amp;gt; ElanInstanceKey(elanInstanceName)).build();&lt;br/&gt;
&amp;gt; 469	+                                Optional&amp;lt;ElanInstance&amp;gt; elanInstance =&lt;br/&gt;
&amp;gt; NeutronvpnUtils.read(dataBroker,&lt;br/&gt;
&amp;gt; 470	+                                       &lt;br/&gt;
&amp;gt; LogicalDatastoreType.CONFIGURATION, elanIdentifierId);&lt;br/&gt;
&amp;gt; 471	+                                long elanTag =&lt;br/&gt;
&amp;gt; elanInstance.get().getElanTag();&lt;br/&gt;
&amp;gt; 472	+                                try &lt;/p&gt;
{
&amp;gt; 473	+                                   
&amp;gt; checkAndPublishPortRemoveNotification(subnetMapOld.getSubnetIp(), subnetIdOr,
&amp;gt; 474	+                                            portoriginal.getUuid(),
&amp;gt; elanTag);
&amp;gt; 475	+                                    LOG.debug(&quot;Port removed from subnet
&amp;gt; notification sent&quot;);
&amp;gt; 476	+                                }
&lt;p&gt; catch (Exception e) &lt;/p&gt;
{
&amp;gt; 477	+                                    LOG.error(&quot;Port removed from subnet
&amp;gt; notification failed&quot;, e);
&amp;gt; 478	+                                }
&lt;p&gt;&amp;gt; 479	+                            }&lt;br/&gt;
&amp;gt; 480	+                            Subnetmap subnetMapNew =&lt;br/&gt;
&amp;gt; nvpnManager.updateSubnetmapNodeWithPorts(subnetIdUp, portupdate.getUuid(),&lt;br/&gt;
&amp;gt; 481	+                                    null);&lt;br/&gt;
&amp;gt; 482	+                            vpnIdNew = (subnetMapNew != null) ?&lt;br/&gt;
&amp;gt; subnetMapNew.getVpnId() : null;&lt;br/&gt;
&amp;gt; 483	+                            if (vpnIdNew != null) {&lt;br/&gt;
&amp;gt; 484	+                                // send port added to subnet&lt;br/&gt;
&amp;gt; notification &lt;br/&gt;
&amp;gt; 485	+                                // only sent when the port is part of a&lt;br/&gt;
&amp;gt; VPN &lt;br/&gt;
&amp;gt; 486	+                                String elanInstanceName =&lt;br/&gt;
&amp;gt; portupdate.getNetworkId().getValue();&lt;br/&gt;
&amp;gt; 487	+                                InstanceIdentifier&amp;lt;ElanInstance&amp;gt;&lt;br/&gt;
&amp;gt; elanIdentifierId = InstanceIdentifier.builder(ElanInstances&lt;br/&gt;
&amp;gt; 488	+                                       &lt;br/&gt;
&amp;gt; .class).child(ElanInstance.class, new&lt;br/&gt;
&amp;gt; ElanInstanceKey(elanInstanceName)).build();&lt;br/&gt;
&amp;gt; 489	+                                Optional&amp;lt;ElanInstance&amp;gt; elanInstance =&lt;br/&gt;
&amp;gt; NeutronvpnUtils.read(dataBroker,&lt;br/&gt;
&amp;gt; 490	+                                        LogicalDatastoreType&lt;br/&gt;
&amp;gt; 491	+                                        .CONFIGURATION,&lt;br/&gt;
&amp;gt; elanIdentifierId);&lt;br/&gt;
&amp;gt; 492	+                                long elanTag =&lt;br/&gt;
&amp;gt; elanInstance.get().getElanTag();&lt;br/&gt;
&amp;gt; 493	+                                try &lt;/p&gt;
{
&amp;gt; 494	+                                   
&amp;gt; checkAndPublishPortAddNotification(subnetMapNew.getSubnetIp(), subnetIdUp,
&amp;gt; portupdate
&amp;gt; 495	+                                            .getUuid(), elanTag);
&amp;gt; 496	+                                    LOG.debug(&quot;Port added to subnet
&amp;gt; notification sent&quot;);
&amp;gt; 497	+                                }
&lt;p&gt; catch (Exception e) &lt;/p&gt;
{
&amp;gt; 498	+                                    LOG.error(&quot;Port added to subnet
&amp;gt; notification failed&quot;, e);
&amp;gt; 499	+                                }
&lt;p&gt;&amp;gt; 500	+                            }&lt;br/&gt;
&amp;gt; 501	+                        }&lt;br/&gt;
&amp;gt; ...&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; At lines 454, 455 we set values for subnetIdOr and subnetIdUp, but these&lt;br/&gt;
&amp;gt; variables will always have the same value, because we get SubnetId for both&lt;br/&gt;
&amp;gt; two variables from updated neutron port (portupdate) =&amp;gt; comparation at line&lt;br/&gt;
&amp;gt; 457 will always give False =&amp;gt; condition in line 459 will be never executed. &lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; So this makes handleNeutronPortUpdated unable to catch, that Subnet ID for&lt;br/&gt;
&amp;gt; neutron port was changed (port was updated), hence, to threat a case, when&lt;br/&gt;
&amp;gt; we add a second subnet to a neutron network.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; See appropriate log with added debug traces in attachement&lt;/p&gt;

&lt;p&gt;Hi Valentina,&lt;/p&gt;

&lt;p&gt;Can you please provide me the clear procedure in which scenario you have observed this issue and please update the logs.&lt;/p&gt;</comment>
                            <comment id="38181" author="hariprasidh" created="Tue, 22 Aug 2017 12:02:39 +0000"  >&lt;p&gt;Am trying to see the issue for that I&apos;ve tested below scenarios.&lt;/p&gt;

&lt;p&gt;Test1 :&lt;br/&gt;
Created Network and subnet.&lt;br/&gt;
observed above code is not executed.&lt;/p&gt;

&lt;p&gt;Test2 :&lt;br/&gt;
Created Network and 2 subnets on the same network.&lt;br/&gt;
observed above code is not executed.&lt;/p&gt;

&lt;p&gt;Test3: &lt;br/&gt;
Created Network and  2 subnets on the same network.&lt;br/&gt;
created router and attached both subnets with router.&lt;br/&gt;
observed above code is not executed.&lt;/p&gt;

&lt;p&gt;Valentina,&lt;br/&gt;
Will you please tell me in which scenario/test, the above code snippet can be execute?&lt;/p&gt;</comment>
                            <comment id="38182" author="hariprasidh" created="Wed, 23 Aug 2017 13:02:35 +0000"  >&lt;p&gt;With latest git pull for networking-odl, below mentioned code got triggered.&lt;/p&gt;</comment>
                            <comment id="38183" author="hariprasidh" created="Thu, 24 Aug 2017 09:00:01 +0000"  >&lt;p&gt;Bug has been fixed.&lt;/p&gt;

&lt;p&gt;Patch pushed to Carbon &amp;amp; Master. Please find below,&lt;/p&gt;

&lt;p&gt;Carbon : &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/60636/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/60636/&lt;/a&gt;&lt;br/&gt;
Master : &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/60650/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/60650/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8875</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=8875]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Bug]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10301"><![CDATA[Normal]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i01u13:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>