Docker do not allow create network with same cidr
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zun |
Fix Released
|
High
|
Kien Nguyen |
Bug Description
Run zun tempest case in devstack with two neutron networks(public, private),
Create container will fail as the network with cidr options:
(Pdb) ipam_options
{'Config': [{'Subnet': u'10.0.0.0/28', 'Gateway': u'10.0.0.1'}], 'Driver': 'kuryr', 'Options': {'neutron.
has already exist.
[root@localhost zun]# docker network inspect 88e56a595a40
[
{
"Name": "1a9c8be9-
"Id": "88e56a595a4086
"Created": "2017-05-
"Scope": "local",
"Driver": "kuryr",
"IPAM": {
},
{
}
]
},
"Internal": false,
"Options": {
},
"Labels": {}
}
]
The docker driver do not allow two networks with same cidr. But zun create network or not is based on whether the neutro-
Following error will show in docker/driver.py:
tp://192.
APIError: APIError.
> /opt/stack/
-> context, network_api, neutron_net['id'])
(Pdb) c
2017-05-12 10:43:39.549 ERROR zun.compute.manager [req-14f50260-
2017-05-12 10:43:39.549 TRACE zun.compute.manager Traceback (most recent call last):
2017-05-12 10:43:39.549 TRACE zun.compute.manager File "/opt/stack/
2017-05-12 10:43:39.549 TRACE zun.compute.manager image=sandbox_
2017-05-12 10:43:39.549 TRACE zun.compute.manager File "/opt/stack/
2017-05-12 10:43:39.549 TRACE zun.compute.manager context, network_api, neutron_net['id'])
2017-05-12 10:43:39.549 TRACE zun.compute.manager File "/usr/lib64/
2017-05-12 10:43:39.549 TRACE zun.compute.manager self.gen.
2017-05-12 10:43:39.549 TRACE zun.compute.manager File "/opt/stack/
2017-05-12 10:43:39.549 TRACE zun.compute.manager raise exception.
2017-05-12 10:43:39.549 TRACE zun.compute.manager DockerError: Docker internal error: 500 Server Error: Internal Server Error ("IpamDriver.
2017-05-12 10:43:39.549 TRACE zun.compute.manager
2017-05-12 10:43:39.556 DEBUG oslo_messaging.
Changed in zun: | |
importance: | Undecided → High |
assignee: | nobody → hongbin (hongbin034) |
Changed in zun: | |
assignee: | hongbin (hongbin034) → nobody |
Changed in zun: | |
assignee: | nobody → hongbin (hongbin034) |
The error is raised from Kuryr: https:/ /github. com/openstack/ kuryr-libnetwor k/blob/ master/ kuryr_libnetwor k/controllers. py#L1427 . I guess the error will disappear after your kuryr installation contains this feature: https:/ /blueprints. launchpad. net/kuryr- libnetwork/ +spec/existing- subnetpool .