Public bug reported:
Horizon message:
Error: Failed to create subnet "" for network "None": Request Failed: internal
server error while processing your request.
Neutron API message:
2015-09-13 08:30:19.545 DEBUG neutron.api.v2.base
[req-9e0ac82f-7bec-4627-bce4-da79637de47f demo
a73d9746878b47e6b3ac4dfd57d212bd] Request body: {u'subnet': {u'name':
u'subnet3', u'enable_dhcp': True, u'network_id':
u'ad740c45-436a-4c65-ad13-982e034279be', u'tenant_id':
u'a73d9746878b47e6b3ac4dfd57d212bd', u'ip_version': 4, u'prefixlen': u'24',
u'cidr': None, u'subnetpool_id': u'48806e89-553f-4479-81e2-62120d07f972'}} from
(pid=25643) prepare_request_body /opt/stack/neutron/neutron/api/v2/base.py:620
2015-09-13 08:30:19.600 ERROR neutron.api.v2.resource
[req-9e0ac82f-7bec-4627-bce4-da79637de47f demo
a73d9746878b47e6b3ac4dfd57d212bd] create failed
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource Traceback (most recent
call last):
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/opt/stack/neutron/neutron/api/v2/resource.py", line 83, in resource
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource result =
method(request=request, **args)
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 146, in wrapper
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource ectxt.value =
e.inner_exc
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in
__exit__
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource
six.reraise(self.type_, self.value, self.tb)
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 136, in wrapper
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource return f(*args,
**kwargs)
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/opt/stack/neutron/neutron/api/v2/base.py", line 491, in create
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource obj =
obj_creator(request.context, **kwargs)
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/opt/stack/neutron/neutron/plugins/ml2/plugin.py", line 835, in create_subnet
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource result, mech_context
= self._create_subnet_db(context, subnet)
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/opt/stack/neutron/neutron/plugins/ml2/plugin.py", line 824, in
_create_subnet_db
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource result =
super(Ml2Plugin, self).create_subnet(context, subnet)
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/opt/stack/neutron/neutron/db/db_base_plugin_v2.py", line 667, in create_subnet
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource return
self._create_subnet(context, subnet, subnetpool_id)
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/opt/stack/neutron/neutron/db/db_base_plugin_v2.py", line 583, in
_create_subnet
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource subnetpool_id)
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/opt/stack/neutron/neutron/db/ipam_non_pluggable_backend.py", line 446, in
allocate_subnet
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource subnet['cidr'])
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/opt/stack/neutron/neutron/db/ipam_backend_mixin.py", line 52, in
_gateway_ip_str
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource return
str(netaddr.IPNetwork(cidr_net).network + 1)
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/usr/local/lib/python2.7/dist-packages/netaddr/ip/__init__.py", line 923, in
__init__
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource implicit_prefix,
flags)
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource File
"/usr/local/lib/python2.7/dist-packages/netaddr/ip/__init__.py", line 818, in
parse_ip_network
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource raise
TypeError('unexpected type %s for addr arg' % type(addr))
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource TypeError: unexpected
type for addr arg
2015-09-13 08:30:19.600 TRACE neutron.api.v2.resource
Analysis:
When we create a subnet with subnetpool cidr is set to None. A recent change in
Neutron or netaddr now makes this an error.
Proposed fix:
Update Horizon Neutron Client bindings and make cidr and ip_version optional.
Update Horizon networks workflow to only pass cidr and ip_version fields if
they are used instead of passing along "None".
** Affects: horizon
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1495191
Title:
Create subnet from subnetpool fails in recent devstack
Status in OpenStack Dashboard (Horizon):
New
Bug descr