Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/test_vrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,8 @@ def setup_bgp_with_loopback(self, duthost, ptfhost, cfg_facts):
# deploy start script
ptfhost.template(src="vrf/bgp_speaker/start.j2", dest="%s/%s" % (exabgp_dir, 'start.sh'), mode="u+rwx")

# kill exabgp if any
ptfhost.shell("pkill exabgp || true")
# Send SIGTERM to exabgp processes if any
ptfhost.shell("pkill -f exabgp || true")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will kill other exabgp session on the backend network, so it is not feasible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lguohan: There is a backend network on the PTF host?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I believe the proper fix here is for the VRF test to utilize the exabgp PyTest fixture for exabgp which is used by the PyTest version of the BGP speaker test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all exabgp should use the exabgp ansible module to manage. bgp_speaker should also be refactored.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any issue tracking this? I would like to make sure before I close this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not find an open issue, so I created one: #1914


# start exabgp instance
ptfhost.shell("bash %s/start.sh" % exabgp_dir)
Expand All @@ -864,8 +864,8 @@ def setup_bgp_with_loopback(self, duthost, ptfhost, cfg_facts):
for (vrf, vlan_peer_port), ips in g_vars['vlan_peer_ips'].iteritems():
duthost.shell("vtysh -c 'configure terminal' -c 'no ip route {} {} vrf {}'".format(peer_range, ips['ipv4'][0], vrf))

# kill exabgp
ptfhost.shell("pkill exabgp || true")
# Send SIGTERM to exabgp processes if any
ptfhost.shell("pkill -f exabgp || true")

# del speaker ips from ptf ports
for vrf, vlan_peer_port in g_vars['vlan_peer_ips']:
Expand Down