sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
176 stars 703 forks source link

VLAN test cases are passing only after removing PTF docker before running it #849

Open rajneeshaec opened 5 years ago

rajneeshaec commented 5 years ago

If we run the VLAN test case twice without remove topo and adding topo the test case will fail because of IPv6 ND PACKETS received by PTF docker.

rajneeshaec commented 5 years ago

Logs:- "AssertionError: Did not receive expected packets on port 2 for device 0.", "========== EXPECTED ==========", "dst : DestMACField = 'ff:ff:ff:ff:ff:ff' (None)", "src : SourceMACField = '00:22:00:00:00:02' (None)", "type : XShortEnumField = 2048 (0)", "--", "version : BitField = 4 (4)", "ihl : BitField = None (None)", "tos : XByteField = 0 (0)", "len : ShortField = None (None)", "id : ShortField = 1 (1)", "flags : FlagsField = 0 (0)", "frag : BitField = 0 (0)", "ttl : ByteField = 64 (64)", "proto : ByteEnumField = 1 (0)", "chksum : XShortField = None (None)", "src : Emph = '192.168.0.1' (None)", "dst : Emph = '192.168.0.2' ('127.0.0.1')", "options : PacketListField = [] ([])", "--", "type : ByteEnumField = 8 (8)", "code : MultiEnumField = 0 (0)", "chksum : XShortField = None (None)", "id : ConditionalField = 0 (0)", "seq : ConditionalField = 0 (0)", "ts_ori : ConditionalField = 19953165 (19953165)", "ts_rx : ConditionalField = 19953165 (19953165)", "ts_tx : ConditionalField = 19953165 (19953165)", "gw : ConditionalField = '0.0.0.0' ('0.0.0.0')", "ptr : ConditionalField = 0 (0)", "reserved : ConditionalField = 0 (0)", "addr_mask : ConditionalField = '0.0.0.0' ('0.0.0.0')", "unused : ConditionalField = 0 (0)", "--", "load : StrField = '' ('')", "--", "load : StrField = '0000000000000000000000000000000000000000000000000000000000' ('')", "--", "0000 FF FF FF FF FF FF 00 22 00 00 00 02 08 00 45 00 .......\"......E.", "0010 00 56 00 01 00 00 40 01 F9 52 C0 A8 00 01 C0 A8 .V....@..R......", "0020 00 02 08 00 82 8A 00 00 00 00 30 30 30 30 30 30 ..........000000", "0030 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000", "0040 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000", "0050 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000", "0060 30 30 30 30 0000", "========== RECEIVED ==========", "16 total packets. Displaying most recent 3 packets:", "------------------------------", "dst : DestMACField = '33:33:00:00:00:16' (None)", "src : SourceMACField = '00:02:c9:08:14:01' (None)", "type : XShortEnumField = 34525 (0)", "--", "version : BitField = 6L (6)", "tc : BitField = 0L (0)", "fl : BitField = 0L (0)", "plen : ShortField = 36 (None)", "nh : ByteEnumField = 0 (59)", "hlim : ByteField = 1 (64)", "src : SourceIP6Field = 'fe80::202:c9ff:fe08:1401' (None)", "dst : IP6Field = 'ff02::16' ('::1')", "--", "nh : ByteEnumField = 58 (59)", "len : FieldLenField = 0 (None)", "autopad : _PhantomAutoPadField = 1 (1)", "options : _HopByHopOptionsField = [<RouterAlert otype=Router Alert [00: skip, 0: Don't change en-route] optlen=2 value=Datagram contains a MLD message |>, <PadN otype=PadN [00: skip, 0: Don't change en-route] optlen=0 |>] ([])", "--", "load : StrField = '\x8f\x00~\xf4\x00\x00\x00\x01\x04\x00\x00\x00\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x08\x14\x01' ('')", "--", "0000 33 33 00 00 00 16 00 02 C9 08 14 01 86 DD 60 00 33.............", "0010 00 00 00 24 00 01 FE 80 00 00 00 00 00 00 02 02 ...$............", "0020 C9 FF FE 08 14 01 FF 02 00 00 00 00 00 00 00 00 ................", "0030 00 00 00 00 00 16 3A 00 05 02 00 00 01 00 8F 00 ......:.........", "0040 7E F4 00 00 00 01 04 00 00 00 FF 02 00 00 00 00 ~...............", "0050 00 00 00 00 00 01 FF 08 14 01 ..........", "------------------------------", "dst : DestMACField = '33:33:00:00:00:02' (None)", "src : SourceMACField = '00:02:c9:08:14:01' (None)", "type : XShortEnumField = 34525 (0)", "--", "version : BitField = 6L (6)", "tc : BitField = 0L (0)", "fl : BitField = 0L (0)", "plen : ShortField = 16 (None)", "nh : ByteEnumField = 58 (59)", "hlim : ByteField = 255 (64)", "src : SourceIP6Field = 'fe80::202:c9ff:fe08:1401' (None)", "dst : IP6Field = 'ff02::2' ('::1')", "--", "type : ByteEnumField = 133 (133)", "code : ByteField = 0 (0)", "cksum : XShortField = 49430 (None)", "res : IntField = 0 (0)", "--", "type : ByteField = 1 (1)", "len : ByteField = 1 (1)", "lladdr : MACField = '00:02:c9:08:14:01' ('00:00:00:00:00:00')", "--", "0000 33 33 00 00 00 02 00 02 C9 08 14 01 86 DD 60 00 33.............", "0010 00 00 00 10 3A FF FE 80 00 00 00 00 00 00 02 02 ....:...........", "0020 C9 FF FE 08 14 01 FF 02 00 00 00 00 00 00 00 00 ................", "0030 00 00 00 00 00 02 85 00 C1 16 00 00 00 00 01 01 ................", "0040 00 02 C9 08 14 01 ......", "------------------------------", "dst : DestMACField = '33:33:00:00:00:16' (None)", "src : SourceMACField = '00:02:c9:08:14:01' (None)", "type : XShortEnumField = 34525 (0)", "--", "version : BitField = 6L (6)", "tc : BitField = 0L (0)", "fl : BitField = 0L (0)", "plen : ShortField = 36 (None)", "nh : ByteEnumField = 0 (59)", "hlim : ByteField = 1 (64)", "src : SourceIP6Field = 'fe80::202:c9ff:fe08:1401' (None)", "dst : IP6Field = 'ff02::16' ('::1')", "--", "nh : ByteEnumField = 58 (59)", "len : FieldLenField = 0 (None)", "autopad : _PhantomAutoPadField = 1 (1)", "options : _HopByHopOptionsField = [<RouterAlert otype=Router Alert [00: skip, 0: Don't change en-route] optlen=2 value=Datagram contains a MLD message |>, <PadN otype=PadN [00: skip, 0: Don't change en-route] optlen=0 |>] ([])", "--", "load : StrField = '\x8f\x00~\xf4\x00\x00\x00\x01\x04\x00\x00\x00\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x08\x14\x01' ('')", "--", "0000 33 33 00 00 00 16 00 02 C9 08 14 01 86 DD 60 00 33............`.", "0010 00 00 00 24 00 01 FE 80 00 00 00 00 00 00 02 02 ...$............", "0020 C9 FF FE 08 14 01 FF 02 00 00 00 00 00 00 00 00 ................", "0030 00 00 00 00 00 16 3A 00 05 02 00 00 01 00 8F 00 ......:.........", "0040 7E F4 00 00 00 01 04 00 00 00 FF 02 00 00 00 00 ~...............", "0050 00 00 00 00 00 01 FF 08 14 01 ..........", "==============================", "", "", "----------------------------------------------------------------------", "Ran 1 test in 3.965s", "", "FAILED (failures=1)" ]

rajneeshaec commented 5 years ago

If we remove the PTF docker and add it again then test case will pass and PTF docker will not complain about IPv6 ND Packets.

vincent201881 commented 5 years ago

Hi, rajneeshaec: I never tested passed the vlan test, I try your method to reboot the ptf, but when run the case couldn't ssh the ptf docker. Can you describe in detail the process and what adjustments have been made to the test script in your environment?

rajneeshaec commented 5 years ago

Could you please try to do ssh to PTF docker manually username: root Pwd: root

dawnbeauty commented 5 years ago

@rajneeshaec The test already show up

The ipv6 nd would not impact the test result. Could you capture all packets on dst ports and compare the two pcaps?