Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 6a4b21bd86)
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Madhu Venugopal 2016-07-07 16:10:43 -07:00 committed by Tibor Vass
parent 65a256f7a8
commit b74b71ecb3
1 changed files with 4 additions and 0 deletions

View File

@ -81,6 +81,10 @@ func (n *networkRouter) postNetworkCreate(ctx context.Context, w http.ResponseWr
return err
}
if _, err := n.clusterProvider.GetNetwork(create.Name); err == nil {
return libnetwork.NetworkNameError(create.Name)
}
nw, err := n.backend.CreateNetwork(create)
if err != nil {
if _, ok := err.(libnetwork.ManagerRedirectError); !ok {