infobloxopen / docker-infoblox

IPAM driver for Docker and Infoblox
Apache License 2.0
23 stars 23 forks source link

socket files; plugin dir #5

Closed johnbelamaric closed 8 years ago

johnbelamaric commented 8 years ago

Is there any way to automatically create the plugin dir and to cleanup the socket files?

yuewko commented 8 years ago

Yes. It is done using the shell script wrapper (at least for rm socket file) for now, which I thought is more appropriate. I'm open to doing inside the driver if you so incline.

johnbelamaric commented 8 years ago

I see. I don't know, it seems like most containers can be run directly, so that is why I thought perhaps it should change. I wouldn't want our run/deployment to be different than the norm.

On Feb 12, 2016, at 2:15 PM, yuewko notifications@github.com<mailto:notifications@github.com> wrote:

Yes. It is done using the shell script wrapper (at least for rm socket file) for now, which I thought is more appropriate. I'm open to doing inside the driver if you so incline.

— Reply to this email directly or view it on GitHubhttps://github.com/infobloxopen/docker-infoblox/issues/5#issuecomment-183454920.

yuewko commented 8 years ago

In which case, I propose adding the following options:

-plugin-dir (default to /run/docker/plugins) -plugin-name (default to Infoblox)

The socket created will be, by default /run/docker/plugins/Infoblox.sock The code will make sure /run/docker/plugins exists and will delete /run/docker/plugins/infoblox.sock if exists.

johnbelamaric commented 8 years ago

Ok. Should that be "plugin_name" or "driver_name"? I think either works but since it's "--ipam-driver" on the network create side, using "driver_name" may be clearer.

yuewko commented 8 years ago

Good point. So, --plugin-dir --driver-name

Obviously, that replace -socket.

yuewko commented 8 years ago

Fixed by pull request: https://github.com/infobloxopen/docker-infoblox/pull/9