Comment 0 for bug 1443798

Revision history for this message
watanabe.isao (watanabe.isao) wrote :

If any tenant creates a subnet with a netmask of 31 or 32 in IPv4,
IP addresses of network will fail to be generated, and that
will cause constant resyncs and neutron-dhcp-agent malfunction.

[Example operation]
$ neutron subnet-create net 192.168.0.0/31 --name sub
Created a new subnet:
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| allocation_pools | |
| cidr | 192.168.0.0/31 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 192.168.0.1 |
| host_routes | |
| id | 42a91f59-1c2d-4e33-9033-4691069c5e4b |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | sub |
| network_id | 65cc6b46-17ec-41a8-9fe4-5bf93fc25d1e |
| subnetpool_id | |
| tenant_id | 4ffb89e718d346b48fdce2ac61537bce |
+-------------------+--------------------------------------+

[Trace log]
2015-04-15 10:23:25.352 3056 ERROR neutron.agent.dhcp.agent [-] Unable to enable dhcp for 65cc6b46-17ec-41a8-9fe4-5bf93fc25d1e.
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent Traceback (most recent call last):
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 112, in call_driver
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent getattr(driver, action)(**action_kwargs)
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 201, in enable
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent interface_name = self.device_manager.setup(self.network)
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 928, in setup
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent port = self.setup_dhcp_port(network)
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 909, in setup_dhcp_port
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent dhcp_port = self.plugin.create_dhcp_port({'port': port_dict})
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 433, in create_dhcp_port
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent port=port, host=self.host)
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 156, in call
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent retry=self.retry)
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/transport.py", line 90, in _send
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent timeout=timeout, retry=retry)
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 350, in send
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent retry=retry)
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 341, in _send
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent raise result
2015-04-15 10:23:25.352 3056 TRACE neutron.agent.dhcp.agent RemoteError: Remote error: IpAddressGenerationFailure No more IP addresses available on network 65cc6b46-17ec-41a8-9fe4-5bf93fc25d1e.