hashicorp / hashicorp/consul

consul connect proxy -register-id is not used during registration

Open
#5,136 2 comments 0 reactions 0 assignees View on GitHub
theme/connect type/docs
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

I've starting testing `consul connect` and noticed that when using `-register` the catalog did not match what I expected. After reading the docs and realizing that `-proxy` is appended to the `-service` name one mystery was solved. But then I added `-register-id` to the command line and the catalog was very wrong and didn't match consul output.

_Side note, IMHO appending `-proxy` to service name is non-intuitive and makes the service name wrong in a everything-is-consul-connected world. Also, the outbound proxy connects to the service name (which may not exist) and instead connects to service-proxy which is not what you said on the command line. Way too much magic there._

#### Reproduction Steps

```
consul connect proxy -service redis --service-addr 127.0.0.1:6379 -listen :6377 -register -register-id inbound
...
2018/12/26 12:16:15 [INFO] proxy: registered Consul service: redis-proxy-inbound
...
```

```
consul catalog services | grep redis
redis-proxy
# should be redis-proxy-inbound according to previous output
```

### Consul info for both Client and Server

`Consul v1.4.0`

```
agent:
check_monitors = 0
check_ttls = 1
checks = 1
services = 1
build:
prerelease =
revision = 0bddfa2+
version = 1.4.0
consul:
acl = disabled
known_servers = 1
server = false
runtime:
arch = amd64
cpu_count = 4
goroutines = 78
max_procs = 4
os = darwin
version = go1.11.2
serf_lan:
coordinate_resets = 0
encrypted = false
event_queue = 0
event_time = 16
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 58
members = 5
query_queue = 0
query_time = 1
```

### Operating system and Environment details

Running on OSX

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.