consul-snapshot icon indicating copy to clipboard operation
consul-snapshot copied to clipboard

No keys are returned from KV when no prefix is specified

Open martinwaite opened this issue 7 years ago • 2 comments

Using the 0.2.2 release, any attempts to backup the entire KV store failed to find any keys. Examining strace output from this process revealed that the api URL is "GET /v1/kv//?consistent=&recurse=". These URLs lead to redirects.

There is a fix that went into Consul API a few weeks after the 0.2.2 release that avoids a API redirect by removing the trailing slash from the key:

https://github.com/hashicorp/consul/commit/8c3db1c5c6007337ebe4cf5b0d45c0cbdd72f595

I downloaded consul-snapshot source and recompiled after patching the vendored consul/api to match, and using that build, the KV backup worked.

Is it possible to create a new release compiled against the newer version of the Consol API ? I believe that will fix this problem.

martinwaite avatar Jul 25 '17 13:07 martinwaite

Hi @martinwaite I will check this out.

pshima avatar Aug 14 '17 17:08 pshima

@martinwaite can you try the latest release?

pshima avatar Sep 04 '17 17:09 pshima