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

GoBgp client cli capability #6539

Closed
wants to merge 1 commit into from
Closed

Conversation

rajnkamr
Copy link
Contributor

@rajnkamr rajnkamr commented Jul 22, 2024

Add GoBGP client cli capability to Antrea Agent
gobgp image size is 15 MB

#6189

@luolanzone
Copy link
Contributor

I am not sure I get the point of this PR, please add more details in the PR summary to clarify what you want to implement in this PR.

@rajnkamr
Copy link
Contributor Author

rajnkamr commented Jul 23, 2024

I am not sure I get the point of this PR, please add more details in the PR summary to clarify what you want to implement in this PR.

Details available in #6189 ( #6541 )

Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

Let's discuss in #6189 before committing to an approach for this

@rajnkamr rajnkamr force-pushed the gobgp branch 3 times, most recently from 58af939 to d73f352 Compare August 6, 2024 06:17
@rajnkamr rajnkamr changed the title [WIP] gobgp client cli capability GoBgp client cli capability Aug 6, 2024
@rajnkamr rajnkamr marked this pull request as ready for review August 6, 2024 08:29
@rajnkamr rajnkamr added the area/transit/bgp Issues or PRs related to BGP support. label Aug 7, 2024
build/images/base/Dockerfile.ubi Outdated Show resolved Hide resolved
build/images/deps/bgp-version Outdated Show resolved Hide resolved
@rajnkamr rajnkamr force-pushed the gobgp branch 3 times, most recently from ee21e74 to 8a05cd4 Compare August 29, 2024 09:08
Makefile Outdated Show resolved Hide resolved
build/images/base/Dockerfile Outdated Show resolved Hide resolved
build/images/base/Dockerfile Outdated Show resolved Hide resolved
build/images/base/Dockerfile.ubi Outdated Show resolved Hide resolved
build/images/base/Dockerfile Outdated Show resolved Hide resolved
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

In the commit message, please indicate the increase in image size for antrea/antrea-agent-ubuntu:latest because of this change (uncompressed image size, which can be obtained with docker images).

build/images/base/Dockerfile Outdated Show resolved Hide resolved
build/images/base/Dockerfile Outdated Show resolved Hide resolved
build/images/base/Dockerfile.ubi Outdated Show resolved Hide resolved
build/images/base/Dockerfile Outdated Show resolved Hide resolved
build/images/base/Dockerfile Outdated Show resolved Hide resolved
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

LGTM
I would like @tnqn to take a look at it as well to make sure he is ok with the increase in image size, especially considering the ongoing work for #6646

@antoninbas antoninbas requested a review from tnqn September 6, 2024 17:23
@rajnkamr rajnkamr added action/release-note Indicates a PR that should be included in release notes. kind/documentation Categorizes issue or PR as related to a documentation. labels Sep 10, 2024
GoBGP client binary size is ~15MB

Signed-off-by: Rajnish Kumar <rajnishk1@vmware.com>
@tnqn
Copy link
Member

tnqn commented Sep 19, 2024

@antoninbas Thanks for checking my opinion.

@rajnkamr Can you update the description to point to the right issue #6541? #6189 barely provides any information.

However, #6541 doesn't have information about how the gobgp CLI can/will be used either, it says "advanced live debugging", but without a single example. Does antrea-agent even open a socket for gobgp CLI to connect? I don't find such socket. Have you validated any command can work?

Besides, is it right to open such socket to introduce another source of truth of bgp routes? Unlike the typical gobgpd and gobgp case that the latter is used to configure the former, we only leverage the gobgp library to implement bgp using the BGPPolicy as the source of truth. Maybe it could be helpful in read-only mode but I guess there is no permission control in such granularity once the socket is there. Who is supposed to use the CLI, users, developers, or both?

Lastly, I remember there was a topic to have other BGP implementations if required, I suppose gobgp CLI won't work for other implementations?

@tnqn
Copy link
Member

tnqn commented Sep 19, 2024

Generally we should avoid adding things to image when there is no strong reason. Despite of the image size, every dependency comes with CVEs and maintenance efforts. If the reason is just maybe helpful for some scenarios (and in the particular case non use case has been shown), maybe let's at least defer to when users/developers have to install gobgp themselves to address their use cases?

Actually there are many useful networking tools I frequently use when debugging: netstat, tcpdump, etc., which are even more common and frequently used than gobgp. You can imagine the impact to image size if all of them are added. At least it's not a problem for me to install tools / use ephemeral containers when there is a need.

@rajnkamr
Copy link
Contributor Author

We are utilizing the GoBGP library directly within Antrea, rather than deploying the standalone gobgpd binary. As a result, the gRPC-based interface typically exposed by gobgpd is not available. Consequently, external tools or clients, such as the GoBGP CLI (gobgp), which rely on gRPC to connect to gobgpd, will not be able to interface with Antrea's BGP server operating on port 179.

So to manage and configure the BGP server within Antrea, currently interactions will be conducted only via the Antrea API or CLI (antctl). Hence we will have to continuously enhance antctl by incorporating additional commands to support more functionality.

To fully support advanced debugging commands provided with gobgp binary, a comprehensive solution would involve rewriting gobgp to align with our current architecture. It could be long term solution or we could just continue enhancing antctl with more commands as par with gobgp binary.

@rajnkamr rajnkamr removed this from the Antrea v2.2 release milestone Sep 24, 2024
@rajnkamr rajnkamr removed kind/documentation Categorizes issue or PR as related to a documentation. action/release-note Indicates a PR that should be included in release notes. labels Sep 24, 2024
@rajnkamr rajnkamr closed this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/transit/bgp Issues or PRs related to BGP support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants