<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:22:08 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>[NETVIRT-659] TCP communication is working, even remove the TCP SG rule from the VM instance.</title>
                <link>https://jira.opendaylight.org/browse/NETVIRT-659</link>
                <project id="10144" key="NETVIRT">netvirt</project>
                    <description>&lt;p&gt;Setup Used:&lt;/p&gt;

&lt;p&gt;1. 3 node ODL cluster + HA proxy&lt;br/&gt;
2. new netvirt (carbon)&lt;br/&gt;
3. Packstack with ocata.&lt;/p&gt;


&lt;p&gt;Steps followed for testing:&lt;/p&gt;

&lt;p&gt;Scenario 1:&lt;br/&gt;
------------&lt;br/&gt;
1.Created Network.&lt;br/&gt;
2. Created 2 VM&apos;s&lt;br/&gt;
3.Created SG1 with TCP ALL rule.&lt;br/&gt;
4. Created SG2 without any rule.&lt;br/&gt;
5.Applied SG1 to both the VM&apos;s.&lt;br/&gt;
6.Observed TCP communication is working for Ingress and Egress as well.&lt;br/&gt;
7.Removed SG1 rule and Applied SG2 to both Vm&apos;s during TCP communication.&lt;/p&gt;

&lt;p&gt;Observations:&lt;br/&gt;
---------------&lt;br/&gt;
1) Observed TCP communication still working  in same session for Ingress and Egress as well.&lt;/p&gt;

&lt;p&gt;2) Observed   TCP communication is does not working with a new session for Ingress and Egress as well.&lt;/p&gt;

&lt;p&gt;Scenario 2:&lt;br/&gt;
-----------&lt;br/&gt;
1.Created Network.&lt;br/&gt;
2. Created 2 VM&apos;s&lt;br/&gt;
3.Created SG1 with TCP ALL rule.&lt;br/&gt;
4.Applied SG1 to both the VM&apos;s.&lt;br/&gt;
5.Observed TCP communication is working for Ingress and Egress as well.&lt;br/&gt;
6.Removed TCP ALL rule from both the VM&apos;s during TCP communication.&lt;/p&gt;


&lt;p&gt;Observations:&lt;br/&gt;
---------------&lt;br/&gt;
1) Observed TCP communication still working  in same session for Ingress and Egress as well.&lt;/p&gt;

&lt;p&gt;2) Observed   TCP communication is does not working with a new session for Ingress and Egress as well.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="20580">NETVIRT-659</key>
            <summary>TCP communication is working, even remove the TCP SG rule from the VM instance.</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="vinothb">Vinoth B</assignee>
                                    <reporter username="HariPrasidh">Hari Prasidh</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 May 2017 12:41:28 +0000</created>
                <updated>Thu, 3 May 2018 14:37:00 +0000</updated>
                            <resolved>Thu, 5 Apr 2018 20:46:47 +0000</resolved>
                                    <version>Carbon</version>
                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="37780" author="arthi.b@hcl.com" created="Fri, 26 May 2017 12:43:05 +0000"  >&lt;p&gt;While evaluating the bug, we have found an another issue. &lt;br/&gt;
Ref: &lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=8553&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=8553&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="37781" author="hariprasidh" created="Tue, 30 May 2017 07:22:49 +0000"  >&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;I&apos;ve tested the same scenario with Any SG rule (TCP/ICMP/UDP) and observed the issue.&lt;/p&gt;</comment>
                            <comment id="37782" author="aswins" created="Tue, 30 May 2017 08:27:48 +0000"  >&lt;p&gt;This is since conntrack entries are not deleted when a SG rule is deleted. We need to find a way to prevent the traffic corresponding the deleted rules not hitting +est. One way to workaround this is add a higher priority drop rule to match the traffic corresponding to deleted rule with a timeout.&lt;/p&gt;</comment>
                            <comment id="37783" author="vinothb" created="Thu, 15 Jun 2017 07:25:20 +0000"  >&lt;p&gt;Observation - 1:&lt;/p&gt;

&lt;p&gt;Created 2 VMs with ICMP ALL rule.. When ping operation begin between 2 VMs , the below conntrack entry has been created,&lt;/p&gt;

&lt;p&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;  &lt;span class=&quot;error&quot;&gt;&amp;#91;root@ocata-compute1 ~&amp;#93;&lt;/span&gt;# conntrack -L | grep icmp&lt;br/&gt;
conntrack v1.4.3 (conntrack-tools): 38 flow entries have been shown.&lt;br/&gt;
icmp 1 19 src=20.0.0.5 dst=20.0.0.12 type=8 code=0 id=31489 src=20.0.0.12 dst=20.0.0.5 type=0 code=0 id=31489 mark=0 zone=6002 use=1&lt;/p&gt;

&lt;p&gt;This entry will be available until we stopped the ping communication.&lt;/p&gt;

&lt;p&gt;When we remove the ICMP rule from the SG, Ongoing communication is not getting disturbed because the respective conntrack entry &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; is still exists and make the communication to be successful.&lt;/p&gt;


&lt;p&gt;Observation - 2:&lt;/p&gt;

&lt;p&gt;Executed the same test case in pure openstack and observered that ongoing communication has been stopped and respective conntrack rule also removed, when we remove the rule.&lt;/p&gt;</comment>
                            <comment id="37784" author="aswins" created="Thu, 15 Jun 2017 09:12:45 +0000"  >&lt;p&gt;As mentioned earlier we could add a higher priority rule to drop the traffic. The delete action will overwrite the commit flow with a drop flow of higher priority with a timeout. The value for timeout for each protocol can be selected from &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;https://github.com/opendaylight/netvirt/blob/master/vpnservice/aclservice/impl/src/main/yang/aclservice-config.yang&lt;/p&gt;</comment>
                            <comment id="37785" author="vinothb" created="Mon, 19 Jun 2017 09:44:08 +0000"  >&lt;p&gt;Observation - 3:&lt;/p&gt;

&lt;p&gt;Setup : pure openstack with OVS firewall,&lt;/p&gt;

&lt;p&gt;1. Created 1 VM with ICMP ALL ingress rule and it installs the below specified flows in the flow table.&lt;/p&gt;

&lt;p&gt;        &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; cookie=0xa99821b3245d1aa6, duration=95.226s, table=82, n_packets=23, n_bytes=2254, reset_counts priority=70,ct_state=+est-rel-rpl,icmp,reg5=0x4,dl_dst=fa:16:3e:7c:07:75 actions=pop_vlan,output:4	&lt;/p&gt;

&lt;p&gt;        &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; cookie=0xa99821b3245d1aa6, duration=95.225s, table=82, n_packets=1, n_bytes=98, reset_counts priority=70,ct_state=+new-est,icmp,reg5=0x4,dl_dst=fa:16:3e:7c:07:75 actions=ct(commit,zone=NXM_NX_REG6&lt;span class=&quot;error&quot;&gt;&amp;#91;0..15&amp;#93;&lt;/span&gt;),pop_vlan,output:4&lt;/p&gt;

&lt;p&gt;        &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; Kernal conntrack entry flow&lt;br/&gt;
        &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; SG flow&lt;/p&gt;

&lt;p&gt;2. Pinged from DHCP to VM and observed that the first packet is going through the SG flow and further packets are hitting the kernal conntrack entry flow.&lt;/p&gt;

&lt;p&gt;3. When we delete the ICMP ingress rule, the on going communication has been stopped because the respective conntrack kernal entry flow is also getting deleted along with the SG flow.&lt;/p&gt;

&lt;p&gt;But in ODL, since we have only one global Kernal conntrack entry flow for all the VMs, The ongoing communication is still succeeded even though we removed the SG rule from VM.&lt;/p&gt;</comment>
                            <comment id="37786" author="vinothb" created="Tue, 20 Jun 2017 10:03:57 +0000"  >&lt;p&gt;(In reply to Vinoth B from comment #6)&lt;br/&gt;
&amp;gt; Observation - 3:&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; Setup : pure openstack with OVS firewall,&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; 1. Created 1 VM with ICMP ALL ingress rule and it installs the below&lt;br/&gt;
&amp;gt; specified flows in the flow table.&lt;br/&gt;
&amp;gt;  &lt;br/&gt;
&amp;gt;         &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; cookie=0xa99821b3245d1aa6, duration=95.226s, table=82,&lt;br/&gt;
&amp;gt; n_packets=23, n_bytes=2254, reset_counts&lt;br/&gt;
&amp;gt; priority=70,ct_state=+est-rel-rpl,icmp,reg5=0x4,dl_dst=fa:16:3e:7c:07:75&lt;br/&gt;
&amp;gt; actions=pop_vlan,output:4	&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt;         &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; cookie=0xa99821b3245d1aa6, duration=95.225s, table=82,&lt;br/&gt;
&amp;gt; n_packets=1, n_bytes=98, reset_counts&lt;br/&gt;
&amp;gt; priority=70,ct_state=+new-est,icmp,reg5=0x4,dl_dst=fa:16:3e:7c:07:75&lt;br/&gt;
&amp;gt; actions=ct(commit,zone=NXM_NX_REG6&lt;span class=&quot;error&quot;&gt;&amp;#91;0..15&amp;#93;&lt;/span&gt;),pop_vlan,output:4&lt;br/&gt;
&amp;gt;         &lt;br/&gt;
&amp;gt;         &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; Kernal conntrack entry flow&lt;br/&gt;
&amp;gt;         &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; SG flow&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; 2. Pinged from DHCP to VM and observed that the first packet is going&lt;br/&gt;
&amp;gt; through the SG flow and further packets are hitting the kernal conntrack&lt;br/&gt;
&amp;gt; entry flow.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; 3. When we delete the ICMP ingress rule, the on going communication has been&lt;br/&gt;
&amp;gt; stopped because the respective conntrack kernal entry flow is also getting&lt;br/&gt;
&amp;gt; deleted along with the SG flow.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; But in ODL, since we have only one global Kernal conntrack entry flow for&lt;br/&gt;
&amp;gt; all the VMs, The ongoing communication is still succeeded even though we&lt;br/&gt;
&amp;gt; removed the SG rule from VM.&lt;/p&gt;

&lt;p&gt;Shall i proceed the way how OVS firewall handles this issue? I mean adding the conntrack-Kernel entry per rule instead of common for all the VMs.&lt;/p&gt;</comment>
                            <comment id="37787" author="aswins" created="Tue, 20 Jun 2017 11:18:40 +0000"  >&lt;p&gt;Adding a +est rule per vm defeat the purpose of using connection tracking in my opinion. An established packet  need to traverse through all the rules which is added per vm before we have a hit. &lt;/p&gt;

&lt;p&gt;I would suggest adding a drop rule on deletion would be better solution. A similar proposal implemented in OVN&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;,&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;https://github.com/openvswitch/ovs/commit/cc58e1f2cc414b844c36d21a9a39e4f3383e75e4&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;https://mail.openvswitch.org/pipermail/ovs-dev/2016-February/065716.html&lt;/p&gt;</comment>
                            <comment id="37788" author="vinothb" created="Fri, 23 Jun 2017 12:37:15 +0000"  >&lt;p&gt;Aswin,&lt;/p&gt;

&lt;p&gt;The DROP flow fix is fine. &lt;/p&gt;

&lt;p&gt;Fix Explanation :&lt;/p&gt;

&lt;p&gt;    When we delete a specific SG rule from the VM, netvirt should add the high priority drop rule with the exact match condition with idle timeout. This drop flow will stops the existing communication.&lt;/p&gt;

&lt;p&gt;    Similarly, When we add a same rule again, netvirt should remove the added drop flow to make the existing stopped communication to be resumed. &lt;/p&gt;

&lt;p&gt;We have to look on below problem before starting the implementation.&lt;br/&gt;
 Consider we are associating two ALL ICMP Ingress rule to one VM. So, we could see two ICMP ingress flow with different priority for the same VM. When we delete one ICMP ingress rule from the VM, then we will add one drop rule as per the fix above, which make the existing communication to break irrespective of exact ICMP ingress flow still exists in the flow table.&lt;br/&gt;
So before adding the drop rule,  we have to check whether the VM associated with similar rule or not. &lt;/p&gt;

&lt;p&gt;Apart from this, this approach is fine. Shall | start the implementation for this fix?&lt;/p&gt;</comment>
                            <comment id="37789" author="vinothb" created="Mon, 10 Jul 2017 06:14:35 +0000"  >&lt;p&gt;I have pushed a draft patch to fix this issue.&lt;/p&gt;

&lt;p&gt;Netvirt:&lt;br/&gt;
   &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/60077/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/60077/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fix provided:&lt;/p&gt;

&lt;p&gt;Added a DROP rule with idle_timeout(5 secs) when we delete or remove the SG from the VM. If we add the same rule again to the VM, Netvirt will delete the added DROP rule and make the existing communication to be resume.&lt;/p&gt;

&lt;p&gt;Limitations :&lt;/p&gt;

&lt;p&gt;1) When we add the two similar rules to the VMs (SG1 with ALL ICMP ingress, SG2 with ALL ICMP ingress), there are two ALL ICMP ingress flow will be exists in the flow table with different priority. while removing SG1 from VM, as per the above fix, the DROP rule will be added which stops the existing ICMP communication irrespective of there is another similar rule (SG2) is still exist in the VM.&lt;/p&gt;

&lt;p&gt;2) After establishing SSH communication between VMs, TCP doesn&apos;t send packets continuously. So the added DROP flow is getting removed from the flow table after reaching the idle timeout 5 secs. Observed the same behavior also for SCP communication&lt;/p&gt;</comment>
                            <comment id="37790" author="aswins" created="Mon, 10 Jul 2017 07:31:33 +0000"  >&lt;p&gt;The draft is not accessible. Please publish the patch or add reviewers.&lt;/p&gt;</comment>
                            <comment id="37791" author="vinothb" created="Wed, 9 Aug 2017 05:30:11 +0000"  >&lt;p&gt;Since the fix having some limitation, I am working on the new approach which will resolve all the limitation.&lt;/p&gt;

&lt;p&gt;The new approach involves pipeline changes, So I have pushed the spec patch.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/60580/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/60580/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="62104" author="shague@redhat.com" created="Thu, 5 Apr 2018 20:46:47 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/66788&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/66788&lt;/a&gt;&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>8400</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=8400]]></customfieldvalue>

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

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