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

volume labels are losts #23

Open
petrus-v opened this issue Jul 26, 2018 · 1 comment
Open

volume labels are losts #23

petrus-v opened this issue Jul 26, 2018 · 1 comment

Comments

@petrus-v
Copy link

while restoring a volume (which happens when moving volume from nodes in mlfmonde/cluster) volumes labels are lost.

To reproduce:

$ docker volume create -d anybox/buttervolume:latest --label test=True test
gle@rbx-6-any-3 ~ $ docker volume ls
DRIVER                       VOLUME NAME
anybox/buttervolume:latest   test
$ docker volume inspect test
[
    {
        "CreatedAt": "0001-01-01T00:00:00Z",
        "Driver": "anybox/buttervolume:latest",
        "Labels": {
            "test": "True"
        },
        "Mountpoint": "/var/lib/buttervolume/volumes/test",
        "Name": "test",
        "Options": {},
        "Scope": "local"
    }
]
$ buttervolume snapshot test
$ docker volume rm test
$ docker volume inspect test
[]
Error: No such volume: test
buttervolume restore test
$ docker volume inspect test
[
    {
        "CreatedAt": "0001-01-01T00:00:00Z",
        "Driver": "anybox/buttervolume:latest",
        "Labels": null,
        "Mountpoint": "/var/lib/buttervolume/volumes/test",
        "Name": "test",
        "Options": null,
        "Scope": "local"
    }
]
@ccomb
Copy link
Owner

ccomb commented Jul 26, 2018

One possible way to avoid losing labels is by storing them in a file such as /etc/buttervolume/labels.ini

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

2 participants