Comments (3)
Hi @mssawant, this is expected behavior. Consul replicate will synchronize the specified KV path from the source to the destination. Keys which exist at the destination but do not exist at the source will be deleted (similar to rsync's --delete
flag).
You can exclude specific keys/prefixes from replication (and hence deletion on the dst) by using the -exclude
flag at the CLI, or exclude
key in the configuration file.
from consul-replicate.
Okay, I am getting what I want if I specify the absolute key name in exclude but not if I specify just the prefix,
consul kv get -datacenter=dc1 -recurse proc/
proc/1:online
proc/2:online
consul kv get -datacenter=dc2 -recurse proc/
proc/3:online
proc/4:
./consul-replicate -exclude="proc/1" -exclude="proc/2" -prefix "proc/@dc2" -once
consul kv get -recurse proc/
proc/1:online
proc/2:online
proc/3:online
proc/4:online
consul kv delete proc/3
Success! Deleted key: proc/3
consul kv delete proc/4
Success! Deleted key: proc/4
consul kv get -recurse proc/
proc/1:online
proc/2:online
./consul-replicate -exclude="proc/" -prefix "proc/@dc2" -once
consul kv get -recurse proc/
proc/1:online
proc/2:online
But I think the behavior's as expected. Just that I have a hybrid use case where I divide my cluster in multiple datacenters and need certain level of redundancy between the data centers maintaining their local keys.
Good that there's a workaround, thanks @blake.
from consul-replicate.
I'm glad you have a workable solution. Do you mind if I close this issue?
from consul-replicate.
Related Issues (20)
- Project status?
- Replication stops working for a particular k/v secrets
- Photo editing
- photo
- support streaming backend
- consul-replicate sync empty data during raft leader election in the master DC HOT 8
- why not add feature for registering consul ? we need to watch whether consul-replicate is running
- The status_dir configuration appears to be ignored when read from file HOT 2
- This service requires some kind of basic HTTP health check
- Is consul-replicate compatible with consul-esm?
- Consul replicate mandates wan links
- No way to force HTTP HOT 2
- Unexpected response code: 500 HOT 2
- Consul Connect Intentions replication using consul-replicate HOT 5
- vault + consul cross DC setup HOT 1
- safeService
- TLS 1.3 support
- How To replicate multiple Dcs
- performance degrades as watched prefix becomes heavier
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consul-replicate.