Closed jgerry closed 7 years ago
Hi @jgerry
That is just a warning. You can see in these lines of your debug log that the template is being rendered.
I'm not seeing any errors in your output.
Let me clarify: the template is being generated, but the value of key SPLUNK_INDEX is rendering as blank. in 0.14 and 0.15 it is being generated properly with the value of SPLUNK_INDEX.
Hi @jgerry
Can you confirm that there is a value for Consul at that particular path? Maybe look in the webui or just use curl:
$ curl http://localhost:8500/v1/kv/velocity/configs/gateway_api/test1/v1/SPLUNK_INDEX
The value definitely exists:
$ consul-cli kv read "velocity/configs/gateway_api/test1/v1/SPLUNK_INDEX" --consul="<redacted>:8500"
man_gapi_preprod
Hi @jgerry
And these are the same Consul cluster and IP? Is there a reason you are not querying localhost:8500 directly? The warning means that the API is not returning a value at that key. That warning has always existed.
The only real change between 0.15.0 and 0.16.0 was the removal of the enforcement of the trailing slash. Can you show me the output of the following please?
curl http://localhost:8500/v1/kv/velocity/configs/gateway_api/test1/v1/SPLUNK_INDEX
Same Consul cluster / IP, yes. Not using localhost as I'm not on the cluster itself, querying from another host, using an ACL.
curl http://<redacted>:8500/v1/kv/velocity/configs/gateway_api/test1/v1/SPLUNK_INDEX\?token\=<redacted>
[{"CreateIndex":2601214,"ModifyIndex":2601242,"LockIndex":0,"Key":"velocity/configs/gateway_api/test1/v1/SPLUNK_INDEX","Flags":0,"Value":"bWFuX2dhcGlfcHJlcHJvZA=="}]%
I have actually put the binaries for 0.14, 0.15, and 0.16 together in the same directory I'm testing from. 0.14 and 0.15 work fine, the exact same command line and configs for 0.16 throw this warning and fail to render the value. 0.14 and 0.15 throw no warnings.
Also note our Consul version is 0.5.2 - the team is working on upgrading that to current 0.7.0 but no ETC on that work.
Hi @jgerry
I've tried to reproduce this issue and I've been unable to. Given that 0.16.0 has been out for quite some time and this is the first reported issue, I'm inclined to believe there is something differing in your setup from mine.
Could you share any additional information about your Consul setup? In particular:
@sethvargo I'm with you, the whole thing seems super odd. I'll go through your steps and see what I can come up with. It'll probably be a day or two to find the time. And thanks for looking into it.
No problem - I'm just baffled. Sorry I don't have a good answer 😦
Hi @jgerry
I've tried a few times, and I'm unable to reproduce this. Without additional information or user-reports, I'm afraid this might be an environmental issue related to your setup. I'm going to close this issue out, but if you stumble across any additional information, please do let me know. I would be happy to jump back into this at any time. Thanks and sorry!
Consul Template version
consul-template v0.16.0
Consul version
0.5.2
Configuration
Command
Debug output
https://gist.github.com/jgerry/5a86513785e9333592bd05ed7fb1be9b
Expected behavior
template should have generated the config file normally. this works fine with 0.14 and 0.15.
Actual behavior
[WARN] ("key(velocity/configs/gateway_api/test1/v1/SPLUNK_INDEX)") Consul returned no data (does the path exist?)
is thrown. the key does exist, this config works fine for 0.14 and 0.15Steps to reproduce