You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consul kv dedup storage should be maintained by Consul-Template. Stale /consul-template/dedup/<md5>/{data,lock} keys should be cleaned up automatically.
Actual behavior
Many unused old dedup data and lock keys are left in the Consul kv dedup storage.
What's strange is that /lock keys are not cleaned up by Consul's Session TTL mechanism when consul-template instances are shut down gracefully. But the /lock keys are cleaned up when consul-template instances are killed.
The /data keys are not cleaned up in any case.
Run it in an empty directory on a host with consul and consul-template installed. It might be required to run several times to reproduce the problem.
Questions
Does consul-template really need two keys per template hash (both /data and /lock) for deduplication? I believe one key would be sufficient. Consul-template could acquire a session lock on /data key. To determine if the template is already rendered a custom flag on the key could be used.
The text was updated successfully, but these errors were encountered:
bofm
pushed a commit
to bofm/consul-template
that referenced
this issue
Jan 21, 2019
Consul Template version
v0.19.5 and master (fd266d9)
Expected behavior
Consul kv dedup storage should be maintained by Consul-Template. Stale
/consul-template/dedup/<md5>/{data,lock}
keys should be cleaned up automatically.Actual behavior
Many unused old dedup
data
andlock
keys are left in the Consul kv dedup storage.What's strange is that
/lock
keys are not cleaned up by Consul's Session TTL mechanism when consul-template instances are shut down gracefully. But the/lock
keys are cleaned up when consul-template instances are killed.The
/data
keys are not cleaned up in any case.Steps to reproduce
A script to run the testcase and it's output:
https://gist.github.com/bofm/677de0b543a071bab68bf77d070d6c3a
Run it in an empty directory on a host with consul and consul-template installed. It might be required to run several times to reproduce the problem.
Questions
Does consul-template really need two keys per template hash (both
/data
and/lock
) for deduplication? I believe one key would be sufficient. Consul-template could acquire a session lock on/data
key. To determine if the template is already rendered a custom flag on the key could be used.The text was updated successfully, but these errors were encountered: