hashicorp / consul-demo-traffic-splitting

Example application using Docker Compose to demonstrate Consul Service Mesh Traffic Splitting
Mozilla Public License 2.0
23 stars 21 forks source link

invalid config key "Expose" #8

Open shishir-a412ed opened 3 years ago

shishir-a412ed commented 3 years ago

Getting this error when trying to run through the traffic-splitting demo.

Steps to reproduce:

  1. docker-compose up
  2. After the services {web, web-sidecar-proxy, api (v1), api-sidecar-proxy (v1), consul} are up and running, I try to deploy the configuration entries.
  3. I start by deploying the service-defaults configuration entry.

Error message:

$ consul config write l7_config/api_service_defaults.json
Error writing config entry service-defaults/api: Unexpected response code: 400 (Bad request: Request decoding failed: 1 error occurred:
    * invalid config key "Expose"

)

NOTE: I am able to write the service-resolver configuration entry, however I see this error with service-defaults configuration entry.

Version:

SM-smahajan628:consul-demo-traffic-splitting smahajan$ consul --version
Consul v1.9.5
Revision 3c1c22679
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
shishir-a412ed commented 3 years ago

ping @nicholasjackson @judithpatudith

judithpatudith commented 3 years ago

Thanks for reporting this! I work on Terraform now but @karl-cardenas-coding can probably find someone to help out 😄

shishir-a412ed commented 3 years ago

@judithpatudith Thanks! Also, adding @Blake since he is helping me out on an internal (Roblox) slack channel.

Looks like the demo repo is using an older consul version consul 1.6.1 Inside the consul container:

/ # consul version
Consul v1.6.1
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)

Can we update this to the current version 1.9.5?

shishir-a412ed commented 3 years ago

@judithpatudith Looks like if I update consul container to consul 1.9.5 (current version) the issue goes away. I updated the consul version to 1.9.5 here

Followed by:

1. docker-compose build
2. docker-compose up
$ docker exec -it d9415843f1ac /bin/sh
/ # consul version
Consul v1.9.5
Revision 3c1c22679
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)

/ # exit
$ consul config write l7_config/api_service_defaults.json
Config entry written: service-defaults/api

I am closing this issue. You (or whoever is maintaining the repo) might wanna update your consul version to >=1.9.5 🙂 Other users might run into same issue.

shishir-a412ed commented 3 years ago

@judithpatudith @karl-cardenas-coding Looks like the issue is not fully resolved, and the envoy container images in the repo also needs to be updated?

Screen Shot 2021-05-10 at 1 01 54 PM

I am going to reopen the issue for now. And once the images in the repo are updated. I can give it another shot, validate the fix and we can then close the issue.

karl-cardenas-coding commented 3 years ago

@eddie-rowe

ashconnor commented 3 years ago

Updating the consol-envoy docker image in the two docker-compose files, combined with @shishir-a412ed's changes worked for me:

- image: nicholasjackson/consul-envoy:v1.6.1-v0.10.0
+ image: nicholasjackson/consul-envoy:v1.9.2-v1.16.0
karl-cardenas-coding commented 3 years ago

@ashconnor Can you link to the tutorial where you encountered this please?

ashconnor commented 3 years ago

@karl-cardenas-coding - This one https://learn.hashicorp.com/tutorials/consul/service-mesh-traffic-splitting