Skip to content

Add check and waiting for exabgp http server#1813

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:check_http_api_port
Jun 28, 2020
Merged

Add check and waiting for exabgp http server#1813
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:check_http_api_port

Conversation

@bingwang-ms
Copy link
Collaborator

Description of PR

Summary:
Fixes # (issue)
Add check and waiting for exabgp http server to get ready.

Type of change

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

Approach

What is the motivation for this PR?

The exabgp plugin has a problem in handling 'started' state:
The start_exabgp method only checks the status returned by supervisorctl,

def start_exabgp(module, name):
    refresh_supervisord(module)
    exec_command(module, cmd="supervisorctl start exabgp-%s" % name)

    for count in range(0, 60):
        time.sleep(1)
        status = get_exabgp_status(module, name)
        if u'RUNNING' == status:
            break
    assert u'RUNNING' == status

However, the http service (implemented in http_api.py) may be not ready at that time. As a result, the following call announce_route raises an exception.
Actually, it takes more than 20 seconds for http server gets ready after running http_api.py in vtestbed.

How did you do it?

Add an End-to-End check and wait after exabgp('started'), until http server is ready.

How did you verify/test it?

Run test_bgp_speaker.py and test_announce_routes.py in my vtestbed.

Any platform specific information?

No.

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

No.

Documentation

No.

@bingwang-ms bingwang-ms requested a review from wangxin June 24, 2020 11:54
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please align the code and remove extra spaces around =.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add argument module_ignore_errors=True. Otherwise this step will raise exception after PR #1786 is merged.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.
Thank you so much!

@bingwang-ms bingwang-ms force-pushed the check_http_api_port branch from a405ab6 to 0ed6962 Compare June 28, 2020 08:55
@bingwang-ms bingwang-ms force-pushed the check_http_api_port branch from 0ed6962 to af541ab Compare June 28, 2020 09:02
@bingwang-ms bingwang-ms merged commit 664a586 into sonic-net:master Jun 28, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
linkmgrrd:
* d6518dd 2022-06-14 | Fix IP header checksum in handleSendSwitchCommand (sonic-net#88) (HEAD -> 202205, github/202205) [Jing Zhang]

swss:
* 4430445 2022-06-03 | Add port counter sanity check (sonic-net#2300) (HEAD -> 202205, github/202205) [Junhua Zhai]
* 01b017c 2022-05-28 | [counter] Support gearbox counters (sonic-net#2218) [Junhua Zhai]

utilities:
* ce96543 2022-05-26 | [subinterface]Avoid removing the subinterface when last configured ip is removed (sonic-net#2181) (HEAD -> 202205, github/202205) [Sudharsan Dhamal Gopalarathnam]
* ed97c6f 2022-05-26 | [subinterface] Fix route add command to accept subinterface as dev (sonic-net#2180) [Sudharsan Dhamal Gopalarathnam]
* 53ff644 2022-06-09 | [gendump] Add Support to dump BCM-DNX commands (sonic-net#1813) [saksarav-nokia]
* 0e31790 2022-06-15 | [config][muxcable] fix minor config DB logic issue (sonic-net#2210) [vdahiya12]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
#### Why I did it
Update submodule pointer for swss to include recent changes

4f1d726 [portsorch] fix errors when moving port from one lag to another. (sonic-net#1797)
ae44701 [orchagent] Put port configuration to APPL_DB according to autoneg mode (sonic-net#1769)
5295f91 Add failure handling for SAI get operations (sonic-net#1768)
7c7c451 Revert recirc port change (sonic-net#1813)
5528ebf Cleanup code (sonic-net#1814)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants