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

[Compose file] allow names for non-external volumes #274

Closed
dnephin opened this issue Jun 30, 2017 · 12 comments · Fixed by #306
Closed

[Compose file] allow names for non-external volumes #274

dnephin opened this issue Jun 30, 2017 · 12 comments · Fixed by #306

Comments

@dnephin
Copy link
Contributor

dnephin commented Jun 30, 2017

Proposed syntax:

volumes:
  data:
    name: something
    driver: drivername

This will fix a bunch of issues:

Probably others I haven't found yet.

We should also deprecate external: name: foo (external: bool would remain undeprecated).

cc @shin- What do you think?

Also, should we go ahead and do this with secrets, configs and networks as well, to keep them consistent?

@dnephin
Copy link
Contributor Author

dnephin commented Jun 30, 2017

cc @vdemeester as well

@shin-
Copy link
Contributor

shin- commented Jun 30, 2017

Seems reasonable. external is ignored in docker stack anyway, right?

@xask00
Copy link

xask00 commented Jul 1, 2017

In reference to moby/moby#30770

Will this change make templated names for volumes possible in the compose YML file used by docker stack deploy like below -

volumes:
  data:
    name: {{.Service.Name}}-{{.Task.Slot}}-vol
    driver: cloudstor:aws

equivalent of the command line -

docker service create \
  --replicas 5 \
  --name ping2 \
  --mount type=volume,volume-driver=cloudstor:aws,source={{.Service.Name}}-{{.Task.Slot}}-vol,destination=/mydata \
  alpine ping docker.com

@dnephin
Copy link
Contributor Author

dnephin commented Jul 1, 2017

Yes, that is one of the problems that will be fixed by this change.

@xask00
Copy link

xask00 commented Jul 1, 2017

@dnephin thanks for confirming

@eliaoggian
Copy link

I Think this fix will be great! When will this be implemented?

Thanks!

@shouze
Copy link
Contributor

shouze commented Jul 11, 2017

@eliaoggian yes see #306 need to wait for 3.4 version of the schema with some other changes. I guess we can't expect a GA until 17.09 @dnephin right?

@vieux
Copy link
Contributor

vieux commented Aug 8, 2017

@dnephin @thaJeztah should this one be closed ?

@dnephin
Copy link
Contributor Author

dnephin commented Aug 8, 2017

Yes, this issue is closed, fixed by #306

@alculquicondor
Copy link

I'm trying to use version 3.4 but it doesn't seem to work.

The relevant configuration is:

services:
    hdfsdata:                                                                                                                                                                                                                           
        image: quay.io/geomesa/hdfs:geomesa-1.3.2-accumulo-1.8.1                                                                                                                                                                        
        command: data                                                                                                                                                                                                                   
        depends_on:                                                                                                                                                                                                                     
            - hdfsname                                                                                                                                                                                                                  
        environment:                                                                                                                                                                                                                    
            - HADOOP_MASTER_ADDRESS=hdfsname                                                                                                                                                                                            
        volumes:                                                                                                                                                                                                                        
            - hdfsdata:/data/hdfs                                                                                                                                                                                                       
        deploy:                                                                                                                                                                                                                         
            mode: global                                                                                                                                                                                                                
            endpoint_mode: dnsrr

volumes:
    hdfsdata:
        name: '{{.Service.Name}}-{{.Task.Slot}}'
        driver: cloudstor:aws
        driver_opts:
            backing: relocatable
            size: 20

However, only a single volume is created with the task.slot from the container in the manager and all tasks attempt to attatch to it. Am I doing something wrong?

@shouze
Copy link
Contributor

shouze commented Nov 9, 2017

It depends if the docker release you run on aws, which one are you running?

@alculquicondor
Copy link

Here

~ $ docker version
Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:39:28 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:45:38 2017
 OS/Arch:      linux/amd64
 Experimental: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants