-
Notifications
You must be signed in to change notification settings - Fork 18
Go-based custom dataplane with the new control plane APIs #44
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, great work!
Having all of this work in a few days is very impressive!
Some general comments:
- Each commit should be buildable and testable on its own. In this PR you have commits which depend on future commits.
- Having both
go-dataplane
anddataplane
as well ascl-dataplane
is confusing to me. We can keepdataplane
for the old dataplane which will be deprecated once we switch to xDS. But I would change the new xDS go dataplane to be co-located with the envoy one (cl-dataplane
). Simply add a new CLI flag which will allow choosing between the two.
nits:
- I advise we use a uniform commit message format. < component >: < Short description of change >/n/n< Long description of change >/n/nSigned-off-by: Your Name your@email.com
- Many error logging can be removed since they are redundant.
- IMO Connection-level logging should be debug instead of info.
- Look for extra spaces in strings and log lines missing an ending
.
.
Since this is a relatively big PR, I didn't thoroughly reviewed every line, but instead did a quick-pass.
I plan to do a more through pass when this gets close to be merged.
pkg/dataplane/server/forwarder.go
Outdated
} | ||
} | ||
|
||
func (f *forwarder) start() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (f *forwarder) start() { | |
func (f *forwarder) run() error { |
I would propagate errors from the spawned go-routines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two errors from the dataplane forwarder. The errors might not be needed downstream since closure of one socket by the application results in an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should make sure that if one go-routine fails, the other should also quit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, just verified that closeConnections should be called within the the routines so that the functions quit and properly terminate the connection. What I meant was that the error from the two routines doesn't need to be propagated since any normal closure of client connection will eventually lead to an error in connection due to closed socket.
Co-authored-by: Or Ozeri <or@ozery.com>
Co-authored-by: Or Ozeri <or@ozery.com>
Co-authored-by: Or Ozeri <or@ozery.com>
Thanks Or for the detailed comments. I started the changes from your repo. Hence, the commits initially were in a bulk :) . |
The tests work for me. @kfirtoledo @orozery : Can you please check if the e2e test configuration is correct?
|
@orozery I have addressed most of the comments. Would you mind if I do the dataplane + controller reorg as part of another PR? I just want to make sure the old dataplane code is removed before I make the changes. |
remove formatting directive from log.Error call
@praveingk please take a look at my last commit intended to make the linting pass. While fixing the double import of
Please consider if the commit makes the right changes or revert/amend appropriately |
Initial basic go dataplane which is integrated with the new control plane xds and APIs.
Based on #37