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

e2e grpcproxy tests #8277

Merged
merged 11 commits into from
Jul 21, 2017
Merged

Conversation

heyitsanthony
Copy link
Contributor

Enables -tags cluster_proxy for e2e.

Turns out a lot of stuff was broken! Skips v3 auth tests for now.

@gyuho
Copy link
Contributor

gyuho commented Jul 18, 2017

Does caae11e need backport to 3.2 branch?

Will backport dbd16d5 only.

@heyitsanthony
Copy link
Contributor Author

@gyuho no need to backport the transport one-- there's special cases everywhere to set it in the tls.Config derived from the tlsinfo. The snapshot EOF patch seems worth backporting though.

@gyuho
Copy link
Contributor

gyuho commented Jul 18, 2017

What is EndpointsJSON for?

@heyitsanthony
Copy link
Contributor Author

@gyuho EndpointsJSON wasn't needed; removed

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm. thanks!

for i := 0; i < len(cfg.tlsArgs); i++ {
switch cfg.tlsArgs[i] {
case "--cert-file":
tlsArgs = append(tlsArgs, "--cert", cfg.tlsArgs[i+1], "--cert-file", cfg.tlsArgs[i+1])
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we have duplicate flags "--cert-file", cfg.tlsArgs[i+1] (for etcd) in etcd grpc-proxy command?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

--cert is proxy <-> etcd (in grpcproxy already), --cert-file is client <-> proxy (new)

switch os.Args[1] {
cmd := os.Args[1]
if covArgs := os.Getenv("ETCDCOV_ARGS"); len(covArgs) > 0 {
args := strings.Split(os.Getenv("ETCDCOV_ARGS"), "\xe7\xcd")[1:]
Copy link
Contributor

Choose a reason for hiding this comment

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

What is \xe7\xcd?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

string separator, in case there's a space in the arguments; etcdctl has something similar since the arguments can't be passed via command line when enabling coverage instrumentation

Some functions take a TLSInfo to generate a tls.Config and there was no
way to force the InsecureSkipVerify flag.
Was defaulting to PeerTLSInfo for client connections to the etcd cluster.
Since proxy users may rely on this behavior, only use the client tls
info if given, and fall back to peer tls otherwise.
Gets "code = OutOfRange desc = EOF" errors otherwise.
Was dropping the last argument in the slice.
@heyitsanthony heyitsanthony merged commit 2eb9353 into etcd-io:master Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants