<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:36:19 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-410] TerminationPoint reconciliation fails if one port is already present</title>
                <link>https://jira.opendaylight.org/browse/OVSDB-410</link>
                <project id="10158" key="OVSDB">ovsdb</project>
                    <description>&lt;p&gt;TerminationPoint reconciliation has a bug where reconciliation can fail if even one port doesn&apos;t require reconciliation. The issue is with TerminationPointCreateCommand, which checks if TerminationPoint already exists in operational or not. It seems to be failing for ports that already exist and we end up reconciling ports that are already present.&lt;/p&gt;

&lt;p&gt;However, trying to create a port that already exists results in constraint violation error:&lt;/p&gt;
{
            &quot;error&quot;: &quot;constraint violation&quot;,
            &quot;details&quot;: &quot;Transaction causes multiple rows in \&quot;Interface\&quot; table to have identical values (\&quot;tun21435b8e5dd\&quot;) for index on column \&quot;name\&quot;.  First row, with UUID fdb4afd2-9877-42bb-9dac-c35e96b3de6d, existed in the database before this transaction and was not modified by the transaction.  Second row, with UUID 63d879a2-77fb-4401-9ee0-d2861791c192, was inserted by this transaction.&quot;
        }

&lt;p&gt;A failure in any of operations in a transaction results in all other operations also failing. This means operations to add rest of the ports fail and they never get reconciled.&lt;/p&gt;

&lt;p&gt;Steps to reproduce:&lt;/p&gt;

&lt;p&gt;1. Create two tunnel interfaces through OVSDB plugin.&lt;br/&gt;
2. Note OFPort number to determine which one was second to be added (higher OF Port number).&lt;br/&gt;
3. Disconnect the switch from ODL (del-manager)&lt;br/&gt;
4. Delete the port with higher OF Port number from switch through CLI.&lt;br/&gt;
5. Reconnect the switch using set-manager&lt;/p&gt;

&lt;p&gt;Expected behavior:&lt;br/&gt;
Port deleted in step 4 should show back up.&lt;/p&gt;

&lt;p&gt;Actual behavior:&lt;br/&gt;
Port is never added.&lt;/p&gt;

&lt;p&gt;If first port is deleted, it will not throw constraint violation, but second one will.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="22102">OVSDB-410</key>
            <summary>TerminationPoint reconciliation fails if one port is already present</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="thapar">Vishal Thapar</assignee>
                                    <reporter username="thapar">Vishal Thapar</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Apr 2017 10:41:54 +0000</created>
                <updated>Mon, 30 Oct 2017 19:53:31 +0000</updated>
                            <resolved>Wed, 26 Apr 2017 08:40:34 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>Southbound.Open_vSwitch</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="41653" author="thapar" created="Mon, 24 Apr 2017 12:19:14 +0000"  >&lt;p&gt;The issue is in TerminationPointConfigReconciliationTask.java, Line 57:&lt;/p&gt;

&lt;p&gt;    @Override&lt;br/&gt;
    public boolean reconcileConfiguration(final OvsdbConnectionManager connectionManager) {&lt;br/&gt;
        LOG.debug(&quot;Reconcile Termination Point Configuration for node {}&quot;, ((Node) configData).getNodeId());&lt;br/&gt;
        final Map&amp;lt;InstanceIdentifier&amp;lt;?&amp;gt;, DataObject&amp;gt; changes = new HashMap&amp;lt;&amp;gt;();&lt;br/&gt;
        changes.putAll(SouthboundMapper.extractTerminationPointConfigurationChanges((Node) configData));&lt;br/&gt;
        BridgeOperationalState bridgeOperationalState =&lt;br/&gt;
            new BridgeOperationalState(reconciliationManager.getDb(), Collections.EMPTY_LIST) {&lt;br/&gt;
                @Override&lt;br/&gt;
                public Optional&amp;lt;TerminationPoint&amp;gt; getBridgeTerminationPoint(InstanceIdentifier&amp;lt;?&amp;gt; iid) &lt;/p&gt;
{
                    return Optional.absent();
                }
&lt;p&gt;            };&lt;/p&gt;

&lt;p&gt;We&apos;re initializing BridgeOperationalState always as empty. In TerminationPointCreate when we check if TP exists in operational or not:&lt;br/&gt;
            InstanceIdentifier terminationPointIid = entry.getKey();&lt;br/&gt;
            Optional&amp;lt;TerminationPoint&amp;gt; terminationPointOptional =&lt;br/&gt;
                    state.getBridgeTerminationPoint(terminationPointIid);&lt;br/&gt;
            if (!terminationPointOptional.isPresent()) {&lt;/p&gt;

&lt;p&gt;it always returns absent, so we end up reconciling ports that are already present in operational datastore.&lt;/p&gt;

&lt;p&gt;This looks like an artifact of earlier version of the patch &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; where Bridge reconciliation was taking are of TPs too, or probably some pending code that never got in. If testing was done by deleting all ports, it this issue won&apos;t be hit.&lt;/p&gt;

&lt;p&gt;I&apos;m working on a fix, will be pushing soon.&lt;/p&gt;

&lt;p&gt;Question: Should this be termed critical? As it stands, reconciliation of ports is currently broken in all branches.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/40506/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/40506/&lt;/a&gt;]&lt;/p&gt;</comment>
                            <comment id="41654" author="thapar" created="Mon, 24 Apr 2017 12:37:26 +0000"  >&lt;p&gt;Marking it as blocker as per discussion with Sam in IRC, as I see this issue even on single node.&lt;/p&gt;

&lt;p&gt;Patches&lt;br/&gt;
-------&lt;br/&gt;
master: &lt;a href=&quot;https://git.opendaylight.org/gerrit/55901&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/55901&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>8280</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=8280]]></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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i022k7:</customfieldvalue>

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