<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:58 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>[MDSAL-194] exception while configuring bgp peer (boron and carbon)</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-194</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Boron:&lt;br/&gt;
&lt;a href=&quot;https://jenkins.opendaylight.org/releng/view/bgpcep/job/bgpcep-csit-1node-userfeatures-only-boron/904/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://jenkins.opendaylight.org/releng/view/bgpcep/job/bgpcep-csit-1node-userfeatures-only-boron/904/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Carbon:&lt;br/&gt;
&lt;a href=&quot;https://jenkins.opendaylight.org/releng/view/bgpcep/job/bgpcep-csit-1node-userfeatures-only-carbon/30/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://jenkins.opendaylight.org/releng/view/bgpcep/job/bgpcep-csit-1node-userfeatures-only-carbon/30/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;sandbox replication to have less logs with just 1 suite:&lt;br/&gt;
&lt;a href=&quot;https://jenkins.opendaylight.org/sandbox/job/bgpcep-csit-1node-userfeatures-only-boron/2/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://jenkins.opendaylight.org/sandbox/job/bgpcep-csit-1node-userfeatures-only-boron/2/&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;exception:&lt;/p&gt;

&lt;p&gt;2016-08-22 12:02:56,916 | ERROR | on-dispatcher-63 | DataTreeChangeListenerActor      | 172 - org.opendaylight.controller.sal-distributed-datastore - 1.4.0.SNAPSHOT | Error notifying listener org.opendaylight.controller.md.sal.binding.impl.BindingClusteredDOMDataTreeChangeListenerAdapter@154bfb5a&lt;br/&gt;
java.lang.ClassCastException: com.sun.proxy.$Proxy204 cannot be cast to org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.AfiSafi2&lt;br/&gt;
	at org.opendaylight.protocol.bgp.openconfig.impl.BGPOpenConfigMappingServiceImpl.toAddPathCapability(BGPOpenConfigMappingServiceImpl.java:124)&lt;span class=&quot;error&quot;&gt;&amp;#91;213:org.opendaylight.bgpcep.bgp-openconfig-impl:0.6.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at Proxye8c70dbd_9d3b_44cb_8805_66bfff157211.toAddPathCapability(Unknown Source)&lt;span class=&quot;error&quot;&gt;&amp;#91;:&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at Proxyc915a486_1205_4d5f_9f62_be2b4720a69f.toAddPathCapability(Unknown Source)&lt;span class=&quot;error&quot;&gt;&amp;#91;:&amp;#93;&lt;/span&gt;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="27016">MDSAL-194</key>
            <summary>exception while configuring bgp peer (boron and carbon)</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="pgubka@cisco.com">Peter Gubka</reporter>
                        <labels>
                    </labels>
                <created>Mon, 22 Aug 2016 12:22:24 +0000</created>
                <updated>Mon, 6 Aug 2018 15:00:41 +0000</updated>
                            <resolved>Sat, 4 Aug 2018 01:45:22 +0000</resolved>
                                                    <fixVersion>Fluorine</fixVersion>
                    <fixVersion>Oxygen SR3</fixVersion>
                                    <component>Binding codegen</component>
                    <component>Binding runtime</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="54427" author="pgubka@cisco.com" created="Mon, 22 Aug 2016 12:22:24 +0000"  >&lt;p&gt;Attachment karaf.log.gz has been added with description: karaf log&lt;/p&gt;</comment>
                            <comment id="54421" author="milos.fabian@pantheon.tech" created="Fri, 26 Aug 2016 21:39:38 +0000"  >&lt;p&gt;Possibly yangtools/mdsal bug - problem addresses via email - &lt;a href=&quot;https://lists.opendaylight.org/pipermail/yangtools-dev/2016-August/001549.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://lists.opendaylight.org/pipermail/yangtools-dev/2016-August/001549.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A temporary workaround should be possible in BGP code.&lt;/p&gt;</comment>
                            <comment id="54422" author="rovarga" created="Wed, 31 Aug 2016 09:34:54 +0000"  >&lt;p&gt;master: &lt;a href=&quot;https://git.opendaylight.org/gerrit/44875&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/44875&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54423" author="vrpolak" created="Wed, 31 Aug 2016 10:29:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/44875/1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/44875/1&lt;/a&gt;&lt;br/&gt;
Attempted fix in Yangtools shows another exception:&lt;/p&gt;

&lt;p&gt;2016-08-31 10:08:47,083 | ERROR | on-dispatcher-65 | DataTreeChangeListenerActor      | 200 - org.opendaylight.controller.sal-distributed-datastore - 1.5.0.SNAPSHOT | Error notifying listener org.opendaylight.controller.md.sal.binding.impl.BindingClusteredDOMDataTreeChangeListenerAdapter@69f546e2&lt;br/&gt;
java.lang.ClassCastException: com.sun.proxy.$Proxy210 cannot be cast to org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.AfiSafi2&lt;br/&gt;
	at org.opendaylight.protocol.bgp.openconfig.impl.BGPOpenConfigMappingServiceImpl.toAddPathCapability(BGPOpenConfigMappingServiceImpl.java:125)&lt;span class=&quot;error&quot;&gt;&amp;#91;334:org.opendaylight.bgpcep.bgp-openconfig-impl:0.7.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at Proxy580841b1_fd76_4386_a70a_c33a64826007.toAddPathCapability(Unknown Source)&lt;span class=&quot;error&quot;&gt;&amp;#91;:&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at Proxydb312b39_aa4c_4eac_bc86_1129d5460378.toAddPathCapability(Unknown Source)&lt;span class=&quot;error&quot;&gt;&amp;#91;:&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.protocol.bgp.rib.impl.config.BgpPeer.getBgpParameters(BgpPeer.java:141)&lt;span class=&quot;error&quot;&gt;&amp;#91;307:org.opendaylight.bgpcep.bgp-rib-impl:0.7.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="54424" author="vrpolak" created="Wed, 31 Aug 2016 10:31:43 +0000"  >&lt;p&gt;&amp;gt; another exception&lt;/p&gt;

&lt;p&gt;Well, it is basically the same one.&lt;/p&gt;</comment>
                            <comment id="54425" author="rovarga" created="Wed, 31 Aug 2016 21:47:12 +0000"  >&lt;p&gt;There are two augmentations in play here, AfiSafi1 and AfiSafi2, which are really completely equivalent, as they end up targeting instantiations of the same grouping:&lt;/p&gt;

&lt;p&gt;package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614;&lt;br/&gt;
import org.opendaylight.yangtools.yang.binding.Augmentation;&lt;br/&gt;
import org.opendaylight.yangtools.yang.binding.DataObject;&lt;br/&gt;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.BgpNeighborAddPathsConfig;&lt;br/&gt;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.rev151009.bgp.common.afi.safi.list.AfiSafi;&lt;/p&gt;


&lt;p&gt;public interface AfiSafi1&lt;br/&gt;
    extends&lt;br/&gt;
    DataObject,&lt;br/&gt;
    Augmentation&amp;lt;AfiSafi&amp;gt;,&lt;br/&gt;
    BgpNeighborAddPathsConfig&lt;/p&gt;

&lt;p&gt;AfiSafi2 looks exactly the same. Note that we are looking for AfiSafi2 here. Based on the model (bgp-openconfig-extensions) and the call trace, we should be looking up AfiSafi1 (as that augments neighbor, AfiSafi2 augments global). This is something yangtools probably confused and should be rectified by the proposed patch.&lt;/p&gt;

&lt;p&gt;Now when DTCL is being invoked, we go through LazyDataObject and since we have not touched getAugmentations(), but are targeting a single one, we end up calling through DataObjectCodecContext.streamChild() and after some mucking around in augmentationByClassOrEquivalentClass().&lt;/p&gt;

&lt;p&gt;We then proceed to scan all real augmentations and check if any of them are equivalent using BindingReflections.isSubstitutionFor() &amp;#8211; which returns true, as the classes are really equivalent. Hence we instantiate a proxy for AfiSafi1, thinking it is a valid replacement for AfiSafi2 and return that &amp;#8211; leading to ClassCastException.&lt;/p&gt;

&lt;p&gt;So aside from bgpcep fix, &lt;a href=&quot;https://git.opendaylight.org/gerrit/44961&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/44961&lt;/a&gt;, which should rectify the lookup and ClassCastException, we need to solve the problem in mdsal. I can think of two avenues:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;teach BindingReflections to detect this problem (though it is not clear what check can be done at the class level).&lt;/li&gt;
	&lt;li&gt;teach code generator to not emit both AfiSafi1 and AfiSafi2 &amp;#8211; they can be safely squashed since their targets are already squashed by the binding spec&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I think we should implement the second option, as it lowers the number of classes and prevents this sort of confusion.&lt;/p&gt;</comment>
                            <comment id="54426" author="rovarga" created="Thu, 1 Sep 2016 21:49:12 +0000"  >&lt;p&gt;The ClassCastException has disappeared, but the confusion about AfiSafi1/AfiSafi2 needs to be cleaned up in MD-SAL. Reducing severity and dropping target release.&lt;/p&gt;</comment>
                            <comment id="64552" author="vrpolak" created="Mon, 6 Aug 2018 10:33:56 +0000"  >&lt;p&gt;&amp;gt; the confusion about AfiSafi1/AfiSafi2 needs to be cleaned up in MD-SAL&lt;/p&gt;

&lt;p&gt;Do we have a unit test proving the confusion has been cleaned up indeed (or another Bug tracking it if not)?&lt;/p&gt;</comment>
                            <comment id="64553" author="rovarga" created="Mon, 6 Aug 2018 11:00:44 +0000"  >&lt;p&gt;Of course we do. &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-328&quot; title=&quot;ClassCastException when accessing augmentations&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-328&quot;&gt;&lt;del&gt;MDSAL-328&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="64557" author="vrpolak" created="Mon, 6 Aug 2018 12:55:38 +0000"  >&lt;p&gt;Oh, Now I see the fix: &lt;a href=&quot;https://git.opendaylight.org/gerrit/72961&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/72961&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It seems that in order for Jira to show the link to a related Change, the issue name has to be written in the first line of the commit message.&lt;/p&gt;</comment>
                            <comment id="64566" author="vrpolak" created="Mon, 6 Aug 2018 15:00:41 +0000"  >&lt;p&gt;&amp;gt; in order for Jira to show the link to a related Change&lt;/p&gt;

&lt;p&gt;And now I see the gerrit links in &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-328&quot; title=&quot;ClassCastException when accessing augmentations&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-328&quot;&gt;&lt;del&gt;MDSAL-328&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
Not sure why I did not see them before, I recall the link to related Openflowplugin bug...&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="30009">YANGTOOLS-883</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="23768">BGPCEP-528</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="23777">BGPCEP-537</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="13809" name="karaf.log.gz" size="24792" author="pgubka@cisco.com" created="Mon, 22 Aug 2016 12:22:24 +0000"/>
                    </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>6497</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=6497]]></customfieldvalue>

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

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

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