-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consul-template render empty data during consul server raft election/change #1131
Comments
I managed to successfully reproduce this issue in an isolated environment:
|
|
I confirm that I can reproduce this with the latest consul version 1.2.2 with raft version 3 with the following auto pilot settings.
|
vaLski
added a commit
to vaLski/consul-template
that referenced
this issue
Aug 15, 2018
safels and safetree behave exactly like the native ls and tree with one exception. They will *refuse* to render template, if KV prefix query return blank/empty data. This is especially usefull for rendering mission critical files that do not tolerate ls/tree KV queries to return blank data. safels and safetree work in stale mode just as their ancestors but we get extra safety on top. safels and safetree commands were born as an attempt to mitigate issues described here: hashicorp#1131 hashicorp/consul#3975 hashicorp/consul-replicate#82
vaLski
added a commit
to vaLski/consul-template
that referenced
this issue
Aug 15, 2018
safels and safetree behave exactly like the native ls and tree with one exception. They will *refuse* to render template, if KV prefix query return blank/empty data. This is especially usefull for rendering mission critical files that do not tolerate ls/tree KV queries to return blank data. safels and safetree work in stale mode just as their ancestors but we get extra safety on top. safels and safetree commands were born as an attempt to mitigate issues described here: hashicorp#1131 hashicorp/consul#3975 hashicorp/consul-replicate#82
pierresouchay
added a commit
to pierresouchay/consul
that referenced
this issue
Aug 21, 2018
Might avoid doing hashicorp/consul-template#1132 And might fix the following bugs: * hashicorp/consul-replicate#82 * hashicorp#3975 * hashicorp/consul-template#1131
freddygv
pushed a commit
to hashicorp/consul
that referenced
this issue
Aug 23, 2018
…#4554) Ensure that DB is properly initialized when performing stale queries Addresses: - hashicorp/consul-replicate#82 - #3975 - hashicorp/consul-template#1131
FIxed by hashicorp/consul#4554 |
eikenb
pushed a commit
that referenced
this issue
Sep 10, 2019
safels and safetree behave exactly like the native ls and tree with one exception. They will *refuse* to render template, if KV prefix query return blank/empty data. This is especially usefull for rendering mission critical files that do not tolerate ls/tree KV queries to return blank data. safels and safetree work in stale mode just as their ancestors but we get extra safety on top. safels and safetree commands were born as an attempt to mitigate issues described here: #1131 hashicorp/consul#3975 hashicorp/consul-replicate#82
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
During:
ls /path/to/keyprefix
inside ctmplI know that according to the docs consul-template usually should not render anything if it receive error from the consul server. In that case however it seems that it is not receiving error but rather valid empty response from the servers which leads to rendering blank data in the template destination.
I also experienced very similar and very bitter issue, with consul-replicate + stale queries. Under similar scenario (raft leader change/sync) the following data center received blank data from the parent leading to all KVs to be erased on the follower. The issue is not fixed yet and I mitigated it by re-configuring consul-replicate to never use staled queries. Detailed report is available hashicorp/consul-replicate#82
Recently the same issue, also happened with consul-template when used with staled queries. It is only happening during raft re-election/outage recovery etec. I suspect that it is more related to consul which is sending valid but blank answers to the long pooling KV queries during servers outage/raft change. I also reported it here to the consul project but they closed it as not consul related hashicorp/consul#3975
Not sure if this is a strictly consul server bug or issue with consul-template and consul-replicate that are sharing the same presumably buggy code especially while using stale queries. Unfortunately this issue is really, really bad, leading to data loss or incorrect / blank configuration files rendered to template destination. Any suggestions will be greatly appreciated.
Consul Template version
Configuration
part of ctmpl file
Command
Expected behavior
It should render like like that
allow_from = 1.1.1.1 2.2.2.2 3.3.3.3
Actual behavior
allow_from =
Steps to reproduce
References
Are there any other GitHub issues (open or closed) that should
be linked here? For example:
The text was updated successfully, but these errors were encountered: