<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:35:36 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>[OVSDB-138] Pipeline flows are not programmed because of failed onNodeUpdated call</title>
                <link>https://jira.opendaylight.org/browse/OVSDB-138</link>
                <project id="10158" key="OVSDB">ovsdb</project>
                    <description>&lt;p&gt;I see a case where the method below is called when a new openflow node connects. onNodeUpdated is called, we log it, read from the datastore and then enqueue a message to be processed later that will program the pipeline flows. What I am seeing is sometimes the enqueue doesn&apos;t happen. I don&apos;t see the error log from the onFailure path so I am assuming the optional.isPresent is true. We always get two of the onNodeUpdated callbacks per node. The nodes were just added so I don&apos;t see how the first callback doesn&apos;t have the field isPresent as true. Or I have no idea what that flag is for. But in the success case the flag is false the first time so the node is enqueued one time and everything works.&lt;/p&gt;

&lt;p&gt;Node Update received for : KeyedInstanceIdentifier&lt;/p&gt;
{targetType=interface org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node, path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri [_value=openflow:25030657407808]]]]}
&lt;p&gt;&quot;&lt;/p&gt;

&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Process the Node update notification. Check for Openflow node and make sure if the bridge is part of the Pipeline before&lt;/li&gt;
	&lt;li&gt;programming the Pipeline specific flows.&lt;br/&gt;
     */&lt;br/&gt;
    @Override&lt;br/&gt;
    public void onNodeUpdated(NodeUpdated nodeUpdated) {&lt;br/&gt;
        NodeRef ref = nodeUpdated.getNodeRef();&lt;br/&gt;
        InstanceIdentifier&amp;lt;Node&amp;gt; identifier = (InstanceIdentifier&amp;lt;Node&amp;gt;) ref.getValue();&lt;br/&gt;
        logger.debug(&quot;Node Update received for : &quot;+identifier.toString());&lt;br/&gt;
        final NodeKey key = identifier.firstKeyOf(Node.class, NodeKey.class);&lt;br/&gt;
        final String nodeId = key.getId().getValue();&lt;br/&gt;
        if (key != null &amp;amp;&amp;amp; key.getId().getValue().contains(&quot;openflow&quot;)) {&lt;br/&gt;
            InstanceIdentifierBuilder&amp;lt;Node&amp;gt; builder = ((InstanceIdentifier&amp;lt;Node&amp;gt;) ref.getValue()).builder();&lt;br/&gt;
            InstanceIdentifierBuilder&amp;lt;FlowCapableNode&amp;gt; augmentation = builder.augmentation(FlowCapableNode.class);&lt;br/&gt;
            final InstanceIdentifier&amp;lt;FlowCapableNode&amp;gt; path = augmentation.build();&lt;br/&gt;
            BindingTransactionChain txChain = mdsalConsumer.getDataBroker().createTransactionChain(this);&lt;br/&gt;
            CheckedFuture readFuture = txChain.newReadWriteTransaction().read(LogicalDatastoreType.OPERATIONAL, path);&lt;br/&gt;
            Futures.addCallback(readFuture, new FutureCallback&amp;lt;Optional&amp;lt;? extends DataObject&amp;gt;&amp;gt;() {&lt;br/&gt;
                @Override&lt;br/&gt;
                public void onSuccess(Optional&amp;lt;? extends DataObject&amp;gt; optional) 
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: {                    if (!optional.isPresent()) {
                        enqueue(nodeId);
                    }                }&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;                @Override&lt;br/&gt;
                public void onFailure(Throwable throwable) &lt;/p&gt;
{
                    logger.debug(String.format(&quot;Can&apos;t retrieve node data for node %s. Writing node data with table0.&quot;, nodeId));
                    enqueue(nodeId);
                }
&lt;p&gt;            });&lt;br/&gt;
        }&lt;br/&gt;
    }&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="21830">OVSDB-138</key>
            <summary>Pipeline flows are not programmed because of failed onNodeUpdated call</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="shague">Sam Hague</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Feb 2015 13:22:44 +0000</created>
                <updated>Thu, 19 Oct 2017 21:28:28 +0000</updated>
                            <resolved>Mon, 4 May 2015 20:18:29 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>openstack.net-virt-providers</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="40764" author="shague@redhat.com" created="Thu, 12 Feb 2015 13:25:35 +0000"  >&lt;p&gt;This seems to happen with helium-sr2. it may only happen 1 out of 10 times or more often.&lt;/p&gt;

&lt;p&gt;I don&apos;t think I have seen it on lithium.&lt;/p&gt;</comment>
                            <comment id="40765" author="shague@redhat.com" created="Fri, 13 Feb 2015 13:18:04 +0000"  >&lt;p&gt;There could be a race condition with InventoryManager. OVSDB looks up the node in the datastore and if not found (isPresent=false) will then program the pipeline flows. InventoryManager will add the node to the datastore so if that happens around the same time as the OVSDB node lookup the node will be found and the pipeline flows not provisioned.&lt;/p&gt;

&lt;p&gt;Solution:&lt;br/&gt;
Replace the onNodeUpdated with a datachange listener for the flowCapableNode and key off it for node changes. This should be more deterministic.&lt;/p&gt;</comment>
                            <comment id="40766" author="shague@redhat.com" created="Mon, 16 Feb 2015 16:49:21 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/15370/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/15370/&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>2707</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=2707]]></customfieldvalue>

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

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