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

Cannot start sidecar proxy if the -sidecar-for has capital letters exactly matching the proxying service id #6765

Open
nitsh opened this issue Nov 11, 2019 · 2 comments
Labels
needs-investigation The issue described is detailed and complex.

Comments

@nitsh
Copy link
Contributor

nitsh commented Nov 11, 2019

Overview of the Issue

Cannot start sidecar proxy if the -sidecar-for has capital letters exactly matching the proxying service id

Reproduction Steps

  1. Register a service on consul agent with following service config :
{
  "services": [
  {
    "id": "Service_A",
    "name": "Service_A",
    "port": 80,
    "connect": {
      "sidecar_service": {
        "proxy": {
          "upstreams": [
            {
              "destination_name": "service_x",
              "local_bind_port": 11000
            }
          ]
        }
      }
    }
  }
]
} 
  1. Run consul connect proxy -sidecar-for Service_A will fail
  2. Run consul connect proxy -sidecar-for service_a will be successful

Probable Root Cause

The code does strings.ToLower before comparing with -sidecar-for value : https://github.com/hashicorp/consul/blob/master/command/connect/proxy/proxy.go#L230

@schristoff schristoff added the needs-investigation The issue described is detailed and complex. label Nov 12, 2019
@stale
Copy link

stale bot commented Jan 11, 2020

Hey there,
We wanted to check in on this request since it has been inactive for at least 60 days.
If you think this is still an important issue in the latest version of Consul
or its documentation please reply with a comment here which will cause it to stay open for investigation.
If there is still no activity on this issue for 30 more days, we will go ahead and close it.

Feel free to check out the community forum as well!
Thank you!

@stale stale bot added the waiting-reply Waiting on response from Original Poster or another individual in the thread label Jan 11, 2020
@jamesnyika
Copy link

I can confirm that this is still an issue.
Workaround is to just change all your names and IDs for services to lower case.

@ghost ghost removed waiting-reply Waiting on response from Original Poster or another individual in the thread labels Feb 10, 2020
shoenig added a commit to hashicorp/nomad that referenced this issue Apr 27, 2021
…haracters

This PR adds job-submission validation that checks for the use of uppercase characters
in group and service names for services that make use of Consul Connect. This prevents
attempting to launch services that Consul will not validate correctly, which in turn
causes tasks to fail to launch in Nomad.

Underlying Consul issue: hashicorp/consul#6765

Closes #7581 #10450
shoenig added a commit to hashicorp/nomad that referenced this issue Apr 27, 2021
…haracters

This PR adds job-submission validation that checks for the use of uppercase characters
in group and service names for services that make use of Consul Connect. This prevents
attempting to launch services that Consul will not validate correctly, which in turn
causes tasks to fail to launch in Nomad.

Underlying Consul issue: hashicorp/consul#6765

Closes #7581 #10450
shoenig added a commit to hashicorp/nomad that referenced this issue Apr 27, 2021
…haracters

This PR adds job-submission validation that checks for the use of uppercase characters
in group and service names for services that make use of Consul Connect. This prevents
attempting to launch services that Consul will not validate correctly, which in turn
causes tasks to fail to launch in Nomad.

Underlying Consul issue: hashicorp/consul#6765

Closes #7581 #10450
shoenig added a commit to hashicorp/nomad that referenced this issue Apr 27, 2021
…haracters

This PR adds job-submission validation that checks for the use of uppercase characters
in group and service names for services that make use of Consul Connect. This prevents
attempting to launch services that Consul will not validate correctly, which in turn
causes tasks to fail to launch in Nomad.

Underlying Consul issue: hashicorp/consul#6765

Closes #7581 #10450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-investigation The issue described is detailed and complex.
Projects
None yet
Development

No branches or pull requests

3 participants