Consul issues 301 response to deregister requests with / in the service ID
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
Consul version: v0.7.2
Registrator version: gliderlabs/registrator:latest as of 03/21/2017
### `consul info` for both Client and Server
Server:
```
agent:
check_monitors = 0
check_ttls = 1
checks = 1
services = 99
build:
prerelease =
revision = 'a9afa0c
version = 0.7.2
consul:
bootstrap = true
known_datacenters = 1
leader = false
leader_addr = 10.17.5.3:8300
server = true
raft:
applied_index = 5719646
commit_index = 5719646
fsm_pending = 0
last_contact = 1.300176ms
last_log_index = 5719646
last_log_term = 228
last_snapshot_index = 5715259
last_snapshot_term = 228
latest_configuration = [{Suffrage:Voter ID:10.17.5.2:8300 Address:10.17.5.2:8300} {Suffrage:Voter ID:10.17.5.3:8300 Address:10.17.5.3:8300} {Suffrage:Voter ID:10.17.5.1:8300 Address:10.17.5.1:8300}]
latest_configuration_index = 4494318
num_peers = 2
protocol_version = 1
protocol_version_max = 3
protocol_version_min = 0
snapshot_version_max = 1
snapshot_version_min = 0
state = Follower
term = 228
runtime:
arch = amd64
cpu_count = 2
goroutines = 78
max_procs = 2
os = linux
version = go1.7.3
serf_lan:
encrypted = false
event_queue = 0
event_time = 4
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 9
members = 3
query_queue = 0
query_time = 1
serf_wan:
encrypted = false
event_queue = 0
event_time = 1
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 1
members = 1
query_queue = 0
query_time = 1
```
### Operating system and Environment details
Oracle Linux 7
### Description of the Issue (and unexpected/desired result)
Unable to deregister a service with "tcp://" in the ID fails. Consul seems to issue a 301 to deregister requests with extra / in them. Note that I'm not looking for "tcp://" or the like to be supported in ID's but when cleaning up stuff that other people have broken (such as I am now) it'd be nice to be able to remove them.
### Reproduction steps
Run Consul
Run Registrator
Run container with -e "SERVICE_ID=tcp://something:somethingtest:someport"
Shut down container
### Log Fragments or Link to [gist](https://gist.github.com/)
[gist](https://gist.github.com/gregwalters/b448427ddbe99c858d2159cb37c39151)
Contributor guide
Assessment
This issue has not been assessed yet.