Closed darron closed 8 years ago
We already have the full stop for the system on a per key basis:
https://github.com/DataDog/kvexpress#stop-command-flags
This is just on an individual node.
Speaking with @jhulten - here's likely a better interface:
sudo kvexpress lock -f /etc/datadog/hosts.consul
sudo kvexpress lock --all
That prevents kvexpress
from updating that file on this host - there are likely several things we should do / think about:
/etc/datadog/hosts.consul.locked
that helps people to remember - that the file will NOT be updated. Inside that file we can say "Hey - this file won't be updated - to unlock - do this."kvexpress out
runs and sees the lock - gives us visibility into all locked files.Implications:
/kvexpress/
KV hierarchy. That's currently write limited to Consul Server nodes and a little too flat. Need to organize better so that it all fits together./kvexpress
it currently has no concept of the path.canary
code.Added lock
:
https://github.com/DataDog/kvexpress/commit/664540fdd6e4c57b9077dd09983fbcc49c202ce3
Added unlock
:
https://github.com/DataDog/kvexpress/commit/1ea7c5482d72561d0951fcf6f59669a6bee3dd8d
Will test in staging.
Have ignored the complete node lock - --all
- for now - not sure it's needed.
kvexpress/locks
.locked
file? Would be good documentation in place.Also made sure that a full file path was being passed.
Ready for testing in staging tomorrow.
Have added the lock
and unlock
functionality and have tested in staging - here's a small video demonstrating how it works:
http://screencast.com/t/a0ueKgjmuyd
There are metrics around the lock
and unlock
operations - also when something is locked - we send kvexpress.locked
metrics as well - they're all available on the staging Consul dashboard:
https://dd.datad0g.com/dash/4584/consul
cc @clutchski @miketheman @clofresh @alq666
This is rolling out in prod right now.
I didn't add an --all
at this time.
We can if we need to.
touch /tmp/kvexpress-full-stop
Log that to a Datadog metric at least - so it's not completely invisible.