<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:34:12 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>[OPNFLWPLUG-1101] Flow descriptors are not cleared when using delete all flows RPC</title>
                <link>https://jira.opendaylight.org/browse/OPNFLWPLUG-1101</link>
                <project id="10155" key="OPNFLWPLUG">OpenFlowPlugin</project>
                    <description>&lt;p&gt;The following RPC is used to delete all flows in the switch:&lt;br/&gt;
POST http://&lt;tt&gt;controller&lt;/tt&gt;:8181/restconf/operations/sal-flow:remove-flow&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
{
    &lt;span class=&quot;code-quote&quot;&gt;&quot;input&quot;&lt;/span&gt;: {
      &lt;span class=&quot;code-quote&quot;&gt;&quot;opendaylight-flow-service:node&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id=&lt;span class=&quot;code-quote&quot;&gt;&apos;openflow:1&apos;&lt;/span&gt;]&quot;&lt;/span&gt;,
      &lt;span class=&quot;code-quote&quot;&gt;&quot;table_id&quot;&lt;/span&gt;: 255
     }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The RPC works fine, however the flow descriptors for the deleted flows are NOT cleared from the flow registry after RPC success because there is no code support for this &quot;special&quot; RPC, only for individual flows as shown here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/gitweb?p=openflowplugin.git;a=blob;f=openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalFlowServiceImpl.java;h=ff1f3c8ea2b4bd6fe613ca80d0a79f49266a74a2;hb=HEAD#l247&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/gitweb?p=openflowplugin.git;a=blob;f=openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalFlowServiceImpl.java;h=ff1f3c8ea2b4bd6fe613ca80d0a79f49266a74a2;hb=HEAD#l247&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because of this code gap, any further attempt to re-program a flow with same ID generates an alien ID:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
2020-08-04T02:26:10,125 | TRACE | epollEventLoopGroup-9-1 | DeviceFlowRegistryImpl           | 362 - org.opendaylight.openflowplugin.impl - 0.8.3 | Removing flow descriptor &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; flow hash : FlowRegistryKeyDto{tableId=255, priority=32768, cookie=0, match=Match{augmentation=[]}}
2020-08-04T02:27:15,999 | TRACE | epollEventLoopGroup-9-1 | DeviceFlowRegistryImpl           | 362 - org.opendaylight.openflowplugin.impl - 0.8.3 | Storing flowDescriptor with table ID : 0 and flow ID : ArpProbe{Link{DC3-FB2-P1-V100-POD-A3-R2-100},host=169.254.1.6} &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; flow hash : FlowRegistryKeyDto{tableId=0, priority=432, cookie=3, match=Match{_ethernetMatch=EthernetMatch{_ethernetType=EthernetType{getType=EtherType{_value=2054}, augmentations={}}, augmentation=[]}, _inPort=Uri{_value=1}, _vlanMatch=VlanMatch{getVlanId=VlanId{getVlanId=VlanId{_value=101}, isVlanIdPresent=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, augmentations={}}, augmentations={}}, augmentation=[]}}
2020-08-04T02:27:16,000 | WARN  | epollEventLoopGroup-9-1 | DeviceFlowRegistryImpl           | 362 - org.opendaylight.openflowplugin.impl - 0.8.3 | Flow with flow ID ArpProbe{Link{DC3-FB2-P1-V100-POD-A3-R2-100},host=169.254.1.6} already exists in table 0, generating alien flow ID
2020-08-04T02:27:16,000 | DEBUG | epollEventLoopGroup-9-1 | DeviceFlowRegistryImpl           | 362 - org.opendaylight.openflowplugin.impl - 0.8.3 | Created alien flow id #UF$TABLE*0-2 &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; table id 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To reproduce:&lt;/p&gt;

&lt;p&gt;1) Start controller with odl-openflowplugin-flow-services-rest feature.&lt;br/&gt;
2) Connect mininet: sudo mn --switch=ovsk,protocols=OpenFlow13 --controller=remote,ip=10.1.75.100&lt;br/&gt;
3) Add flow1 via RPC:&lt;br/&gt;
POST http://&lt;tt&gt;controller&lt;/tt&gt;:8181/restconf/operations/sal-flow:add-flow&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
{
    &lt;span class=&quot;code-quote&quot;&gt;&quot;input&quot;&lt;/span&gt;: {
      &lt;span class=&quot;code-quote&quot;&gt;&quot;opendaylight-flow-service:node&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id=&lt;span class=&quot;code-quote&quot;&gt;&apos;openflow:1&apos;&lt;/span&gt;]&quot;&lt;/span&gt;,
            &lt;span class=&quot;code-quote&quot;&gt;&quot;flow-ref&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id=&lt;span class=&quot;code-quote&quot;&gt;&apos;openflow:1&apos;&lt;/span&gt;]/flow-node-inventory:table[flow-node-inventory:id=&lt;span class=&quot;code-quote&quot;&gt;&apos;0&apos;&lt;/span&gt;]/flow-node-inventory:flow[flow-node-inventory:id=&lt;span class=&quot;code-quote&quot;&gt;&apos;flow1&apos;&lt;/span&gt;]&quot;&lt;/span&gt;,
            &lt;span class=&quot;code-quote&quot;&gt;&quot;priority&quot;&lt;/span&gt;: 432,
            &lt;span class=&quot;code-quote&quot;&gt;&quot;table_id&quot;&lt;/span&gt;: 0,
            &lt;span class=&quot;code-quote&quot;&gt;&quot;buffer_id&quot;&lt;/span&gt;: 4294967295,
            &lt;span class=&quot;code-quote&quot;&gt;&quot;hard-timeout&quot;&lt;/span&gt;: 0,
            &lt;span class=&quot;code-quote&quot;&gt;&quot;match&quot;&lt;/span&gt;: {
                &lt;span class=&quot;code-quote&quot;&gt;&quot;ethernet-match&quot;&lt;/span&gt;: {
                    &lt;span class=&quot;code-quote&quot;&gt;&quot;ethernet-type&quot;&lt;/span&gt;: {
                        &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: 2054
                    }
                },
                &lt;span class=&quot;code-quote&quot;&gt;&quot;in-port&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;openflow:1:1&quot;&lt;/span&gt;,
                &lt;span class=&quot;code-quote&quot;&gt;&quot;vlan-match&quot;&lt;/span&gt;: {
                    &lt;span class=&quot;code-quote&quot;&gt;&quot;vlan-id&quot;&lt;/span&gt;: {
                        &lt;span class=&quot;code-quote&quot;&gt;&quot;vlan-id&quot;&lt;/span&gt;: 101,
                        &lt;span class=&quot;code-quote&quot;&gt;&quot;vlan-id-present&quot;&lt;/span&gt;: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
                    }
                }
            },
            &lt;span class=&quot;code-quote&quot;&gt;&quot;cookie&quot;&lt;/span&gt;: 1,
            &lt;span class=&quot;code-quote&quot;&gt;&quot;flags&quot;&lt;/span&gt;: &quot;&quot;,
            &lt;span class=&quot;code-quote&quot;&gt;&quot;instructions&quot;&lt;/span&gt;: {
                &lt;span class=&quot;code-quote&quot;&gt;&quot;instruction&quot;&lt;/span&gt;: [
                    {
                        &lt;span class=&quot;code-quote&quot;&gt;&quot;order&quot;&lt;/span&gt;: 0,
                        &lt;span class=&quot;code-quote&quot;&gt;&quot;apply-actions&quot;&lt;/span&gt;: {
                            &lt;span class=&quot;code-quote&quot;&gt;&quot;action&quot;&lt;/span&gt;: [
                                {
                                    &lt;span class=&quot;code-quote&quot;&gt;&quot;order&quot;&lt;/span&gt;: 1,
                                    &lt;span class=&quot;code-quote&quot;&gt;&quot;output-action&quot;&lt;/span&gt;: {
                                        &lt;span class=&quot;code-quote&quot;&gt;&quot;max-length&quot;&lt;/span&gt;: 65535,
                                        &lt;span class=&quot;code-quote&quot;&gt;&quot;output-node-connector&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;CONTROLLER&quot;&lt;/span&gt;
                                    }
                                }
                            ]
                        }
                    }
                ]
            },
            &lt;span class=&quot;code-quote&quot;&gt;&quot;idle-timeout&quot;&lt;/span&gt;: 0
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;4) Check flow has correct ID flow1 in operational:&lt;br/&gt;
GET http://&lt;tt&gt;controller&lt;/tt&gt;:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0&lt;br/&gt;
5) Use delete all flows RPC&lt;br/&gt;
6) Re-push same flow changing the cookie=2&lt;br/&gt;
7) Check alien ID is generated in operational:&lt;br/&gt;
GET http://&lt;tt&gt;controller&lt;/tt&gt;:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0&lt;/p&gt;

&lt;p&gt;NOTE: same steps above work fine if instead of using delete all flows RPC, we just delete the individual flow with:&lt;br/&gt;
POST http://&lt;tt&gt;controller&lt;/tt&gt;:8181/restconf/operations/sal-flow:remove-flow using the flow1 body.&lt;/p&gt;</description>
                <environment></environment>
        <key id="33154">OPNFLWPLUG-1101</key>
            <summary>Flow descriptors are not cleared when using delete all flows RPC</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="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="Harshini">Harshini M</assignee>
                                    <reporter username="ecelgp">Luis Gomez</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Aug 2020 04:09:30 +0000</created>
                <updated>Fri, 4 Sep 2020 21:15:52 +0000</updated>
                            <resolved>Fri, 4 Sep 2020 21:15:52 +0000</resolved>
                                                    <fixVersion>Aluminium</fixVersion>
                                    <component>openflowplugin-impl</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="68594" author="ecelgp" created="Thu, 3 Sep 2020 01:12:58 +0000"  >&lt;p&gt;Cherry-pick created, please merge.&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|i03ud3:</customfieldvalue>

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