False HCL validation
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
Tested with Consul:
revision = a82e6a7f
version = 1.5.2
Linux consul1-dev 4.4.0-154-generic #181-Ubuntu SMP Tue Jun 25 05:29:03 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
In config "test.hcl" comma missed before "node_ttl". This file passed "consul agent" and "consul validate" checks, but don't actually load configuration values after missed comma.
```
{
"datacenter": "dc1",
"bind_addr": "127.0.0.1",
"data_dir": "/opt/consul",
"log_level": "INFO",
"server": true,
"bootstrap_expect": 1,
"ui": true,
"addresses": {
"https": "0.0.0.0",
"dns": "127.0.0.1"
},
"ports": {
"dns": 53,
"http": -1,
"https": 8501
},
"dns_config": {
"allow_stale": false,
"service_ttl": {
"*": "0s"
}
"node_ttl": "0s"
},
"key_file": "example.key",
"cert_file": "example.crt",
"ca_file": "example.ca",
"verify_incoming": false,
"verify_incoming_rpc": true,
"verify_outgoing": true,
"verify_server_hostname": true
}
```
Contributor guide
Research direction
Reproduce the report with the provided test.hcl configuration and the stated Consul revision and version, then compare the results of `consul agent` and `consul validate`. Done means validation rejects the missing comma before `node_ttl` instead of accepting the file while silently omitting configuration values.
Written by the indexing model from the issue text.
Assessment
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100