<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:15:13 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>[NETCONF-513] 8040 post and put result in spurious NOOPs to mounted resources</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-513</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;Post and put via 8040 restconf have reinstated an old bug from the days of Lithium where they create a merge transaction with an empty Node as a data part.&lt;/p&gt;

&lt;p&gt;Merge with an empty data portion is a NOOP. This transaction should never be created in the first place.&lt;/p&gt;</description>
                <environment>&lt;p&gt;I am observing this with JSON RPC, but this will show up across any other mounted data resource. JSON RPC simply allows me to monitor what is coming out of ODL across a mount point.&lt;/p&gt;</environment>
        <key id="29271">NETCONF-513</key>
            <summary>8040 post and put result in spurious NOOPs to mounted resources</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.opendaylight.org/images/icons/priorities/minor.svg">Low</priority>
                        <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="10001">Won&apos;t Do</resolution>
                                        <assignee username="aivanov">Anton Ivanov</assignee>
                                    <reporter username="aivanov">Anton Ivanov</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Feb 2018 17:58:09 +0000</created>
                <updated>Fri, 15 Mar 2019 22:22:14 +0000</updated>
                            <resolved>Mon, 1 Oct 2018 18:51:43 +0000</resolved>
                                                                    <component>restconf-nb</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="61197" author="tpantelis" created="Sun, 25 Feb 2018 15:51:12 +0000"  >&lt;p&gt;Can you add more detail?&lt;/p&gt;</comment>
                            <comment id="61198" author="aivanov" created="Sun, 25 Feb 2018 18:32:18 +0000"  >&lt;p&gt;Some backhground:&lt;/p&gt;

&lt;p&gt;JSONRPC tranlates transactions originating from MDSAL more or less 1:1. So for each attempted operation in the SAL layer across the data broker there is a visible operation across JSON RPC.&lt;/p&gt;

&lt;p&gt;If we attempt PUT to &lt;a href=&quot;http://127.0.0.1:8181/rests/data/jsonrpc:config/configured-endpoints=openswitch-1/yang-ext:mount/ietf-interfaces:interfaces/interface=e101-001-0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://127.0.0.1:8181/rests/data/jsonrpc:config/configured-endpoints=openswitch-1/yang-ext:mount/ietf-interfaces:interfaces/interface=e101-001-0&lt;/a&gt; with the following body:&lt;/p&gt;

&lt;p&gt;{&quot;interface&quot;:&lt;/p&gt;
{
 &quot;name&quot;:&quot;e101-001-0&quot;,
 &quot;enabled&quot;:true,
 &quot;speed&quot;:&quot;100MBPS&quot;,
 &quot;dell-interface:mode&quot;:&quot;MODE_L2&quot;,
 &quot;base-if-phy:learn-mode&quot;:&quot;HW&quot;
}
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;We get the following transaction sequence:&lt;/p&gt;

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

&lt;p&gt;1. Read. This simply should not be happening. PUT means &quot;do as I say&quot;, why is it reading at all?&lt;/p&gt;

&lt;p&gt;{{INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;read&quot;,&quot;params&quot;:[&quot;config&quot;,&quot;openswitch-1&quot;,{&quot;ietf-interfaces:interfaces&quot;:{&quot;interface&quot;:[&lt;/p&gt;
{&quot;name&quot;:&quot;e101-001-0&quot;}
&lt;p&gt;]}}]}}}&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 1, &quot;result&quot;: {&quot;dell-interface:duplex&quot;: &quot;full&quot;, &quot;dell-interface:auto-negotiation&quot;: false, &quot;base-if-phy:npu-id&quot;: 0, &quot;name&quot;: &quot;e101-001-0&quot;, &quot;dell-interface:mode&quot;: &quot;MODE_NONE&quot;, &quot;dell-interface:speed&quot;: &quot;0MBPS&quot;, &quot;base-if-common:if-index&quot;: 3, &quot;base-if-phy:port-id&quot;: 25, &quot;enabled&quot;: false, &quot;dell-interface:phys-address&quot;: &quot;90:b1:1c:f4:ef:a0&quot;, &quot;base-if-phy:phy-media&quot;: &quot;AR_POPTICS_UNKNOWN&quot;, &quot;base-if-phy:tagging-mode&quot;: &quot;HYBRID&quot;, &quot;base-if-phy:learn-mode&quot;: &quot;HW&quot;, &quot;dell-interface:fec&quot;: &quot;off&quot;, &quot;type&quot;: &quot;iana-if-type:ethernetCsmacd&quot;, &quot;dell-interface:oui&quot;: 6976381, &quot;dell-interface:mtu&quot;: 1532&lt;/tt&gt;}}&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;2. Allocate a read-write transaction&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;txid&quot;&lt;/tt&gt;}&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 1, &quot;result&quot;: &quot;9da95d65-fac2-41bc-aec4-c0b063f52015&quot;&lt;/tt&gt;}&lt;/p&gt;

&lt;p&gt;3. Merge of an empty object. As far as meaningless churning this is probably exemplary - this is a clear NOOP.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:2,&quot;method&quot;:&quot;merge&quot;,&quot;params&quot;:&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;9da95d65-fac2-41bc-aec4-c0b063f52015&amp;quot;,&amp;quot;config&amp;quot;,&amp;quot;openswitch-1&amp;quot;,{&amp;quot;ietf-interfaces:interfaces&amp;quot;:{}},{}&amp;#93;&lt;/span&gt;&lt;/tt&gt;}&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 2, &quot;result&quot;: null&lt;/tt&gt;}&lt;/p&gt;

&lt;p&gt;4.&#160; The actual put - this should have been No 2. 1 and 3 should have never been executed.&lt;/p&gt;


&lt;p&gt;INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:3,&quot;method&quot;:&quot;put&quot;,&quot;params&quot;:[&quot;9da95d65-fac2-41bc-aec4-c0b063f52015&quot;,&quot;config&quot;,&quot;openswitch-1&quot;,{&quot;ietf-interfaces:interfaces&quot;:{&quot;interface&quot;:[&lt;/p&gt;
{&quot;name&quot;:&quot;e101-001-0&quot;}
&lt;p&gt;]}},{&quot;name&quot;:&quot;e101-001-0&quot;,&quot;enabled&quot;:true,&quot;dell-interface:mode&quot;:&quot;MODE_L2&quot;,&quot;dell-interface:speed&quot;:&quot;100MBPS&quot;,&quot;base-if-phy:learn-mode&quot;:&quot;HW&quot;}]}&lt;br/&gt;
INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 3, &quot;result&quot;: null}&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;5. Commit transaction.&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:4,&quot;method&quot;:&quot;commit&quot;,&quot;params&quot;:&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;9da95d65-fac2-41bc-aec4-c0b063f52015&amp;quot;&amp;#93;&lt;/span&gt;&lt;/tt&gt;}&lt;tt&gt;INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 4, &quot;result&quot;: true&lt;/tt&gt;}&lt;/p&gt;</comment>
                            <comment id="61199" author="aivanov" created="Sun, 25 Feb 2018 18:43:19 +0000"  >&lt;p&gt;POST is even &quot;better&quot;.&lt;/p&gt;

&lt;p&gt;This is an trace of a POST to &lt;a href=&quot;http://127.0.0.1:8181/restconf/config/jsonrpc:config/configured-endpoints/openswitch-1/yang-ext:mount/ietf-interfaces:interfaces/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://127.0.0.1:8181/restconf/config/jsonrpc:config/configured-endpoints/openswitch-1/yang-ext:mount/ietf-interfaces:interfaces/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;{&quot;interface&quot;:&lt;/p&gt;
 {
 &quot;name&quot;:&quot;br200&quot;,
 &quot;type&quot;:&quot;iana-if-type:l2vlan&quot;,
 &quot;base-if-vlan:id&quot;:200,
 &quot;dell-interface:untagged-ports&quot;:[&quot;e101-001-0&quot;,&quot;e101-002-0&quot;],
 &quot;enabled&quot;:true
 }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;1 First operation is exists() - that is correct behavior, so far so good&lt;/p&gt;

&lt;p&gt;{{INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;exists&quot;,&quot;params&quot;:[&quot;config&quot;,&quot;openswitch-1&quot;,{&quot;ietf-interfaces:interfaces&quot;:{&quot;interface&quot;:[&lt;/p&gt;
{&quot;name&quot;:&quot;br200&quot;}
&lt;p&gt;]}}]}}}&lt;tt&gt;INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 1, &quot;result&quot;: false&lt;/tt&gt;}&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;2. Second is allocate read-write transaction&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:2,&quot;method&quot;:&quot;txid&quot;&lt;/tt&gt;}&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 2, &quot;result&quot;: &quot;cd6ba031-5840-4f34-885c-bb0d1ba2f5da&quot;&lt;/tt&gt;}&lt;/p&gt;

&lt;p&gt;{{3. After that ODL goes off the deep end for a while - not one. Two meaningless churn merges of an empty object }}&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:3,&quot;method&quot;:&quot;merge&quot;,&quot;params&quot;:&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;cd6ba031-5840-4f34-885c-bb0d1ba2f5da&amp;quot;,&amp;quot;config&amp;quot;,&amp;quot;openswitch-1&amp;quot;,{&amp;quot;ietf-interfaces:interfaces&amp;quot;:{}},{}&amp;#93;&lt;/span&gt;&lt;/tt&gt;}&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 3, &quot;result&quot;: null&lt;/tt&gt;}&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:4,&quot;method&quot;:&quot;merge&quot;,&quot;params&quot;:&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;cd6ba031-5840-4f34-885c-bb0d1ba2f5da&amp;quot;,&amp;quot;config&amp;quot;,&amp;quot;openswitch-1&amp;quot;,{&amp;quot;ietf-interfaces:interfaces&amp;quot;:{}},{}&amp;#93;&lt;/span&gt;&lt;/tt&gt;}&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 4, &quot;result&quot;: null&lt;/tt&gt;}&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;4. This is sort-a correct. I would have expected to see merge() here. However, because the item does not exist, put and merge yield the same result.&lt;/tt&gt;&lt;br/&gt;
{{INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:5,&quot;method&quot;:&quot;put&quot;,&quot;params&quot;:[&quot;cd6ba031-5840-4f34-885c-bb0d1ba2f5da&quot;,&quot;config&quot;,&quot;openswitch-1&quot;,{&quot;ietf-interfaces:interfaces&quot;:{&quot;interface&quot;:[&lt;/p&gt;
{&quot;name&quot;:&quot;br200&quot;}
&lt;p&gt;]}},{&quot;name&quot;:&quot;br200&quot;,&quot;base-if-vlan:id&quot;:200,&quot;enabled&quot;:true,&quot;dell-interface:untagged-ports&quot;:&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;e101-002-0&amp;quot;,&amp;quot;e101-001-0&amp;quot;&amp;#93;&lt;/span&gt;,&quot;type&quot;:&quot;iana-if-type:l2vlan&quot;}]}}}&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 5, &quot;result&quot;: null&lt;/tt&gt;}&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;5. Finally - commit transaction&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;INFO:root:&amp;gt; {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:6,&quot;method&quot;:&quot;commit&quot;,&quot;params&quot;:&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;cd6ba031-5840-4f34-885c-bb0d1ba2f5da&amp;quot;&amp;#93;&lt;/span&gt;&lt;/tt&gt;}&lt;tt&gt;INFO:root:&amp;lt; {&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: 6, &quot;result&quot;: true&lt;/tt&gt;}&lt;/p&gt;</comment>
                            <comment id="61200" author="aivanov" created="Sun, 25 Feb 2018 18:45:12 +0000"  >&lt;p&gt;In both cases JSON RPC is the &quot;messenger&quot; - it simply shows what is coming out of MDSAL courtesy of Restconf translating an HTTP request. I would not expect MDSAL to breed requests or modify them in-transit so my suspicion is with restconf codec having some FSM issues.&lt;/p&gt;</comment>
                            <comment id="61201" author="tpantelis" created="Sun, 25 Feb 2018 22:06:09 +0000"  >&lt;p&gt;It looks like the merge is to ensure the parents exist via TransactionUtil.ensureParentsByMerge. This is necessary for at least the MD_SAL data store - it may not be for all mount point implementations but the restconf front-end doesn&apos;t know the difference.  Is this behavior specific to the 8040 impl? I believe the draft02 impl should do the same thing. &lt;/p&gt;

&lt;p&gt;Also it doesn&apos;t create a separate transaction to do the parent merges - it creates one transaction to do all the operations. &lt;/p&gt;

&lt;p&gt; Is this really an issue for jsonrpc?&lt;/p&gt;</comment>
                            <comment id="65110" author="jmorvay" created="Mon, 1 Oct 2018 15:36:52 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=aivanov&quot; class=&quot;user-hover&quot; rel=&quot;aivanov&quot;&gt;aivanov&lt;/a&gt; any thoughts on last comment from &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=tpantelis&quot; class=&quot;user-hover&quot; rel=&quot;tpantelis&quot;&gt;tpantelis&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="65112" author="aivanov" created="Mon, 1 Oct 2018 15:44:57 +0000"  >&lt;p&gt;This was discussed as a part of several other discussions related to JSON RPC, database options for mdsal backends, etc.&lt;/p&gt;

&lt;p&gt;It is not an 8040 implementation bug and it will sort itself on its own as mdsal develops to include various alternative backends.&lt;/p&gt;

&lt;p&gt;You can close it.&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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03aqf:</customfieldvalue>

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