<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:59:57 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>[GENIUS-119] Auto tunnels: race between creation of tun port and bridge ref, port not created</title>
                <link>https://jira.opendaylight.org/browse/GENIUS-119</link>
                <project id="10126" key="GENIUS">genius</project>
                    <description>&lt;p&gt;What went wrong functionally:&lt;/p&gt;

&lt;p&gt;I&apos;m currently working on CSIT to&#160;load test auto-tunnels. The test starts 30 docker containers each containing an OVS. Once the containers are running the test quickly set-manager and set-controllers the OVS instances. Test results show that some of the OVS nodes do not get all tunnel ports.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;The reason for this is a race condition where genius attempts to create a tunnel port on the br-int of a node&#160;before the BridgeRedEntry is created for that br-int. As such the following code in&#160;OvsInterfaceConfigAddHelper#addTunnelConfiguration never enters the if block and the port is never created:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;        LOG.debug(&quot;creating bridge interfaceEntry in ConfigDS {}&quot;, dpId);
        interfaceMetaUtils.createBridgeInterfaceEntryInConfigDS(dpId, interfaceNew.getName());

        // create bridge on switch, if switch is connectedBridgeRefEntry bridgeRefEntry = interfaceMetaUtils.getBridgeRefEntryFromOperDS(dpId);
        if (bridgeRefEntry != null &amp;amp;&amp;amp; bridgeRefEntry.getBridgeReference() != null) {
            LOG.debug(&quot;creating bridge interface on dpn {}&quot;, dpId);
            InstanceIdentifier&amp;lt;OvsdbBridgeAugmentation&amp;gt; bridgeIid =
                    (InstanceIdentifier&amp;lt;OvsdbBridgeAugmentation&amp;gt;) bridgeRefEntry
                    .getBridgeReference().getValue();
            if (createTunnelPort) {
                southboundUtils.addPortToBridge(bridgeIid, interfaceNew, tunnelName);
            }
...&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;This is evident from the times and line numbers on the following log statements. First we have:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;36516 2018-04-08T12:38:16,674 | INFO  | ForkJoinPool-1-worker-3 | OvsInterfaceConfigAddHelper      | 328 - org.opendaylight.genius.interfacemanager-impl - 0.4.1.SNAPSHOT | a      dding tunnel configuration for interface tuneebd1154715
36517 2018-04-08T12:38:16,674 | DEBUG | ForkJoinPool-1-worker-3 | OvsInterfaceConfigAddHelper      | 328 - org.opendaylight.genius.interfacemanager-impl - 0.4.1.SNAPSHOT | c      reating bridge interfaceEntry in ConfigDS 77216042541384
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;The next line should have been &quot;creating bridge interface on dpn...&quot; (from the code above) but that line never comes because the BridgeRefEntry is only created here:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;37304 2018-04-08T12:38:17,159 | DEBUG | ForkJoinPool-1-worker-3 | InterfaceMetaUtils               | 328 - org.opendaylight.genius.interfacemanager-impl - 0.4.1.SNAPSHOT | C      reating bridge ref entry for dpn: 77216042541384 bridge: InstanceIdentifier{targetType=interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb      .rev150105.OvsdbBridgeAugmentation, path=[org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology, org.opendaylight.yang.gen      .v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology[key=TopologyKey [_topologyId=Uri [_value=ovsdb:1]]], org.opendaylight.yang.gen.v1.u      rn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node[key=NodeKey [_nodeId=Uri [_value=ovsdb://uuid/9630ada5-c950-49ec-8599-a53e776ab729/      bridge/br-int]]], org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentation]}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="29700">GENIUS-119</key>
            <summary>Auto tunnels: race between creation of tun port and bridge ref, port not created</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="10004" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Verified</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="enidadh">nidhi adhvaryu</assignee>
                                    <reporter username="jhershbe">Josh Hershberg</reporter>
                        <labels>
                    </labels>
                <created>Mon, 9 Apr 2018 06:40:20 +0000</created>
                <updated>Thu, 13 Jun 2019 05:28:05 +0000</updated>
                            <resolved>Thu, 13 Jun 2019 05:27:01 +0000</resolved>
                                                    <fixVersion>Sodium</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="62300" author="faseela.k@ericsson.com" created="Mon, 9 Apr 2018 08:50:49 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=jhershbe&quot; class=&quot;user-hover&quot; rel=&quot;jhershbe&quot;&gt;jhershbe&lt;/a&gt; : There is InterfaceTopologyStateListener which fetches all tunnel interfaces from DS and program them on the switch. Are you saying this also did not work? Because it ended up in race with tunnel-interface creation thread?&lt;/p&gt;</comment>
                            <comment id="62316" author="faseela.k@ericsson.com" created="Tue, 10 Apr 2018 05:28:48 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=jhershbe&quot; class=&quot;user-hover&quot; rel=&quot;jhershbe&quot;&gt;jhershbe&lt;/a&gt; : I can see two approaches to solve this :&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Make ITM auto-tunnels act upon odl-interface-meta/bridge-ref-info using DataTreeEventCallbackRegistrar utility. OR&lt;/li&gt;
	&lt;li&gt;Enhance odl-interface-meta/bridge-ref-info yang model to add additional attributes (like local-ip) which is needed for auto-tunnels to operate, and then remove the network-topology listener in ITM, and switch to odl-interface-meta/bridge-ref-info listener to start ITM auto-tunnel configuration.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Suggestions?&lt;/p&gt;</comment>
                            <comment id="62329" author="jhershbe" created="Tue, 10 Apr 2018 14:19:19 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=k.faseela&quot; class=&quot;user-hover&quot; rel=&quot;k.faseela&quot;&gt;k.faseela&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt; There is InterfaceTopologyStateListener which fetches all tunnel interfaces from DS and program them on the switch. Are you saying this also did not work? Because it ended up in race with tunnel-interface creation thread? &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I did not delve into the details but, no, it did not work. &lt;/p&gt;</comment>
                            <comment id="62332" author="jhershbe" created="Tue, 10 Apr 2018 14:26:44 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=k.faseela&quot; class=&quot;user-hover&quot; rel=&quot;k.faseela&quot;&gt;k.faseela&lt;/a&gt;, regarding the two approaches you propose, I&apos;m thinking&#160;that since (1) is SO much simpler (much smaller change) and&#160;safer it&apos;s probably worth giving it a try. I figure since I have that CSIT job I&apos;m working on I can implement (1) and then do some scale tests with and without it to make sure the extra registrations do not cause problems with scale. I don&apos;t expect it to be an issue since from 30-40 nodes this race conditions happens just 1-2 times. Sound good?&#160;&lt;/p&gt;</comment>
                            <comment id="62333" author="faseela.k@ericsson.com" created="Tue, 10 Apr 2018 15:44:38 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=jhershbe&quot; class=&quot;user-hover&quot; rel=&quot;jhershbe&quot;&gt;jhershbe&lt;/a&gt; : I remember &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=vorburger&quot; class=&quot;user-hover&quot; rel=&quot;vorburger&quot;&gt;vorburger&lt;/a&gt; initially indicating that this EventCallBackRegistrar has some performance issues, which we will fix in subsequent patches, not sure whether those patches actually came in. Please keep in mind that for Oxygen, Ericsson&apos;s requirements is to support 150 switches, and we do have plans to use auto-tunnels.&lt;/p&gt;</comment>
                            <comment id="62334" author="vorburger" created="Tue, 10 Apr 2018 17:16:17 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=k.faseela&quot; class=&quot;user-hover&quot; rel=&quot;k.faseela&quot;&gt;k.faseela&lt;/a&gt; I never said that EventCallBackRegistrar has known some performance issues, just that if there are ever reasons that prove that its current implementation is a performance bottleneck, it could possibly be optimized; &lt;a href=&quot;https://github.com/opendaylight/genius/blob/master/mdsalutil/mdsalutil-impl/src/main/java/org/opendaylight/genius/datastoreutils/listeners/internal/DataTreeEventCallbackRegistrarImpl.java#L47&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;see also the in-line comment here&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="62359" author="faseela.k@ericsson.com" created="Wed, 11 Apr 2018 09:43:01 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=vorburger&quot; class=&quot;user-hover&quot; rel=&quot;vorburger&quot;&gt;vorburger&lt;/a&gt; ! Josh is proceeding with option1.&lt;/p&gt;</comment>
                            <comment id="62371" author="jhershbe" created="Thu, 12 Apr 2018 12:20:18 +0000"  >&lt;p&gt;Noted, that&apos;s why I want to test it &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&#160;Incidentally, to the best of my understanding it is unclear whether or not there is a performance problem with the registrar. There are some optimizations that can be done but as of yet it&apos;s unclear whether or not they&apos;re necessary.&lt;/p&gt;

&lt;p&gt;I&apos;ve been thinking more about this specific bug and fix and I think it is the perfect case for the registrar. The reason is that here we have a kind of corner case and we know that the &quot;happy path&quot; works 99.99% of the time. As such, it would be a shame to rewrite things for this corner case and we have a relatively clear and simply solution in the form of the regsitrar. Just my two cents. Anyway, I plan on checking the performance viability of it.&lt;/p&gt;</comment>
                            <comment id="62372" author="jhershbe" created="Thu, 12 Apr 2018 12:21:01 +0000"  >&lt;p&gt;Hah, just saw this and said the same thing a second ago. Sorry for the redundancy.&lt;/p&gt;</comment>
                            <comment id="62534" author="vorburger" created="Thu, 19 Apr 2018 14:31:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/browse/GENIUS-122&quot; title=&quot;DataTreeEventCallbackRegistrar really needs a timeout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GENIUS-122&quot;&gt;&lt;del&gt;GENIUS-122&lt;/del&gt;&lt;/a&gt; is providing the new utility discussed above...&lt;/p&gt;</comment>
                            <comment id="63040" author="faseela.k@ericsson.com" created="Tue, 22 May 2018 09:35:32 +0000"  >&lt;p&gt;Josh, any update on this? All the required utils are already merged. Were you able to use them?&lt;/p&gt;</comment>
                            <comment id="64759" author="vorburger" created="Fri, 24 Aug 2018 11:19:06 +0000"  >&lt;p&gt;Housekeeping: Looks like this issue didn&apos;t make it into Fluorine, thus Fix Version Neon.&lt;/p&gt;</comment>
                            <comment id="66896" author="enidadh" created="Thu, 13 Jun 2019 05:27:01 +0000"  >&lt;p&gt;There is a timing issue between SB and NB event while creating bridge. When we are trying to add bridge to ovsdb from SB, NB is trying to add port for same bridge. during which NB will check DS/cache for bridge entry, which will be empty as SB is trying to add it in ovsdb at the same time. So we are adding eventcallback to synchronize both events.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The fix for this issue is merged here,&#160;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/81980/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/81980/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="66897" author="enidadh" created="Thu, 13 Jun 2019 05:28:05 +0000"  >&lt;p&gt;CSIT has passed on the fix. and it is locally tested.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/81980/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/81980/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="29760">GENIUS-122</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03cx3:</customfieldvalue>

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