DataDog / kvexpress

## Auto-archived due to inactivity. ## Go program to move data in and out of Consul's KV store.
Apache License 2.0
129 stars 13 forks source link

Doesn't copy the file to .last if the checksum in the KV store matches. #33

Closed darron closed 9 years ago

darron commented 9 years ago

You end up in this state:

[staging]root@i-c972d41e:/etc/consul-template/output# ls -al
total 48
drwxr-x--- 2 root root  4096 Nov  3 22:39 .
drwxr-x--- 7 root root  4096 Aug  7 16:33 ..
-rw-r--r-- 1 root root 16516 Nov  3 22:39 config_hosts
-rw-r----- 1 root root 16335 Nov  3 22:39 config_hosts.compare
-rw-r----- 1 root root    22 Nov  3 22:39 config_hosts.last

Where - the files didn't match - but the checksum inside the KV store matched:

[staging]root@i-c972d41e:/etc/consul-template/output# shasum -a 256 config_hosts.compare
deab902e0ab2f432f0ebc68035992f10a743059222cbea991f3345ba195c4dad  config_hosts.compare

So it didn't update the KV store - but it leaves the .last file in the wrong state.

darron commented 9 years ago

The problem is really this:

It will keep tripping the "file checksums don't match" even when they shouldn't.