Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACL test fails because of packets received on wrong port #1603

Closed
stepanblyschak opened this issue Apr 23, 2020 · 4 comments · Fixed by #1688
Closed

ACL test fails because of packets received on wrong port #1603

stepanblyschak opened this issue Apr 23, 2020 · 4 comments · Fixed by #1688

Comments

@stepanblyschak
Copy link
Contributor

Description

Steps to reproduce the issue:

  1. Run announce_routes.py test
  2. Run ACL test

Describe the results you received:
All forwarding test cases are failing

All ACL tests that expecting packets can be forwarded are all failed, meanwhile, cases expecting packets to be dropped are all passed.

=================================== FAILURES =================================== 

_______ TestBasicAcl.test_source_ip_match_forwarded[ingress-tor->spine] ________ 

 

self = <test_acl.TestBasicAcl object at 0x7f8af311f3d0> 

setup = {'acl_table_ports': ['Ethernet58', 'Ethernet64', 'Ethernet50', 'Ethernet52', 'Ethernet54', 'Ethernet56', ...], 'dst_ip_spine': '192.168.0.0', 'dst_ip_spine_blocked': '192.168.0.17', 'dst_ip_spine_forwarded': '192.168.0.16', ...} 

direction = 'tor->spine' 

ptfadapter = <common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest> 

counters_sanity_check = [] 

 

    def test_source_ip_match_forwarded(self, setup, direction, ptfadapter, counters_sanity_check): 

        """ test source IP matched packet is forwarded """ 

 

        pkt = self.tcp_packet(setup, direction, ptfadapter) 

        pkt['IP'].src = '20.0.0.2' 

        exp_pkt = self.expected_mask_routed_packet(pkt) 

 

        testutils.send(ptfadapter, self.get_src_port(setup, direction), pkt) 

>       testutils.verify_packet_any_port(ptfadapter, exp_pkt, ports=self.get_dst_ports(setup, direction)) 

 

counters_sanity_check = [] 

direction  = 'tor->spine' 

exp_pkt    = <ptf.mask.Mask instance at 0x7f8af040e0e0> 

pkt        = <Ether  dst=50:6b:4b:8f:d2:40 src=ca:07:62:09:ab:00 type=0x800 |<IP  ihl=None ...1\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-' |>>>> 

ptfadapter = <common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest> 

self       = <test_acl.TestBasicAcl object at 0x7f8af311f3d0> 

setup      = {'acl_table_ports': ['Ethernet58', 'Ethernet64', 'Ethernet50', 'Ethernet52', 'Ethernet54', 'Ethernet56', ...], 'dst_ip_spine': '192.168.0.0', 'dst_ip_spine_blocked': '192.168.0.17', 'dst_ip_spine_forwarded': '192.168.0.16', ...} 

 

acl/test_acl.py:421: 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

/usr/lib/python2.7/dist-packages/ptf/testutils.py:2533: in verify_packet_any_port 

    % (result.port, device_number, ports, result.format())) 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

 

self = <common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest> 

msg = 'Received expected packet on port 16 for device 0, but it should have arrived on one of these ports: [4, 1, 0, 3, 2, 9...   ...... !"#$%&\'()\n0060   2A 2B 2C 2D                                        *+,-\n==============================\n' 

 

    def fail(self, msg=None): 

        """Fail immediately, with the given message.""" 

>       raise self.failureException(msg) 

E       AssertionError: Received expected packet on port 16 for device 0, but it should have arrived on one of these ports: [4, 1, 0, 3, 2, 9, 7, 8, 15, 6, 14, 12, 5, 13, 10, 11]. 

E       ========== RECEIVED ========== 

E       0000   52 54 00 47 1F 5C 50 6B  4B 8F D2 40 08 00 45 00   RT.G.\PkK..@..E. 

E       0010   00 56 00 01 00 00 3F 06  A6 F7 14 00 00 02 C0 A8   .V....?......... 

E       0020   00 00 43 21 00 51 00 00  00 00 00 00 00 00 50 02   ..C!.Q........P. 

E       0030   20 00 7B 85 00 00 00 01  02 03 04 05 06 07 08 09    .{............. 

E       0040   0A 0B 0C 0D 0E 0F 10 11  12 13 14 15 16 17 18 19   ................ 

E       0050   1A 1B 1C 1D 1E 1F 20 21  22 23 24 25 26 27 28 29   ...... !"#$%&'() 

E       0060   2A 2B 2C 2D                                        *+,- 

E       ============================== 

Looks like routes are incorect on T1-LAG, since that was changed recently to anounce routes .

Describe the results you expected:

Additional information you deem important:

**Output of `show version`:**

```

[

"", 

"SONiC Software Version: SONiC.201911.75-898f8789", 

"Distribution: Debian 9.12", 

"Kernel: 4.9.0-11-2-amd64", 

"Build commit: 898f8789", 

"Build date: Tue Apr 21 04:12:19 UTC 2020", 

"Built by: johnar@jenkins-worker-8", 

"", 

"Platform: x86_64-mlnx_msn2700-r0", 

"HwSKU: Mellanox-SN2700-D48C8", 

"ASIC: mellanox", 

"Serial Number: MT1822K07823\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", 

"Uptime: 20:24:09 up 34 min,  0 users,  load average: 1.86, 1.89, 1.82", 

"", 

"Docker images:", 

"REPOSITORY                    TAG                  IMAGE ID            SIZE", 

"docker-syncd-mlnx             201911.75-898f8789   100f77d99f4b        383MB", 

"docker-syncd-mlnx             latest               100f77d99f4b        383MB", 

"docker-router-advertiser      201911.75-898f8789   efbe90e9b5ee        283MB", 

"docker-router-advertiser      latest               efbe90e9b5ee        283MB", 

"docker-sonic-mgmt-framework   201911.75-898f8789   2e83680ed0a1        422MB", 

"docker-sonic-mgmt-framework   latest               2e83680ed0a1        422MB", 

"docker-platform-monitor       201911.75-898f8789   bbe424a12eee        628MB", 

"docker-platform-monitor       latest               bbe424a12eee        628MB", 

"docker-fpm-frr                201911.75-898f8789   28e3353c9656        327MB", 

"docker-fpm-frr                latest               28e3353c9656        327MB", 

"docker-sflow                  201911.75-898f8789   2e51f298e386        307MB", 

"docker-sflow                  latest               2e51f298e386        307MB", 

"docker-lldp-sv2               201911.75-898f8789   b951c33ca175        304MB", 

"docker-lldp-sv2               latest               b951c33ca175        304MB", 

"docker-dhcp-relay             201911.75-898f8789   1eb300fc4f68        293MB", 

"docker-dhcp-relay             latest               1eb300fc4f68        293MB", 

"docker-database               201911.75-898f8789   bb7f8c1f2cae        283MB", 

"docker-database               latest               bb7f8c1f2cae        283MB", 

"docker-teamd                  201911.75-898f8789   6c612ad79548        307MB", 

"docker-teamd                  latest               6c612ad79548        307MB", 

"docker-snmp-sv2               201911.75-898f8789   73f3f05692c8        340MB", 

"docker-snmp-sv2               latest               73f3f05692c8        340MB", 

"docker-orchagent              201911.75-898f8789   80b15b69682a        325MB", 

"docker-orchagent              latest               80b15b69682a        325MB", 

"docker-nat                    201911.75-898f8789   3cd6da80af09        309MB", 

"docker-nat                    latest               3cd6da80af09        309MB", 

"docker-sonic-telemetry        201911.75-898f8789   3c514096e5ab        344MB", 

"docker-sonic-telemetry        latest               3c514096e5ab        344MB" 
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
@msosyak
Copy link
Contributor

msosyak commented Apr 23, 2020

I also faced this issue on the Barefoot platform.

@liat-grozovik
Copy link
Collaborator

it is due to a change done in the sonic mgmt.
is there any ETA for the fix? this reduces the ACL coverage for the 201911 release as well

@wangxin
Copy link
Collaborator

wangxin commented May 13, 2020

I am working on this. Hopefully can have it fixed this week.

@wangxin
Copy link
Collaborator

wangxin commented May 22, 2020

Fixed in #1688.

wangxin added a commit that referenced this issue May 23, 2020
The t1 and t1-lag routes have been changed after replacing static
routes on VM with exabgp announced routes. This caused the acl
testing failed. This PR is to fix this issue reported in #1603.

Changes:
1. Update the acl rules template to use new IP addresses
2. Update the acl script to use new IP addresses

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
shlomibitton pushed a commit to Junchao-Mellanox/sonic-mgmt that referenced this issue Jul 12, 2020
commit d79d500
Author: Xin Wang <xiwang5@microsoft.com>
Date:   Sat May 23 11:31:48 2020 +0800

    Fix acl testing for new t1 routes (sonic-net#1688)

    The t1 and t1-lag routes have been changed after replacing static
    routes on VM with exabgp announced routes. This caused the acl
    testing failed. This PR is to fix this issue reported in sonic-net#1603.

    Changes:
    1. Update the acl rules template to use new IP addresses
    2. Update the acl script to use new IP addresses

    Signed-off-by: Xin Wang <xiwang5@microsoft.com>

commit c84e699
Author: yvolynets-mlnx <50697593+yvolynets-mlnx@users.noreply.github.com>
Date:   Sat May 23 04:41:19 2020 +0300

    [pytest/ntp] Minor fix for NTP test case. (sonic-net#1698)

    Added verification of 'wait_until' result, to easier understand test case failure reason.

    Signed-off-by: Yuriy Volynets <yuriyv@mellanox.com>

commit 441ddfa
Author: Vitaliy Senchyshyn <43479243+vsenchyshyn@users.noreply.github.com>
Date:   Sat May 23 00:40:02 2020 +0300

    [wr_arp][pytest] Fixed wr_arp test (sonic-net#1695)

    * [wr_arp] Fixed wr_arp test

    Signed-off-by: Vitaliy Senchyshyn <vsenchyshyn@barefootnetworks.com>

    * Make show ip protocol command working for different sonic images

    * Fixed review comments

    * Made records variable a class memeber

    * Fixed DIP taking from ip route show for sonic master

commit abdb746
Author: Xin Wang <xiwang5@microsoft.com>
Date:   Fri May 22 18:45:56 2020 +0800

    [pytest/fib]: Fix the issue of using wrong port announcing IPv6 routes (sonic-net#1697)

    I used wrong port for announcing IPv6 routes in PR sonic-net#1692. This PR is to fix that issue.

    Signed-off-by: Xin Wang <xiwang5@microsoft.com>

commit 9e52bba
Author: lguohan <lguohan@gmail.com>
Date:   Fri May 22 03:45:14 2020 -0700

    [pytest/snmp_cpu]: query nproc when ansible facts does not have vcpu info (sonic-net#1693)

    sometimes, ansible facts does not gather vcpu information. in this case, use nproc to query the cpu number directly.

    Signed-off-by: Guohan Lu <gulv@microsoft.com>

commit b175f8f
Author: yvolynets-mlnx <50697593+yvolynets-mlnx@users.noreply.github.com>
Date:   Fri May 22 02:49:30 2020 +0300

    [pytest/test_drop_counters.py] Fixed IGMP test case (sonic-net#1624)

    Signed-off-by: Yuriy Volynets <yuriyv@mellanox.com>

commit 208d02a
Author: Xin Wang <xiwang5@microsoft.com>
Date:   Fri May 22 00:23:19 2020 +0800

    Announce vips routes for bgp_multipath_relax testing (sonic-net#1692)

    Previously the vips routes were statically configured in the VMs for
    bgp_multipath_relax testing. After the change of announcing
    routes from exabgp in PTF to VMs, the vips routes were missing.
    The bgp_multipath_relax testing depends on the vips routes failed.

    This change is to announce the vips routes to VMs  that have the
    vips routes configuration. The functions in the fib fixture definition
    file were refactored a little bit.

    Signed-off-by: Xin Wang <xiwang5@microsoft.com>

commit 6d7498f
Author: yvolynets-mlnx <50697593+yvolynets-mlnx@users.noreply.github.com>
Date:   Thu May 21 11:38:08 2020 +0300

    Fixed fib tests: test_hash_ipv4/test_hash_ipv6 (sonic-net#1683)

    Fixes sonic-net#1679

    Signed-off-by: Yuriy Volynets <yuriyv@mellanox.com>

commit f17471c
Author: Neetha John <nejo@microsoft.com>
Date:   Wed May 20 15:53:44 2020 -0700

    Qos SAI test restructure (sonic-net#1682)

    * Qos SAI test restructure

    Signed-off-by: Neetha John <nejo@microsoft.com>

commit 87f3a23
Author: Joe LeVeque <jleveque@users.noreply.github.com>
Date:   Wed May 20 10:42:22 2020 -0700

    [pytest][cacl] Remove unused 'testbed_devices' from parameters (sonic-net#1689)

commit bd6e135
Author: Ying Xie <yxieca@users.noreply.github.com>
Date:   Wed May 20 08:11:55 2020 -0700

    [reload config] redirect reload config output to /dev/null (sonic-net#1687)

    config reload command will restart interface-config service, which
    will reset eth0. Which will reset the connection issues config
    reload if the output is coming to stdio/stderr. It in turn could
    cause the pytest to stuck for long time.

    Signed-off-by: Ying Xie <ying.xie@microsoft.com>

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants