<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:53:39 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>[CONTROLLER-693] Table-id in restconf uri and flow xml is different, yet flow installs successfully and it creates problem for statistics manager</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-693</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;I am install flow to table = 0 of the switch using following restconf uri &lt;/p&gt;

&lt;p&gt;POST : &lt;a href=&quot;http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1234&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1234&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;but the table number i am using in request flow data is different then the one i am using in the url. I am using table=2 in the flow data.&lt;/p&gt;

&lt;p&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&amp;gt;&lt;br/&gt;
&amp;lt;flow xmlns=&quot;urn:opendaylight:flow:inventory&quot;&amp;gt;&lt;br/&gt;
    &amp;lt;barrier&amp;gt;false&amp;lt;/barrier&amp;gt;&lt;br/&gt;
    &amp;lt;cookie&amp;gt;10&amp;lt;/cookie&amp;gt;&lt;br/&gt;
    &amp;lt;cookie_mask&amp;gt;10&amp;lt;/cookie_mask&amp;gt;&lt;br/&gt;
    &amp;lt;flags&amp;gt;SEND_FLOW_REM&amp;lt;/flags&amp;gt;&lt;br/&gt;
    &amp;lt;flow-name&amp;gt;FooXf1&amp;lt;/flow-name&amp;gt;&lt;br/&gt;
    &amp;lt;hard-timeout&amp;gt;0&amp;lt;/hard-timeout&amp;gt;&lt;br/&gt;
    &amp;lt;id&amp;gt;1234&amp;lt;/id&amp;gt;&lt;br/&gt;
    &amp;lt;idle-timeout&amp;gt;0&amp;lt;/idle-timeout&amp;gt;&lt;br/&gt;
    &amp;lt;installHw&amp;gt;false&amp;lt;/installHw&amp;gt;&lt;br/&gt;
    &amp;lt;instructions&amp;gt;&lt;br/&gt;
        &amp;lt;instruction&amp;gt;&lt;br/&gt;
            &amp;lt;apply-actions&amp;gt;&lt;br/&gt;
                &amp;lt;action&amp;gt;&lt;br/&gt;
                    &amp;lt;order&amp;gt;0&amp;lt;/order&amp;gt;&lt;br/&gt;
                    &amp;lt;dec-nw-ttl/&amp;gt;&lt;br/&gt;
                &amp;lt;/action&amp;gt;&lt;/p&gt;

&lt;p&gt;                &amp;lt;action&amp;gt;&lt;br/&gt;
                  &amp;lt;order&amp;gt;1&amp;lt;/order&amp;gt;&lt;br/&gt;
                  &amp;lt;nx-reg-load xmlns=&quot;urn:opendaylight:openflowplugin:extension:nicira:action&quot;&amp;gt;&lt;br/&gt;
                    &amp;lt;dst&amp;gt;&lt;br/&gt;
                      &amp;lt;nx-reg xmlns:nxSB=&quot;urn:opendaylight:openflowjava:nx:match&quot;&amp;gt;nxSB:nxm-nx-reg0&amp;lt;/nx-reg&amp;gt;&lt;br/&gt;
                      &amp;lt;start&amp;gt;0&amp;lt;/start&amp;gt;&lt;br/&gt;
                      &amp;lt;end&amp;gt;5&amp;lt;/end&amp;gt;&lt;br/&gt;
                    &amp;lt;/dst&amp;gt;&lt;br/&gt;
                    &amp;lt;value&amp;gt;55&amp;lt;/value&amp;gt;&lt;br/&gt;
                  &amp;lt;/nx-reg-load&amp;gt;&lt;br/&gt;
                &amp;lt;/action&amp;gt;&lt;/p&gt;

&lt;p&gt;            &amp;lt;/apply-actions&amp;gt;&lt;br/&gt;
            &amp;lt;order&amp;gt;0&amp;lt;/order&amp;gt;&lt;br/&gt;
        &amp;lt;/instruction&amp;gt;&lt;br/&gt;
    &amp;lt;/instructions&amp;gt;&lt;br/&gt;
    &amp;lt;match&amp;gt;&lt;br/&gt;
        &amp;lt;ethernet-match&amp;gt;&lt;br/&gt;
            &amp;lt;ethernet-type&amp;gt;&lt;br/&gt;
                &amp;lt;type&amp;gt;2048&amp;lt;/type&amp;gt;&lt;br/&gt;
            &amp;lt;/ethernet-type&amp;gt;&lt;br/&gt;
        &amp;lt;/ethernet-match&amp;gt;&lt;br/&gt;
        &amp;lt;ipv4-destination&amp;gt;10.0.0.1/24&amp;lt;/ipv4-destination&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;extension-list xmlns=&quot;urn:opendaylight:openflowplugin:extension:general&quot;&amp;gt;&lt;br/&gt;
          &amp;lt;extension-key xmlns:nxNB=&quot;urn:opendaylight:openflowplugin:extension:nicira:match&quot;&amp;gt;nxNB:nxm-nx-reg0-key&amp;lt;/extension-key&amp;gt;&lt;br/&gt;
          &amp;lt;extension&amp;gt;&lt;br/&gt;
            &amp;lt;nxm-nx-reg xmlns=&quot;urn:opendaylight:openflowplugin:extension:nicira:match&quot;&amp;gt;&lt;br/&gt;
              &amp;lt;reg xmlns:nxSB=&quot;urn:opendaylight:openflowjava:nx:match&quot;&amp;gt;nxSB:nxm-nx-reg0&amp;lt;/reg&amp;gt;&lt;br/&gt;
              &amp;lt;value&amp;gt;42&amp;lt;/value&amp;gt;&lt;br/&gt;
            &amp;lt;/nxm-nx-reg&amp;gt;&lt;br/&gt;
          &amp;lt;/extension&amp;gt;&lt;br/&gt;
        &amp;lt;/extension-list&amp;gt;&lt;/p&gt;

&lt;p&gt;    &amp;lt;/match&amp;gt;&lt;br/&gt;
    &amp;lt;priority&amp;gt;2&amp;lt;/priority&amp;gt;&lt;br/&gt;
    &amp;lt;strict&amp;gt;false&amp;lt;/strict&amp;gt;&lt;br/&gt;
    &amp;lt;table_id&amp;gt;2&amp;lt;/table_id&amp;gt;&lt;br/&gt;
&amp;lt;/flow&amp;gt;&lt;/p&gt;

&lt;p&gt;This flow get installed successfully to the switch. But in config data store this flow is stored under table 0, but when this flow goes to switch it gets install in the table=2 of the switch. It creates problem for the statistics manager, because when it fetches flow data from the switch, flow data contains table=2, but when it look for the respective flow in the table=2 of the config data store, it doesn&apos;t find the flow and it augments the flow in table =2 as a alien flow using specific id, but in reality that flow already exist in the system and present under table=0. This is causing various bugs where user installs the flow, but didn&apos;t find the statistics in the operational data store at the respective location.&lt;/p&gt;

&lt;p&gt;I used mininet with openflow 1.3+ switch for the testing. &lt;/p&gt;

&lt;p&gt;Please let me know if you need any more details to recreate the issue.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="25247">CONTROLLER-693</key>
            <summary>Table-id in restconf uri and flow xml is different, yet flow installs successfully and it creates problem for statistics manager</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="jhajnar@cisco.com">Jan Hajnar</assignee>
                                    <reporter username="Avishnoi">Anil Vishnoi</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Aug 2014 20:06:58 +0000</created>
                <updated>Tue, 25 Jul 2023 08:24:05 +0000</updated>
                            <resolved>Tue, 5 May 2015 15:17:28 +0000</resolved>
                                                                    <component>adsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="48868" author="jgloncak" created="Fri, 15 Aug 2014 08:53:49 +0000"  >&lt;p&gt;Problem is in way how you are combining HTTP method POST and data payload.&lt;/p&gt;

&lt;p&gt;Suppose following data tree: /el1/el2/el3/.../elN&lt;br/&gt;
When you are using POST then:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;uri: /el1/el2/&lt;/li&gt;
	&lt;li&gt;payload: /el3/el4/..../elN&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In your comment there is uri ......./table/0/flow/1234 but data also contains flow element with &amp;lt;id&amp;gt;1234&amp;lt;/id&amp;gt;&lt;/p&gt;

&lt;p&gt;Such using is possible in PUT where&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;uri: /el1/el2/el3&lt;/li&gt;
	&lt;li&gt;payload: /el3/el4/....&lt;br/&gt;
and here is validating equality (for list element) of all keys in URI with keys in payload.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="48869" author="vishnoianil@gmail.com" created="Fri, 15 Aug 2014 09:28:08 +0000"  >&lt;p&gt;Hi Jozef,&lt;/p&gt;

&lt;p&gt;From restconf perspective this is okay, but it&apos;s resulting in incorrect functional behavior. The intent of the bug was to validate the uri data with the body data by the entity that is responsible for installing these flows. I believe its FRM, so it should validate that the flow its going to install in the switch is also stored at the expected location in the data store. If it fails in doing that, network state and data store state is not going to be in sync and that can result in inconsistent behavior of the whole system. &lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Anil&lt;/p&gt;</comment>
                            <comment id="48870" author="vdemcak@cisco.com" created="Mon, 18 Aug 2014 14:32:47 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/10024/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/10024/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="48871" author="vishnoianil@gmail.com" created="Thu, 4 Sep 2014 14:20:18 +0000"  >&lt;p&gt;Above mentioned patch is merged so i tried to test it. So i tested following two scenario (using the example flow i mentioned in bug report)&lt;/p&gt;

&lt;p&gt;URI: &lt;a href=&quot;http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1235&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1235&lt;/a&gt;  (flow id is 1235)&lt;/p&gt;

&lt;p&gt;But in body flow id is 1234 and it resulted in following output &lt;/p&gt;

&lt;p&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&amp;gt;&lt;br/&gt;
&amp;lt;errors &lt;br/&gt;
    xmlns=&quot;urn:ietf:params:xml:ns:yang:ietf-restconf&quot;&amp;gt;&lt;br/&gt;
    &amp;lt;error&amp;gt;&lt;br/&gt;
        &amp;lt;error-type&amp;gt;protocol&amp;lt;/error-type&amp;gt;&lt;br/&gt;
        &amp;lt;error-tag&amp;gt;invalid-value&amp;lt;/error-tag&amp;gt;&lt;br/&gt;
        &amp;lt;error-message&amp;gt;The value &apos;1235&apos; for key &apos;id&apos; specified in the URI doesn&apos;t match the value &apos;1234&apos; specified in the message body. &amp;lt;/error-message&amp;gt;&lt;br/&gt;
    &amp;lt;/error&amp;gt;&lt;br/&gt;
&amp;lt;/errors&amp;gt;&lt;/p&gt;

&lt;p&gt;So this is correct behavior. I tried following second scenario&lt;/p&gt;

&lt;p&gt;URI: URI: &lt;a href=&quot;http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/1234&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/1234&lt;/a&gt;  (table id is 2)&lt;/p&gt;

&lt;p&gt;but in body table-id is 0. When i fire this rest call, postman gives me response status 200 OK, but i do see that controller spit following error &lt;/p&gt;

&lt;p&gt;ERROR o.o.c.frm.impl.FlowForwarder  - TableID in URI tableId=0 and in palyload tableId=2 is not same. &lt;/p&gt;

&lt;p&gt;BUT i can see this flow in config data store under /table/2/flow/1234.&lt;/p&gt;

&lt;p&gt;is this expected behavior ?&lt;/p&gt;</comment>
                            <comment id="48872" author="jhajnar@cisco.com" created="Wed, 10 Sep 2014 12:00:59 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I believe this behavior is correct. &lt;/p&gt;

&lt;p&gt;In the first case, restconf compared keys from the path with keys defined in the payload and found a difference -&amp;gt; this is clearly a mistake and you will get exception when you will try to store flow like this in data store -&amp;gt; you receive error.&lt;/p&gt;

&lt;p&gt;In the second case, table id in the flow is not part of the key so you didn&apos;t get exception. From restconf/data store standpoint this payload is valid. (table id is just one of the parameters of the flow and there is no reference to the parent Table id) But, as you can see in second scenario error was thrown by forwarding rules manager -&amp;gt; this flow didn&apos;t pass forwarding rules manager validation and was not sent to the device. &lt;br/&gt;
There is nothing stopping you from creating invalid flow configuration in config data store. As you said, it is role of plugins that will try to work with this flow (FRM in this case) to validate if flow parameters are sane before sending them to device. You are responsible for removal/modification of this incorrect flow in the config data store.&lt;/p&gt;

&lt;p&gt;I think this bug is fixed because your flow will not get to the device unless you correct your table id -&amp;gt; misbehavior that you described when you created this bug is fixed.&lt;/p&gt;</comment>
                            <comment id="48873" author="jhajnar@cisco.com" created="Thu, 11 Sep 2014 12:24:54 +0000"  >&lt;p&gt;Marking as fixed.&lt;/p&gt;

&lt;p&gt;Related bug for flow config table_id mismatch:&lt;br/&gt;
&lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=1810&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=1810&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="48874" author="carolsand@gmail.com" created="Tue, 5 May 2015 15:17:28 +0000"  >&lt;p&gt;This bug is part of the project to Move all ADSAL associated component bugs to ADSAL.&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>1553</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=1553]]></customfieldvalue>

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

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