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

restore add additional quoting for values #8

Closed
sielaq opened this issue Sep 20, 2014 · 2 comments
Closed

restore add additional quoting for values #8

sielaq opened this issue Sep 20, 2014 · 2 comments
Labels

Comments

@sielaq
Copy link
Contributor

sielaq commented Sep 20, 2014

Inconsistance restore, additional quoting for values:
to reproduce, create a variable:

$# consulate kv set foo bar
$# curl loclahost:8500/v1/kv/foo?pretty=1
[
    {
        "CreateIndex": 980,
        "ModifyIndex": 980,
        "LockIndex": 0,
        "Key": "foo",
        "Flags": 0,
        "Value": "YmFy"
    }
]

Now make a backup:

$# consulate kv backup /tmp/foo    
$# cat /tmp/foo
[
  [
    "foo", 
    0, 
    "bar"
  ]
]

Remove the value and restore:

$# consulate kv del foo
$# consulate kv restore /tmp/foo    

Check the value of key 'foo':

$# curl localhost:8500/v1/kv/foo?pretty=1
[
    {
        "CreateIndex": 992,
        "ModifyIndex": 992,
        "LockIndex": 0,
        "Key": "foo",
        "Flags": 0,
        "Value": "ImJhciI="
    }
]

Difference:

$# perl -MMIME::Base64 -e 'print decode_base64("YmFy")'
bar

$# perl -MMIME::Base64 -e 'print decode_base64("ImJhciI=")'
"bar"
@sielaq
Copy link
Contributor Author

sielaq commented Sep 20, 2014

fix proposal in
sielaq@02a519e

@gmr gmr added the bug label Dec 19, 2014
sielaq added a commit to sielaq/consulate that referenced this issue Jan 27, 2015
sielaq added a commit to sielaq/consulate that referenced this issue Jan 27, 2015
Fix for bug gmr#8 (restore add additional quoting for values)
sielaq added a commit to sielaq/consulate that referenced this issue Jan 27, 2015
sielaq added a commit to sielaq/consulate that referenced this issue Jan 27, 2015
Fix for bug gmr#8 (restore add additional quoting for values)
sielaq added a commit to sielaq/consulate that referenced this issue Jan 28, 2015
gmr added a commit that referenced this issue Jan 28, 2015
3rd attempt for #8 - stil not final :)
sielaq added a commit to sielaq/consulate that referenced this issue Jan 28, 2015
sielaq added a commit to sielaq/consulate that referenced this issue Jan 28, 2015
sielaq added a commit to sielaq/consulate that referenced this issue Jan 28, 2015
gmr added a commit that referenced this issue Feb 2, 2015
Move #8 correction from cli to api - to fix #6 and #8 - problem is the same
@sielaq
Copy link
Contributor Author

sielaq commented Feb 2, 2015

Fix merged so closing

@sielaq sielaq closed this as completed Feb 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants