Skip to content

Update master from Azure/Sonic - August 12th, 2019#15

Merged
joeslazaro merged 42 commits intoIGNW:masterfrom
sonic-net:master
Aug 13, 2019
Merged

Update master from Azure/Sonic - August 12th, 2019#15
joeslazaro merged 42 commits intoIGNW:masterfrom
sonic-net:master

Conversation

@joej164
Copy link

@joej164 joej164 commented Aug 12, 2019

Description of PR

Summary:
Fixes # (issue)

Type of change

  • [] Bug fix
  • [] Testbed and Framework(new/improvement)
  • [] Test case(new/improvement)

Approach

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

dawnbeauty and others added 30 commits July 28, 2019 13:59
[pytest] adding ability to use stdout callback plugin when running ansible module
[pytest ansible_host] Support 'module_ignore_errors' option

Signed-off-by: Zhiqian Wu [email protected]

Description of PR
Summary:

- stdout callback

With stdout callback plugin, we could get pretty-printed output of ansible module results.
It is simple and convenient to read the outputs or print dict/list objects.
So i add a function dump_ansible_results to do that. 'yaml' is the default stdout callback plugin, back port from ansible 2.5 in PR #1005 , you may choose another plugin whenever calling dump_ansible_results.

- module_ignore_errors

We need to ignore errors when execute some cmds with non-zero return codes.

Signed-off-by: Zhiqian Wu <[email protected]>
* [loganalyzer] Fix the match_file_list accumulating issue

The match_file_list is not initialized to empty list when it is used.
The side effect is that when the log analyzer is called multiple times,
test match file used in earlier analysis will be used in later analysis
and cause issue. The fix is to initialize match_file_list to empty list
before using it.

Signed-off-by: Xin Wang <[email protected]>
CRM testing may fail because CRM stats was not updated yet
while checking the counters. Main purpose of this change is
to increase the time waiting for CRM update from 2 seconds
to 4 seconds. Two other improvements:
* Decrease the time waiting for CRM counters update from
300 seconds to 30 seconds. The 300 seconds waiting is
unnecessary.
* Use a single redis-cli command to get used and available
counters rather than two commands.

Signed-off-by: Xin Wang <[email protected]>
Change-Id: Ib1e7b8c35a20ecb1aae8629749e3ad10e6269add
Signed-off-by: Stepan Blyschak <[email protected]>
* Fix error in warm-reboot command

* Specify warm-reboot optional parameters
…e issues

There are two issues with pytest-ansible I found:
- ansible_adhoc is limited to function scope which makes it not usable for wider scope test fixtures
- localhost fixture has some hidden dependency on ansible_adhoc (even without changing default scope)
  e.g.:

   def test_x(ansible_adhoc, testbed):
       duthost = AnsibleHost(ansible_adhoc, testbed['dut'])
       pass

   def test_y(ansible_adhoc, localhost, testbed):
       pass

  This snippet of test code fails to evaluate localhost fixture in test_y:

  test_x.py::test_x PASSED                                                                                                                                                                                                            [ 50%]
  test_x.py::test_y ERROR                                                                                                                                                                                                             [100%]

  Part of error log:

        host = self.get_host(hostname)
        if host is None:
>           raise AnsibleError("no host vars as host is not in inventory: %s" % hostname)
E           AnsibleError: ERROR! no host vars as host is not in inventory: arc-switch1025

Signed-off-by: Stepan Blyschak <[email protected]>
…trol PTF traffic from sonic-mgmt node

Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
… cases for lldp should be done in pytest

Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Stepan Blyschak and others added 12 commits August 1, 2019 11:58
Signed-off-by: Stepan Blyschak <[email protected]>
…bour entry (#1026)

* [neighbour-mac-noptf]
1. fix the issue which "when" doesn't work when it is in a nested "block" statement
2. don't use the hardcoded "Ethernet0" since in topo t1-lag it belongs a PortChannel and to set ip address on such kind of interface causes orchagent terminated.
   choice a valiable routed interface for test instead.
[show_interface.py]
1. add "vlan" to int_status dict

* [neighbour-mac-noptf]
don't use an ary/neighbour which is a bgp neighbour to do the updating neighbour's mac test,
doing in that way can cause bgp connection down and a large number of routing entries withdrawed,
failing orchagent to handle neighbour mac update in time.
use a newly added address and neighbor on an automatically selected routing interface for that test instead.

* remove unnecessary condition check

* [neighbour-mac-noptf] select routing_interface only from interfaces whose oper_state are 'up' and remove startup interface stuffs

* [neighbour-mac-noptf] select fixed interface for testing.

* [neighbour-mac-noptf]
1. fix the issue which "when" doesn't work when it is in a nested "block" statement
2. alway use a static arp/neighbour for testing, since the dynamic entries are of the BGP neighbors and to change their mac address causes bgp neighbour down and route withdrew, making system busy and unable to handle mac update in time.
   we use Ethernet0 for t0 and t1, PortChannel0002 for t1-lag

* Revert "[neighbour-mac-noptf] select fixed interface for testing."

This reverts commit 181a522.

* [neighbour-mac-noptf] add comment for item.value['vlan'] to avoid confusion.
PTF docker container is pulled and created while add-topo.
By default, the PTF docker image with "latest" tag is always
pulled. This change added a variable for specifying PTF
image tag while add-topo. The variable value can be
specified via CLI option. If the variable value is not given,
default "latest" value will be used.

Signed-off-by: Xin Wang <[email protected]>
[pytest] improvements for pytest infrastructure
On Mellanox SPC there are 3 maximum mirror sessions or
2 mirror sessions if session attribute update is performed

to avoid no resource error remove first a session and then
route, otherwise session will be updated with changed dest
mac of default route next hop

Signed-off-by: Stepan Blyschak <[email protected]>
* Improvements: 1. start arp_responder just once. 2. Use one tunnel two tunnel maps approach
* [vlan_trunk] stabilize vlan trunk test

- use 'config' commands to brind down/up interfaces
- generate 'Vlan<VID>': {} in config to specify this interface belongs to global vrf as it is required (TODO: use config CLI instead);
- wait longer time after LAG shutdown;
  Test tries to configure LAG as part of VLAN interface which will fail if LAG is a RIF.
  Since RIF in SONiC is removed only when the ref_count becomes 0, we'll have to wait for orchagent
  to remove all routes, next hop groups, neighbors that reference those LAG RIFs.
  The time is required is not very deterministic and can differ between platforms but it is assumed 90 sec is enough.
  One other way to do this test is to create seperate PortChannels.
  Also, it looks that master has significantly slower performence to remove routes, next hops then 201811 branch.

Signed-off-by: Stepan Blyschak <[email protected]>

* Revert delay before RIF remove back to 10s
@joeslazaro joeslazaro merged commit 602829f into IGNW:master Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.