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

check internface status before start bgp #19189

Merged

Conversation

lipxu
Copy link
Contributor

@lipxu lipxu commented Jun 4, 2024

Why I did it

With the following PR, make bgp start after swss.
#12381

bgp started after the swss but still ahead of the interface init.

Jun 12 04:53:59.768546 bjw-can-7050qx-1 NOTICE root: Starting swss service...
...
Jun 12 04:54:12.725418 bjw-can-7050qx-1 NOTICE admin: Starting bgp service...
...
Jun 12 04:54:43.036682 bjw-can-7050qx-1 NOTICE swss#orchagent: :- updatePortOperStatus: Port Ethernet0 oper state set from down to up
Jun 12 04:54:43.191143 bjw-can-7050qx-1 NOTICE swss#orchagent: :- updatePortOperStatus: Port Ethernet4 oper state set from down to up
Jun 12 04:54:43.207343 bjw-can-7050qx-1 NOTICE swss#orchagent: :- updatePortOperStatus: Port Ethernet12 oper state set from down to up

Work item tracking
  • Microsoft ADO (number only):
    26557087

How I did it

Check the interface status before start bgp.
waiting timeout is about 60s, will output a warning message if interface still down.

How to verify it

build debug image, boot the image, check the syslog. and bgp process.

syslog:1098:Jun 3 03:10:30.338071 str-a7060cx-acs-10 INFO bgp#root: [bgpd] It took 0.498398 seconds for interface to become ready

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

debug for bgpd

Signed-off-by: xuliping <xuliping@microsoft.com>

fix build issue

update

update

update

update
@lipxu lipxu requested a review from lguohan as a code owner June 4, 2024 05:45
@StormLiangMS
Copy link
Contributor

hi @lipxu do we have test case to cover this change?

@StormLiangMS
Copy link
Contributor

hi @lipxu could you check the ms_checker failure? I rerun still failed.

@xumia
Copy link
Collaborator

xumia commented Aug 14, 2024

/azpw ms_conflict -f

@lipxu
Copy link
Contributor Author

lipxu commented Aug 15, 2024

hi @lipxu could you check the ms_checker failure? I rerun still failed.

Hi, @StormLiangMS , ms_checker passed, please help to review the PR, thanks

@lipxu
Copy link
Contributor Author

lipxu commented Aug 15, 2024

/azpw ms_conflict -f

Thanks, @xumia , it passed now

Copy link
Contributor

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

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

LGTM

@StormLiangMS StormLiangMS merged commit 08f8cb6 into sonic-net:master Aug 15, 2024
23 checks passed
wen587 added a commit to wen587/sonic-buildimage that referenced this pull request Aug 19, 2024
wangxin pushed a commit that referenced this pull request Aug 19, 2024
@wen587
Copy link
Contributor

wen587 commented Aug 20, 2024

Reverted. so remove 202405 flag here.

matiAlfaro pushed a commit to Marvell-switching/sonic-buildimage that referenced this pull request Aug 21, 2024
Why I did it
With the following PR, make bgp start after swss.
sonic-net#12381

bgp started after the swss but still ahead of the interface init.

Jun 12 04:53:59.768546 bjw-can-7050qx-1 NOTICE root: Starting swss service...
...
Jun 12 04:54:12.725418 bjw-can-7050qx-1 NOTICE admin: Starting bgp service...
...
Jun 12 04:54:43.036682 bjw-can-7050qx-1 NOTICE swss#orchagent: :- updatePortOperStatus: Port Ethernet0 oper state set from down to up
Jun 12 04:54:43.191143 bjw-can-7050qx-1 NOTICE swss#orchagent: :- updatePortOperStatus: Port Ethernet4 oper state set from down to up
Jun 12 04:54:43.207343 bjw-can-7050qx-1 NOTICE swss#orchagent: :- updatePortOperStatus: Port Ethernet12 oper state set from down to up

Work item tracking
Microsoft ADO (number only):
26557087
How I did it
Check the interface status before start bgp.
waiting timeout is about 60s, will output a warning message if interface still down.

How to verify it
build debug image, boot the image, check the syslog. and bgp process.

syslog:1098:Jun 3 03:10:30.338071 str-a7060cx-acs-10 INFO bgp#root: [bgpd] It took 0.498398 seconds for interface to become ready
matiAlfaro pushed a commit to Marvell-switching/sonic-buildimage that referenced this pull request Aug 21, 2024
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.

4 participants