Skip to content

[KubeSonic] Add bmp container watchdog #22352

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

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

FengPan-Frank
Copy link
Contributor

Why I did it

Add bmp container watchdog, so that bmp could be managed/upgraded via k8s path.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Add watchdog docker container with health check returned directly, will fill health check logic in following PR.

How to verify it

image verfication.

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)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@FengPan-Frank FengPan-Frank force-pushed the bmp_k8s branch 2 times, most recently from 8f0e02b to f00ce64 Compare April 17, 2025 04:23
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).


fn main() {
// Start a HTTP server listening on port 50058
let listener = TcpListener::bind("127.0.0.1:50058")
Copy link
Contributor

Choose a reason for hiding this comment

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

50058 is an ephemeral port ( /proc/sys/net/ipv4/ip_local_port_range).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just refer existing code

let listener = TcpListener::bind("127.0.0.1:50058")

Copy link
Contributor

Choose a reason for hiding this comment

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

@maipbui
Could you please check this as well?
If we bind a TCP server to the port in the dynamic range that isn’t reserved in /proc/sys/net/ipv4/ip_local_reserved_ports, bind() may sometimes fail because another program might be using that port.

Copy link
Contributor

Choose a reason for hiding this comment

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

@FengPan-Frank

I missed this PR: #17907, so using 50058 is also correct now.

@qiluo-msft qiluo-msft requested review from ganglyu and zbud-msft April 23, 2025 21:41
@qiluo-msft qiluo-msft merged commit 884b847 into sonic-net:master Apr 24, 2025
19 checks passed
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