node_meta keys are not available on Consul server nodes
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
#### Overview of the Issue
We are trying to add the node_meta key to the servers in an existing cluster, and after a reboot / restart of the process it is unavailable (.Node.Meta = null).
But if we launch a new cluster with a `-node-meta` key, the keys are available.
#### Reproduction Steps
1. Run consul cluster 3+ servers node
Configuration file `consul.json`
```
{
"acl": {
"default_policy": "deny",
"down_policy": "extend-cache",
"enabled": true
},
"addresses": {
"dns": "0.0.0.0",
"http": "0.0.0.0"
},
"data_dir": "/var/lib/consul",
"datacenter": "test-dc",
"disable_anonymous_signature": true,
"disable_host_node_id": true,
"disable_remote_exec": true,
"disable_update_check": true,
"dns_config": {
"service_ttl": {
"*": "15s"
},
"soa": {
"min_ttl": 30
}
},
"domain": "test-domain",
"encrypt": "my_secret_key",
"gossip_lan": {
"suspicion_mult": 6
},
"log_file": "/var/log/consul/consul-sd.log",
"log_rotate_max_files": 30,
"node_name": "consul",
"ports": {
"dns": 8600,
"http": 8500
},
"rejoin_after_leave": true,
"server": true,
"start_join": [
"consul01",
"consul02",
"consul03"
],
"ui": true,
"verify_incoming": false,
"verify_outgoing": false
}
```
docker-compose.yaml
```
version: '3'
services:
consul01: &consul-server
image: consul:1.7.2
hostname: consul01
networks:
- consul-demo
volumes:
- /config/consul01.json:/consul/config/consul01.json
command: "agent --config-dir /consul/config"
consul02:
<<: *consul-server
hostname: consul02
volumes:
- /config/consul02.json:/consul/config/consul02.json
consul03:
<<: *consul-server
hostname: consul03
volumes:
- /config/consul03.json:/consul/config/consul03.json
ports:
- "8400:8400"
- "8500:8500"
- "8600:8600"
- "8600:8600/udp"
command: "agent -bootstrap --config-dir /consul/config"
networks:
consul-demo:
```
2. Bootstrap ACL & check that the node meta is missing
```
consul acl bootstrap
curl -s --header "X-Consul-Token: " 127.0.0.1:8500/v1/catalog/nodes | jq
```
3. Add node-meta for existing process
Configuration file `consul.json`
```
...
"node_meta": {
"key": "value"
},
...
```
4. Reload process
```
/bin/kill -HUP
```
5. check if node-meta appeared
```
curl -s --header "X-Consul-Token: " 127.0.0.1:8500/v1/catalog/nodes | jq
```
### Operating system and Environment details
OS: Debian Stretch
Deployment: 5 server nodes and ~ 800 client nodes
Version: 1.7.2
Contributor guide
Assessment
This issue has not been assessed yet.