Skip to content

feat(docker-net-option): Allows user to define the docker network - #64

Merged
mr-c merged 2 commits into
common-workflow-language:masterfrom
kmhernan:feat/docker-net-option
Apr 15, 2016
Merged

mr-c merged 2 commits into
common-workflow-language:masterfrom
kmhernan:feat/docker-net-option

Conversation

@kmhernan

Copy link
Copy Markdown

Instead of --enable_net being a boolean, I added the ability to explicitly define the docker network id. If I wanted to use, say, the host docker network:

cwltool.py --enable-net host ...

If you don't use the option is acts just as before.

@cwl-bot

cwl-bot commented Apr 13, 2016

Copy link
Copy Markdown

Can one of the admins verify this patch?

@mr-c

mr-c commented Apr 13, 2016

Copy link
Copy Markdown
Member

add to testlist

@mr-c

mr-c commented Apr 13, 2016

Copy link
Copy Markdown
Member

Hey Kyle, it is nice to see you here.

I think you want to move from our current two outcome support of --net=none or nothing specified to a three outcome situation: --net=none, --net=custom-thingy, or nothing specified. However this implementation is lacking support for the default networking option.

Can you add that back in?

@kmhernan

Copy link
Copy Markdown
Author

Thanks :-). Hmm.. I think understand what you are saying. But I'm not sure what the best implementation would be? I could keep --enable-net working like it has been, and add another option to specify the network name for my case, but then it would probably need to a be a mutually exclusive option? If, I try something like:

parser.add_argument("--enable-net", const=True, nargs="?", default=False, help="Blah blah..")

You could theoretically use --enable_net with no value and it would act as it did before, and if you pass a value it could add my functionality; however, I'm not sure if that plays nicely with the positionals in the argparser?? Am I misunderstanding? Thoughts?

@mr-c

mr-c commented Apr 15, 2016

Copy link
Copy Markdown
Member

Does a42ef06 work for you?

@kmhernan

Copy link
Copy Markdown
Author

Awesome! Yup. Thanks

@mr-c

mr-c commented Apr 15, 2016

Copy link
Copy Markdown
Member

@kmhernan Feel free to pull that commit into this PR. I'd like @tetron to review this before we merge.

@kmhernan

Copy link
Copy Markdown
Author

@mr-c I believe I just did. Thanks!

@mr-c
mr-c merged commit d631c6a into common-workflow-language:master Apr 15, 2016
@mr-c

mr-c commented Apr 15, 2016

Copy link
Copy Markdown
Member

Great, thanks @kmhernan !

@kmhernan

Copy link
Copy Markdown
Author

@mr-c it looks like there is one line of code missing #L607 that does not pass the custom_net argument to the kwargs of the executor!

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

Successfully merging this pull request may close these issues.

3 participants