hashicorp / hashicorp/consul

Consul DNS query is returning the nodes that are in maintenance mode

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

Description

If you have a question, please direct it to the
[consul mailing list](https://www.consul.io/community.html) if it hasn't been
addressed in either the [FAQ](https://www.consul.io/docs/faq.html) or in one
of the [Consul Guides](https://www.consul.io/docs/guides/index.html).

When filing a bug, please include the following:

### `consul version` for both Client and Server
Client: `0.7.4`
Server: `0.7.4`

### `consul info` for both Client and Server
Client:
```
agent:
check_monitors = 0
check_ttls = 0
checks = 1
services = 0
build:
prerelease =
revision = '1c442cb
version = 0.7.4
consul:
known_servers = 5
server = false
runtime:
arch = amd64
cpu_count = 72
goroutines = 36
max_procs = 72
os = linux
version = go1.7.5
serf_lan:
encrypted = false
event_queue = 0
event_time = 4291
failed = 34
health_score = 0
intent_queue = 0
left = 2
member_time = 192908
members = 94
query_queue = 0
query_time = 5876
```

Server:
```
Same build as Client
```

### Operating system and Environment details
Linux 3.10.0-514.10.2.el7.x86_64
### Description of the Issue (and unexpected/desired result)
Based on the document https://www.consul.io/docs/commands/maint.html nodes that are set in Maintenance mode should not be appear in the DNS query. But seems like this is not working as expected.

I am able to ping the Node after setting it in the maintenance mode.

### Reproduction steps
sh-4.2# consul maint - enable
sh-4.2# consul maint
Node:
Name: toolkit-d08wh
Reason: Maintenance mode is enabled for this node, but no reason was provided. This is a default message.

sh-4.2# ping toolkit-d08wh.node.dc1.com
PING toolkit-d08wh.node.dc1.com (10.0.33.23) 56(84) bytes of data.
64 bytes from toolkit-d08wh (10.0.33.23): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from toolkit-d08wh (10.0.33.23): icmp_seq=2 ttl=64 time=0.021 ms
64 bytes from toolkit-d08wh (10.0.33.23): icmp_seq=3 ttl=64 time=0.019 ms
64 bytes from toolkit-d08wh (10.0.33.23): icmp_seq=4 ttl=64 time=0.027 ms

Appreciate you time and suggestions.

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.