Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicate failed with source=keys #54

Closed
kak-tus opened this issue Sep 7, 2016 · 0 comments
Closed

Replicate failed with source=keys #54

kak-tus opened this issue Sep 7, 2016 · 0 comments

Comments

@kak-tus
Copy link

kak-tus commented Sep 7, 2016

Hello.
With consul-replicate 0.2 if "source" in prefix section of config is key (not folder) it is skipped from sync.
At 0.1 version this bug not exists.

Maybe it is why that string "vault/core/audit" from config becomes "vault/core/audit/" in debug log?

Debug logs with simple config

consul = "consul.service.consul:8500"
token = "mytoken"
retry = "10s"
max_stale = "10m"

prefix {
  source = "vault/core/audit@dc_ruweb"
}
/ # consul-replicate -log-level=debug -config=/etc/consul_replicate_tmp.hcl
2016/09/07 23:45:56 [INFO] consul-replicate v0.2.0
2016/09/07 23:45:56 [INFO] (runner) creating new runner (once: false)
2016/09/07 23:45:56 [DEBUG] (runner) final config (tokens suppressed):

{
  "Path": "/etc/consul_replicate_tmp.hcl",
  "Consul": "consul.service.consul:8500",
  "Token": "mytoken",
  "Prefixes": [
    {
      "Source": {
        "Prefix": "vault/core/audit/",
        "DataCenter": "dc_ruweb"
      },
      "SourceRaw": "vault/core/audit@dc_ruweb",
      "Destination": "vault/core/audit/"
    }
  ],
  "Auth": {
    "Enabled": false,
    "Username": "",
    "Password": ""
  },
  "PidFile": "",
  "SSL": {
    "Enabled": false,
    "Verify": true,
    "Cert": "",
    "Key": "",
    "CaCert": ""
  },
  "Syslog": {
    "Enabled": false,
    "Facility": "LOCAL0"
  },
  "MaxStale": 600000000000,
  "Retry": 10000000000,
  "Wait": {
    "min": 150000000,
    "max": 400000000
  },
  "LogLevel": "debug",
  "StatusDir": "service/consul-replicate/statuses"
}

2016/09/07 23:45:56 [INFO] (runner) creating consul/api client
2016/09/07 23:45:56 [DEBUG] (runner) setting address to consul.service.consul:8500
2016/09/07 23:45:56 [DEBUG] (runner) setting token to mytoken
2016/09/07 23:45:56 [DEBUG] (runner) setting basic auth
2016/09/07 23:45:56 [INFO] (runner) creating Watcher
2016/09/07 23:45:56 [INFO] (clients) creating consul/api client
2016/09/07 23:45:56 [DEBUG] (clients) setting consul address to "consul.service.consul:8500"
2016/09/07 23:45:56 [DEBUG] (clients) setting consul token
2016/09/07 23:45:56 [INFO] (runner) starting
2016/09/07 23:45:56 [INFO] (watcher) adding "storeKeyPrefix(vault/core/audit@dc_ruweb)"
2016/09/07 23:45:56 [DEBUG] (watcher) "storeKeyPrefix(vault/core/audit@dc_ruweb)" starting
2016/09/07 23:45:56 [DEBUG] (view) "storeKeyPrefix(vault/core/audit@dc_ruweb)" starting fetch
2016/09/07 23:45:56 [DEBUG] ("storeKeyPrefix(vault/core/audit@dc_ruweb)") querying consul with &{Datacenter:dc_ruweb AllowStale:true RequireConsistent:false WaitIndex:0 WaitTime:1m0s Token: Near:}
2016/09/07 23:45:56 [DEBUG] ("storeKeyPrefix(vault/core/audit@dc_ruweb)") Consul returned 0 key pairs
2016/09/07 23:45:56 [INFO] (view) "storeKeyPrefix(vault/core/audit@dc_ruweb)" received data
2016/09/07 23:45:56 [DEBUG] (view) "storeKeyPrefix(vault/core/audit@dc_ruweb)" starting fetch
2016/09/07 23:45:56 [DEBUG] ("storeKeyPrefix(vault/core/audit@dc_ruweb)") querying consul with &{Datacenter:dc_ruweb AllowStale:true RequireConsistent:false WaitIndex:172436 WaitTime:1m0s Token: Near:}
2016/09/07 23:45:56 [INFO] (runner) quiescence timers starting
2016/09/07 23:45:56 [INFO] (runner) quiescence minTimer fired
2016/09/07 23:45:56 [INFO] (runner) running
@kak-tus kak-tus changed the title Replicate failed with prefix=keys Replicate failed with source=keys Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant