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
While debugging hashicorp/nomad#14768 for a Nomad user, I discovered the new user/group fields cause CT to re-render unexpectedly without a content update.
My full reproduction with Nomad is over in hashicorp/nomad#14768 (comment) but tl;dr after I did some "printf debugging" I found we were getting the re-rendered event from CT, and I was able to reproduce with CT standalone without Nomad as well.
After a quick scan of the code it looks like it is triggering the update based on the group. When either user or group are set, it compares both. In the problematic snippet below it compares both (AND) against the guard value but on return it compares either (OR) against the current value of the file.
While debugging hashicorp/nomad#14768 for a Nomad user, I discovered the new
user
/group
fields cause CT to re-render unexpectedly without a content update.My full reproduction with Nomad is over in hashicorp/nomad#14768 (comment) but tl;dr after I did some "printf debugging" I found we were getting the re-rendered event from CT, and I was able to reproduce with CT standalone without Nomad as well.
Consul Template version
Configuration
Debug output
trace logs
Wait 4m18 for the sleep to expire...
Expected behavior
The template should not re-rendered and the
exec
'd process should not have respawned.Actual behavior
The template timestamp was touched and the
exec
'd process was respawned.Steps to reproduce
My setup was to run Vault in dev mode. Configure the CLI with
VAULT_TOKEN
andVAULT_ADDR
and write a secret:Using the CT configuration above, if I run that and check the
exec
'd process, I get the following:And then after the sleep expires, the process is respawned and the template is touched:
References
The text was updated successfully, but these errors were encountered: