UpgradeVersionTag not found in config meta block
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
Autopilot ignoring upgrade_version_tag. UpgradeVersionTag is only visible on the leader node, the others have no tag.
#### Overview of the Issue
Getting errors on the consul logs
```
May 20 00:32:45 consul-c9tz consul: 2020-05-20T00:32:45.668Z [ERROR] agent.server.autopilot: UpgradeVersionTag not found in config meta block: upgrade_version_tag=consul_cluster_version
May 20 00:32:45 consul-c9tz consul: 2020-05-20T00:32:45.668Z [ERROR] agent.server.autopilot: UpgradeVersionTag not found in config meta block: upgrade_version_tag=consul_cluster_version
May 20 00:32:45 consul-c9tz consul: 2020-05-20T00:32:45.668Z [ERROR] agent.server.autopilot: UpgradeVersionTag not found in config meta block: upgrade_version_tag=consul_cluster_version```
```
#### Reproduction Steps
Steps to reproduce this issue, eg:
1. Create a cluster with 5 client nodes
Config below
```datacenter = "central-dc"
server = true
bootstrap_expect = 5
data_dir = "/opt/consul/data"
advertise_addr = "10.0.0.63"
client_addr = "0.0.0.0"
log_level = "TRACE"
ui = true
leave_on_terminate = true
# GCP cloud join
retry_join = ["provider=gce project_name=vault-work-276807 tag_value=hashicorp-3ddb72ed-consul"]
performance {
raft_multiplier = 1
}
acl {
enabled = true
default_policy = "allow"
enable_token_persistence = true
tokens {
master = "some-token"
}
}
encrypt = "another-token"
verify_incoming = true
verify_outgoing = true
verify_server_hostname = true
ca_file = "/etc/consul.d/consul-agent-ca.pem"
cert_file = "/etc/consul.d/central-dc-server-consul-0.pem"
key_file = "/etc/consul.d/central-dc-server-consul-0-key.pem"
autopilot {
upgrade_version_tag = "consul_cluster_version"
}
node_meta = {
consul_cluster_version = "0-0-12"
}
```
2. Start consul
`/usr/local/bin/consul agent -config-dir=/etc/consul.d/`
3. Check on the console http://10.0.0.63:8500/ui/central-dc/nodes . CLick on a node and check meta data.
Autopilot health report ok, get config output below.
```
/usr/local/bin/consul operator autopilot get-config
CleanupDeadServers = true
LastContactThreshold = 200ms
MaxTrailingLogs = 250
MinQuorum = 0
ServerStabilizationTime = 10s
RedundancyZoneTag = ""
DisableUpgradeMigration = false
UpgradeVersionTag = "consul_cluster_version"
```
Sys health output
```
curl http://127.0.0.1:8500/v1/operator/autopilot/health | jq
{
"Healthy": true,
"FailureTolerance": 0,
"Servers": [
{
"ID": "529e09cf-dd96-60b6-544c-79fa1f242394",
"Name": "consul-c9tz",
"Address": "10.0.0.61:8300",
"SerfStatus": "alive",
"Version": "1.7.1",
"Leader": true,
"LastContact": "0s",
"LastTerm": 104,
"LastIndex": 3698,
"Healthy": true,
"Voter": true,
"StableSince": "2020-05-20T00:33:48Z"
},
{
"ID": "6f67ff4c-0ab5-e5c7-4b57-d1cbcaed8c76",
"Name": "consul-54lq",
"Address": "10.0.0.193:8300",
"SerfStatus": "alive",
"Version": "1.7.1",
"Leader": false,
"LastContact": "65.126093ms",
"LastTerm": 104,
"LastIndex": 3698,
"Healthy": true,
"Voter": false,
"StableSince": "2020-05-20T00:33:48Z"
},
{
"ID": "e91dd1eb-bf5c-fb13-fc76-e5fedb033bb9",
"Name": "consul-fc0j",
"Address": "10.0.0.4:8300",
"SerfStatus": "alive",
"Version": "1.7.1",
"Leader": false,
"LastContact": "14.792365ms",
"LastTerm": 104,
"LastIndex": 3698,
"Healthy": true,
"Voter": false,
"StableSince": "2020-05-20T00:33:48Z"
},
{
"ID": "6c5919c7-c6b5-aa18-cdfa-b2903a142244",
"Name": "consul-tpl6",
"Address": "10.0.0.192:8300",
"SerfStatus": "alive",
"Version": "1.7.1",
"Leader": false,
"LastContact": "49.800514ms",
"LastTerm": 104,
"LastIndex": 3698,
"Healthy": true,
"Voter": false,
"StableSince": "2020-05-20T00:33:48Z"
},
{
"ID": "b72dc9b1-88fb-87fc-53d8-bcdacc0ac420",
"Name": "consul-c76t",
"Address": "10.0.0.63:8300",
"SerfStatus": "alive",
"Version": "1.7.1",
"Leader": false,
"LastContact": "25.428503ms",
"LastTerm": 104,
"LastIndex": 3698,
"Healthy": true,
"Voter": false,
"StableSince": "2020-05-20T00:33:48Z"
}
]
}
```
### Consul info for both Client and Server
Consul v1.7.1+ent
Contributor guide
Assessment
This issue has not been assessed yet.