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

config: rename ports.grpc to ports.xds #10588

Merged
merged 6 commits into from
Jul 13, 2021
Merged

Conversation

dnephin
Copy link
Contributor

@dnephin dnephin commented Jul 9, 2021

Now that we have gRPC endpoints (streaming subscribe, and a new one coming in enterprise) that use the regular RPC port it seems likely that we will continue to use the RPC port for any "regular" RPC endpoints.

However, our config has a ports.grpc and addresses.grpc that apply only to the xDS interface. Since the consumer of the xDS interface is quite different from the RPC interface (expected to be localhost, and a Envoy proxy), it seems likely that this port will only ever be used for xDS, and all other things will continue to use the RPC port.

To make our config and documentation less confusing I've renamed this config setting to be xds instead of grpc. This change should be entirely backwards compatible. The old config setting and command line flag both continue to work, and the consul connect envoy command is still able to query for this port with the new name.

TODO:

  • the v2compat integration tests are failing because they use an older CLI with a newer agent. Need to restore the GRPC.Ports to the DebugConfig to keep that working.
  • changelog entry

@dnephin dnephin added theme/config Relating to Consul Agent configuration, including reloading theme/envoy/xds Related to Envoy support labels Jul 9, 2021
@dnephin dnephin requested a review from a team July 9, 2021 19:53
@github-actions github-actions bot added theme/certificates Related to creating, distributing, and rotating certificates in Consul theme/cli Flags and documentation for the CLI interface theme/tls Using TLS (Transport Layer Security) or mTLS (mutual TLS) to secure communication type/docs Documentation needs to be created/updated/clarified labels Jul 9, 2021
@hashicorp-ci
Copy link
Contributor

🤔 This PR has changes in the website/ directory but does not have a type/docs-cherrypick label. If the changes are for the next version, this can be ignored. If they are updates to current docs, attach the label to auto cherrypick to the stable-website branch after merging.

command/agent/agent.go Outdated Show resolved Hide resolved
agent/config/runtime.go Outdated Show resolved Hide resolved
agent/config/runtime.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging July 12, 2021 16:32 Inactive
@vercel vercel bot temporarily deployed to Preview – consul July 12, 2021 16:32 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging July 12, 2021 16:39 Inactive
@vercel vercel bot temporarily deployed to Preview – consul July 12, 2021 16:39 Inactive
@dnephin dnephin requested review from rboyer and a team July 12, 2021 16:52
@dnephin
Copy link
Contributor Author

dnephin commented Jul 12, 2021

Test failures is a known flake and unrelated to this change.

@@ -242,8 +242,8 @@ The options below are all specified on the command-line.
If it is provided after Consul has been initialized with an encryption key, then
the provided key is ignored and a warning will be displayed.

- `-grpc-port` ((#\_grpc_port)) - the gRPC API port to listen on. Default
Copy link
Member

Choose a reason for hiding this comment

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

Since our docs aren't versioned yet, I think we need to keep the two old grpc lines in here, but mark them as deprecated and link them to the new names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunate, but makes sense

Copy link
Member

Choose a reason for hiding this comment

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

Usually when we deprecate stuff like this we also indicate which version of consul it was deprecated in so that folks using older versions can still figure out what's going on for their version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, sorry I missed this comment. I wasn't sure which version this would land in yet. I guess it will be 1.11, so I can add that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@rboyer rboyer left a comment

Choose a reason for hiding this comment

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

LGTM pending the one minor suggestion about retaining the old config keys on the website.

dnephin and others added 4 commits July 13, 2021 12:31
The DebugConfig in the self endpoint can change at any time. It's not a stable API.

With the previous change to rename GRPCPort to XDSPort this command would have broken.
This commit adds the XDSPort to a stable part of the XDS api, and changes the envoy command to read
this new field.

It includes support for the old API as well, in case a newer CLI is used with an older API, and
adds a test for both cases.
Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
The compatv2 integration tests were failing because they use an older CLI version with a newer
HTTP API. This commit restores the GRPCPort field to the DebugConfig output to allow older
CIs to continue to fetch the port.
@dnephin dnephin force-pushed the dnephin/config-fix-ports-grpc branch from aa35514 to b5cd205 Compare July 13, 2021 16:31
@vercel vercel bot temporarily deployed to Preview – consul July 13, 2021 16:32 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging July 13, 2021 16:32 Inactive
@dnephin dnephin merged commit 74fb650 into main Jul 13, 2021
@dnephin dnephin deleted the dnephin/config-fix-ports-grpc branch July 13, 2021 17:11
@hc-github-team-consul-core
Copy link
Contributor

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/408416.

dnephin added a commit that referenced this pull request Sep 8, 2021
…orts-grpc"

This reverts commit 74fb650, reversing
changes made to 58bd817.
@dnephin dnephin mentioned this pull request Sep 8, 2021
dnephin added a commit that referenced this pull request Sep 29, 2021
…orts-grpc"

This reverts commit 74fb650, reversing
changes made to 58bd817.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/certificates Related to creating, distributing, and rotating certificates in Consul theme/cli Flags and documentation for the CLI interface theme/config Relating to Consul Agent configuration, including reloading theme/envoy/xds Related to Envoy support theme/tls Using TLS (Transport Layer Security) or mTLS (mutual TLS) to secure communication type/docs Documentation needs to be created/updated/clarified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants