yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #52559
[Bug 1593652] Re: When created subnet for a network failed, it seems that error info returned by neutronclient didn't return network and subnet info
It seems to me that the problem is with how Horizon is reporting the
error. The python-neutronclient will not return a subnet_id as no subnet
is created. It could be changed to return the network_id, but seeing as
that is included in the subnet-create request I'm not sure it's
necessary.
** Changed in: neutron
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1593652
Title:
When created subnet for a network failed,it seems that error info
returned by neutronclient didn't return network and subnet info
Status in neutron:
Invalid
Bug description:
Created subnet associated with subnetpool_1 for a network,through
Horizon Web,creating another subnet associated with subnetpool_2
returned error info as follows:
Error: Failed to create subnet "" for network "None": Subnets hosted
on the same network must be allocated from the same subnet pool.
Neutron server returns request_ids: ['req-
cad13014-6fe6-4db4-99e6-750de19fbf85']
" subnet "" " and " network "None" " appeared in the error info above
is not friendly,it seems that neutronclient didn't return network and
subnet info caused this.
[root@localhost devstack]# neutron net-show net_xwj
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | |
| availability_zones | nova |
| created_at | 2016-06-16T01:52:55 |
| description | |
| id | 49fbc0cf-1d0a-4fbf-a2fc-e21264752760 |
| ipv4_address_scope | |
| ipv6_address_scope | |
| mtu | 1450 |
| name | net_xwj |
| port_security_enabled | True |
| provider:network_type | vxlan |
| provider:physical_network | |
| provider:segmentation_id | 1076 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | e4fadcb7-ac99-4c14-82e2-1195c3618779 |
| | 8868eaed-55c5-4707-b41e-8798cc8b9cc9 |
| tags | |
| tenant_id | d692c40b9bd74af38361d855bebb60ac |
| updated_at | 2016-06-16T01:52:56 |
+---------------------------+--------------------------------------+
[root@localhost devstack]# neutron subnet-show e4fadcb7-ac99-4c14-82e2-1195c3618779
+-------------------+---------------------------------------------+
| Field | Value |
+-------------------+---------------------------------------------+
| allocation_pools | {"start": "110.1.0.2", "end": "110.1.0.14"} |
| cidr | 110.1.0.0/28 |
| created_at | 2016-06-17T03:18:27 |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 110.1.0.1 |
| host_routes | |
| id | e4fadcb7-ac99-4c14-82e2-1195c3618779 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | subnet_xwj_01 |
| network_id | 49fbc0cf-1d0a-4fbf-a2fc-e21264752760 |
| subnetpool_id | 4547f41d-c4cd-4336-9138-642dd2187b5b |
| tenant_id | d692c40b9bd74af38361d855bebb60ac |
| updated_at | 2016-06-17T03:18:27 |
+-------------------+---------------------------------------------+
[root@localhost devstack]# neutron subnet-show 8868eaed-55c5-4707-b41e-8798cc8b9cc9
+-------------------+----------------------------------------------+
| Field | Value |
+-------------------+----------------------------------------------+
| allocation_pools | {"start": "110.1.0.18", "end": "110.1.0.30"} |
| cidr | 110.1.0.16/28 |
| created_at | 2016-06-17T03:20:54 |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 110.1.0.17 |
| host_routes | |
| id | 8868eaed-55c5-4707-b41e-8798cc8b9cc9 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | subnet_xwj_02 |
| network_id | 49fbc0cf-1d0a-4fbf-a2fc-e21264752760 |
| subnetpool_id | 4547f41d-c4cd-4336-9138-642dd2187b5b |
| tenant_id | d692c40b9bd74af38361d855bebb60ac |
| updated_at | 2016-06-17T03:20:54 |
+-------------------+----------------------------------------------+
[root@localhost devstack]# neutron subnetpool-list
+--------------------------------------+---------------------------+--------------------+-------------------+------------------+------------+
| id | name | prefixes | default_prefixlen | address_scope_id | is_default |
+--------------------------------------+---------------------------+--------------------+-------------------+------------------+------------+
| 4547f41d-c4cd-4336-9138-642dd2187b5b | subnetpool_1 | 110.0.0.0/8 | 28 | | False |
| 615fbb87-ab0d-480e-9f87-3b72db29ea87 | shared-default-subnetpool | 10.0.0.0/8 | 24 | | True |
| 871d06fe-d112-466f-b93d-b28520206a90 | subnetpool_2 | 111.1.0.0/16 | 28 | | False |
| dc4efbf8-b4c6-4b04-8378-2fab94dca43a | shared-default-subnetpool | 2001:db8:8000::/48 | 64 | | True |
+--------------------------------------+---------------------------+--------------------+-------------------+------------------+------------+
[root@localhost devstack]# neutron --debug subnet-create net_xwj --name subnet_xwj_03 --subnetpool subnetpool_2
DEBUG: stevedore.extension found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3oauth1 = keystoneauth1.extras.oauth1._loading:V3OAuth1')
DEBUG: stevedore.extension found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode')
DEBUG: stevedore.extension found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3oidcaccesstoken = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAccessToken')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword')
DEBUG: stevedore.extension found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token')
DEBUG: stevedore.extension found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password')
DEBUG: stevedore.extension found extension EntryPoint.parse('table = cliff.formatters.table:TableFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('json = cliff.formatters.json_format:JSONFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('shell = cliff.formatters.shell:ShellFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('value = cliff.formatters.value:ValueFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('yaml = cliff.formatters.yaml_format:YAMLFormatter')
DEBUG: neutronclient.neutron.v2_0.subnet.CreateSubnet run(Namespace(allocation_pools=None, cidr=None, columns=[], description=None, disable_dhcp=False, dns_nameservers=None, enable_dhcp=False, formatter='table', gateway=None, host_routes=None, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, max_width=0, name=u'subnet_xwj_03', network_id=u'net_xwj', no_gateway=False, noindent=False, prefix='', prefixlen=None, request_format='json', subnetpool=u'subnetpool_2', tenant_id=None, use_default_subnetpool=False, variables=[]))
DEBUG: keystoneauth.session REQ: curl -g -i -X GET http://192.168.1.176:5000/v2.0 -H "Accept: application/json" -H "User-Agent: keystoneauth1/2.8.0 python-requests/2.10.0 CPython/2.7.5"
DEBUG: keystoneauth.session RESP: [200] Date: Fri, 17 Jun 2016 09:41:31 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_auth_gssapi/1.3.1 mod_auth_kerb/5.4 mod_fcgid/2.3.9 mod_nss/2.4.6 NSS/3.19.1 Basic ECC PHP/5.4.16 mod_wsgi/3.4 Python/2.7.5 Vary: X-Auth-Token x-openstack-request-id: req-39fe4746-7138-4b02-9a1b-b63cdd325b3b Content-Length: 343 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://192.168.1.176/identity/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}
DEBUG: keystoneauth.identity.v2 Making authentication request to http://192.168.1.176/identity/v2.0/tokens
DEBUG: keystoneauth.session REQ: curl -g -i -X GET http://192.168.1.176:9696/v2.0/networks.json?fields=id&name=net_xwj -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}e85a9b6ef0157affc658749c1c66aa1bc94da63d"
DEBUG: keystoneauth.session RESP: [200] Content-Type: application/json Content-Length: 62 X-Openstack-Request-Id: req-2c23c24b-8ef0-4798-b840-328b1ae41e4b Date: Fri, 17 Jun 2016 09:41:31 GMT Connection: keep-alive
RESP BODY: {"networks": [{"id": "49fbc0cf-1d0a-4fbf-a2fc-e21264752760"}]}
DEBUG: keystoneauth.session REQ: curl -g -i -X GET http://192.168.1.176:9696/v2.0/subnetpools.json?name=subnetpool_2 -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}e85a9b6ef0157affc658749c1c66aa1bc94da63d"
DEBUG: keystoneauth.session RESP: [200] Content-Type: application/json Content-Length: 437 X-Openstack-Request-Id: req-aa76a116-3276-4779-bf6f-a9a790b4e0f9 Date: Fri, 17 Jun 2016 09:41:31 GMT Connection: keep-alive
RESP BODY: {"subnetpools": [{"description": "", "updated_at": "2016-06-17T06:42:40", "is_default": false, "min_prefixlen": "8", "address_scope_id": null, "default_prefixlen": "28", "id": "871d06fe-d112-466f-b93d-b28520206a90", "max_prefixlen": "32", "name": "subnetpool_2", "default_quota": null, "tenant_id": "d692c40b9bd74af38361d855bebb60ac", "created_at": "2016-06-17T06:42:40", "prefixes": ["111.1.0.0/16"], "ip_version": 4, "shared": false}]}
DEBUG: keystoneauth.session REQ: curl -g -i -X POST http://192.168.1.176:9696/v2.0/subnets.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}e85a9b6ef0157affc658749c1c66aa1bc94da63d" -d '{"subnet": {"network_id": "49fbc0cf-1d0a-4fbf-a2fc-e21264752760", "ip_version": 4, "name": "subnet_xwj_03", "subnetpool_id": "871d06fe-d112-466f-b93d-b28520206a90"}}'
DEBUG: keystoneauth.session RESP: [400] Content-Type: application/json Content-Length: 168 X-Openstack-Request-Id: req-9073e2a3-de6d-49c2-b176-3a4fb6d9da2d Date: Fri, 17 Jun 2016 09:41:31 GMT Connection: keep-alive
RESP BODY: {"NeutronError": {"message": "Subnets hosted on the same network must be allocated from the same subnet pool.", "type": "NetworkSubnetPoolAffinityError", "detail": ""}}
DEBUG: neutronclient.v2_0.client Error message: {"NeutronError": {"message": "Subnets hosted on the same network must be allocated from the same subnet pool.", "type": "NetworkSubnetPoolAffinityError", "detail": ""}}
ERROR: neutronclient.shell Subnets hosted on the same network must be allocated from the same subnet pool.
Neutron server returns request_ids: ['req-9073e2a3-de6d-49c2-b176-3a4fb6d9da2d']
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/neutronclient/shell.py", line 895, in run_subcommand
return run_command(cmd, cmd_parser, sub_argv)
File "/usr/lib/python2.7/site-packages/neutronclient/shell.py", line 115, in run_command
return cmd.run(known_args)
File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 403, in run
return super(NeutronCommand, self).run(parsed_args)
File "/usr/lib/python2.7/site-packages/cliff/display.py", line 79, in run
column_names, data = self.take_action(parsed_args)
File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 486, in take_action
data = obj_creator(body)
File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 669, in create_subnet
return self.post(self.subnets_path, body=body)
File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 347, in post
headers=headers, params=params)
File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 282, in do_request
self._handle_fault_response(status_code, replybody, resp)
File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 257, in _handle_fault_response
exception_handler_v20(status_code, error_body)
File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 84, in exception_handler_v20
request_ids=request_ids)
BadRequest: Subnets hosted on the same network must be allocated from the same subnet pool.
Neutron server returns request_ids: ['req-9073e2a3-de6d-49c2-b176-3a4fb6d9da2d']
[root@localhost devstack]#
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1593652/+subscriptions