openstack FIP set without router fails with "Unknown error"

Bug #1760405 reported by Alex Stafeyev
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Won't Fix
Low
yanpuqing

Bug Description

Queen
Assiging FIP when there is nor router between the external and internal networks show " unknown error" instead of

"External network b6093932-a55d-4f9a-8af0-f6f953c3a443 is not reachable from subnet 535a9a47-6797-454f-a1dc-eeda6ace87d8. Therefore, cannot associate Port 8af20b95-fbf3-4116-b630-68cc7b468060 with a Floating IP.
Neutron server returns request_ids: ['req-73ab75d2-5b3b-42ef-9604-37cc539ef0cc']" as with neutron client.

Case:
(.venv) (overcloud) [stack@c09-h04-r630 octavia-tempest-plugin]$
(.venv) (overcloud) [stack@c09-h04-r630 octavia-tempest-plugin]$ openstack floating ip set 172.168.30.221 --port 8af20b95-fbf3-4116-b630-68cc7b468060
NotFoundException: Unknown error
(.venv) (overcloud) [stack@c09-h04-r630 octavia-tempest-plugin]$ neutron router-create Router_eNet
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new router:
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2018-04-01T10:30:47Z |
| description | |
| external_gateway_info | |
| flavor_id | |
| ha | True |
| id | b7364546-0227-4de9-beaa-ef5ea848ec0b |
| name | Router_eNet |
| project_id | a4c33cca12ea4b7e892f80f1009a2363 |
| revision_number | 2 |
| routes | |
| status | ACTIVE |
| tags | |
| tenant_id | a4c33cca12ea4b7e892f80f1009a2363 |
| updated_at | 2018-04-01T10:30:47Z |
+-------------------------+--------------------------------------+
(.venv) (overcloud) [stack@c09-h04-r630 octavia-tempest-plugin]$ neutron router-list
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+--------------------------------------+-------------+----------------------------------+-----------------------+------+
| id | name | tenant_id | external_gateway_info | ha |
+--------------------------------------+-------------+----------------------------------+-----------------------+------+
| b7364546-0227-4de9-beaa-ef5ea848ec0b | Router_eNet | a4c33cca12ea4b7e892f80f1009a2363 | null | True |
+--------------------------------------+-------------+----------------------------------+-----------------------+------+
(.venv) (overcloud) [stack@c09-h04-r630 octavia-tempest-plugin]$ neutron router-interface-add Router_eNet subnet=int_sub
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Added interface 78ecc2d2-769e-4746-ac59-449b620cdec6 to router Router_eNet.
(.venv) (overcloud) [stack@c09-h04-r630 octavia-tempest-plugin]$ neutron router-gateway-set Router_eNet admin-ext
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Set gateway for router Router_eNet
(.venv) (overcloud) [stack@c09-h04-r630 octavia-tempest-plugin]$ openstack floating ip set 172.168.30.221 --port 8af20b95-fbf3-4116-b630-68cc7b468060
(.venv) (overcloud) [stack@c09-h04-r630 octavia-tempest-plugin]$

Tags: floating-ip
Revision history for this message
Lujin Luo (luo-lujin) wrote :

Reproduced in master too.

Changed in neutron:
status: New → Confirmed
tags: added: floating-ip
Changed in neutron:
importance: Undecided → Low
Revision history for this message
Brian Haley (brian-haley) wrote :

So it seems neutron-server returns the error we want:

GET call to network for http://10.18.57.22:9696/v2.0/ports/40cb7567-8860-45db-8e40-fca62dc9bad2 used request id req-c7f5bf78-b3bb-42d9-a9d1-7748ce99aed8
Manager RegionOne ran task network.GET.ports in 0.052374124527s
Manager RegionOne running task network.PUT.floatingips
REQ: curl -g -i -X PUT http://10.18.57.22:9696/v2.0/floatingips/5d0dc3fa-fb22-42ad-b4c0-b539d47c6d4f -H "User-Agent: openstacksdk/0.12.0 keystoneauth1/3.4.0 python-requests/2.18.4 CPython/2.7.12" -H "Content-Type: application/json" -H "X-Auth-Token: {SHA1}bfc29239739b3c075a7f986dc54fdec33e773b0e" -d '{"floatingip": {"port_id": "40cb7567-8860-45db-8e40-fca62dc9bad2"}}'
http://10.18.57.22:9696 "PUT /v2.0/floatingips/5d0dc3fa-fb22-42ad-b4c0-b539d47c6d4f HTTP/1.1" 404 306
RESP: [404] Content-Type: application/json Content-Length: 306 X-Openstack-Request-Id: req-22430595-ba29-4cd7-9679-8f3e49289a15 Date: Fri, 06 Apr 2018 01:35:19 GMT Connection: keep-alive
RESP BODY: {"NeutronError": {"message": "External network 62de8874-0e12-466a-8e21-2f93910b04dc is not reachable from subnet 2415fbfd-52a7-4fbb-af83-4607505f207a. Therefore, cannot associate Port 40cb7567-8860-45db-8e40-fca62dc9bad2 with a Floating IP.", "type": "ExternalGatewayForFloatingIPNotFound", "detail": ""}}

But the client didn't decode it correctly? Could be a bug in the openstackclient.

Revision history for this message
Brian Haley (brian-haley) wrote :

The "old" neutronclient shows the correct failure message:

$ neutron floatingip-associate 5d0dc3fa-fb22-42ad-b4c0-b539d47c6d4f 40cb7567-8860-45db-8e40-fca62dc9bad2
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
External network 62de8874-0e12-466a-8e21-2f93910b04dc is not reachable from subnet 2415fbfd-52a7-4fbb-af83-4607505f207a. Therefore, cannot associate Port 40cb7567-8860-45db-8e40-fca62dc9bad2 with a Floating IP.

affects: neutron → python-openstackclient
Dongcan Ye (hellochosen)
Changed in python-openstackclient:
assignee: nobody → Dongcan Ye (hellochosen)
Revision history for this message
Brian Haley (brian-haley) wrote :

@Dongcan - have you had a chance to look at this yet? It actually affects more than just floating ip commands. Thanks.

Revision history for this message
Dongcan Ye (hellochosen) wrote :

@Brian Haley, sorry for the late, I'll look at this bug in recent days.

Revision history for this message
Brian Haley (brian-haley) wrote :

Now being tracked in storyboard.

https://storyboard.openstack.org/#!/story/1760405

Revision history for this message
yanpuqing (ycx) wrote :
Changed in python-openstackclient:
assignee: Dongcan Ye (hellochosen) → yanpuqing (ycx)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstacksdk 0.14.0

This issue was fixed in the openstack/openstacksdk 0.14.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstacksdk 0.11.4

This issue was fixed in the openstack/openstacksdk 0.11.4 release.

Artem Goncharov (gtema)
Changed in python-openstackclient:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.