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
When a change in state results in only changes to files creates by writeToFile then a process reload is not triggered. It is unclear if this is a bug or intended behaviour, but the documentation doesn't indicate that writeToFile outputs are not evaluated when determining if there should be a reload.
When dynamicValue is changed in any set member,
Then output file created by writeToFile is updated,
And the reload signal is sent to the managed process.
Actual behavior
When dynamicValue is changed in any set member,
Then output file created by writeToFile is updated,
And the reload signal is NOT sent to the managed process.
Steps to reproduce
Run consul template with example config, template and mock process. After first load, change one of the dynamic values in the k/v store.
It appears that because none of the template output is changed, then when CT diffs the output it determines reload is not necessary.
References
N/A
Mitigations
It appears that adding {{timestamp}} to the parent template forces a re-render with changes, thus triggering the reload. It isn't clear if this is an appropriate mitigation, as I am unsure if the reload could be triggered before all writeToFile outputs a written to disk.
When a change in state results in only changes to files creates by
writeToFile
then a process reload is not triggered. It is unclear if this is a bug or intended behaviour, but the documentation doesn't indicate thatwriteToFile
outputs are not evaluated when determining if there should be a reload.Consul Template version
0.35.0 OSX
0.35.0 Debian (via Docker)
Configuration
Template
K/V Sample data at testKeys
Managed Process
Command
Debug output
Logs Demoing issue: https://gist.github.com/davidatkinsondoyle/b0bca3f3de3a7d0f26b5402459b76545
Expected behavior
When
dynamicValue
is changed in any set member,Then output file created by
writeToFile
is updated,And the reload signal is sent to the managed process.
Actual behavior
When
dynamicValue
is changed in any set member,Then output file created by
writeToFile
is updated,And the reload signal is NOT sent to the managed process.
Steps to reproduce
Run consul template with example config, template and mock process. After first load, change one of the dynamic values in the k/v store.
It appears that because none of the template output is changed, then when CT diffs the output it determines reload is not necessary.
References
N/A
Mitigations
It appears that adding
{{timestamp}}
to the parent template forces a re-render with changes, thus triggering the reload. It isn't clear if this is an appropriate mitigation, as I am unsure if the reload could be triggered before allwriteToFile
outputs a written to disk.Logs when run including timestamp in parent template: https://gist.github.com/davidatkinsondoyle/f36c4ac89120caa4a89c467c5d71a97c
The text was updated successfully, but these errors were encountered: