infobloxopen / docker-infoblox

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

Can't delete address pool automatically if docker network is created with --ipam-opt="network-name=blue" #44

Open ados-h opened 7 years ago

ados-h commented 7 years ago

Guys,

Need you help, thank you in advance!

Without --ipam-opt="network-name=blue", I could successfully create and delete an address pool on infoblox in the automated manner if corresponding docker network create/rm command is issued.

However, if I add --ipam-opt="network-name=blue" in the docker network create command to have the "Network Name" Extensible Attribute automatically created together with the address pool, the address pool wouldn't be automatically deleted by the docker network rm command (network is successfully deleted in docker nevertheless).

Any thoughts, suggestions?
I'm currently on the master branch, btw.

Cheers

yuewko commented 7 years ago

Specifying --ipam-opt="network-name=xyz" is for use cases such as this: https://community.infoblox.com/t5/Community-Blog/Using-the-Infoblox-IPAM-Driver-for-Docker/ba-p/7129 - see Example: A shared, flat container address space

In this case, since the ipam driver assumes that other docker hosts may be sharing the network, it doesn't delete it from Infoblox. For now, the network on Infoblox need to be deleted manually.

This is something we are aware of and is on the list for future enhancement. Unfortunately, currently, the ReleasePool ipam api does not allow additional option that we could utilize to tell the driver to "forcefully" remove the network.

Hope this helps.

ados-h commented 7 years ago

Affirmative! Thank you @yuewko