Network: Create floatingip from wrong subnet

Bug #1733258 reported by Dongcan Ye
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack SDK
Fix Released
Undecided
Dongcan Ye

Bug Description

I had an external network named "public" which have two v4 subnets:
root@neutron-devstack:~# openstack network list
+--------------------------------------+---------+------------------------------------------------------------------------------------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+---------+------------------------------------------------------------------------------------------------------------------+
| 30c2a624-7c53-46a2-a733-b196e7d72b40 | public | 0c280593-3066-4393-bbdc-028b24139314, 5547b16e-8ad7-4896-a472-cc796ca38ad3, e533b468-afdd-4890-9885-6529a525ebaf |
| de0f2b76-1581-4a42-bc18-0145542e0cb8 | private | 2bfc3925-f6e5-416c-a625-937c56088837, b12f51c3-4463-476a-8868-461882e4ca6a |
+--------------------------------------+---------+------------------------------------------------------------------------------------------------------------------+

root@neutron-devstack:~# openstack subnet list
+--------------------------------------+---------------------+--------------------------------------+---------------------+
| ID | Name | Network | Subnet |
+--------------------------------------+---------------------+--------------------------------------+---------------------+
| 0c280593-3066-4393-bbdc-028b24139314 | public-subnet | 30c2a624-7c53-46a2-a733-b196e7d72b40 | 172.24.4.0/24 |
| 2bfc3925-f6e5-416c-a625-937c56088837 | private-subnet | de0f2b76-1581-4a42-bc18-0145542e0cb8 | 10.0.0.0/26 |
| 5547b16e-8ad7-4896-a472-cc796ca38ad3 | | 30c2a624-7c53-46a2-a733-b196e7d72b40 | 20.0.0.0/24 |
| b12f51c3-4463-476a-8868-461882e4ca6a | ipv6-private-subnet | de0f2b76-1581-4a42-bc18-0145542e0cb8 | fd4b:bb6d:30ae::/64 |
| e533b468-afdd-4890-9885-6529a525ebaf | ipv6-public-subnet | 30c2a624-7c53-46a2-a733-b196e7d72b40 | 2001:db8::/64 |
+--------------------------------------+---------------------+--------------------------------------+---------------------+

Then creates floatingip from a subnet, will allocates a IP from another subnet.
root@neutron-devstack:~# openstack floating ip create --subnet 5547b16e-8ad7-4896-a472-cc796ca38ad3 public
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2017-11-20T02:41:31Z |
| description | |
| fixed_ip_address | None |
| floating_ip_address | 172.24.4.2 |
| floating_network_id | 30c2a624-7c53-46a2-a733-b196e7d72b40 |
| id | 912811ae-15cd-4253-acab-92d487a9d87c |
| name | 172.24.4.2 |
| port_id | None |
| project_id | a349811205044d119b27a9f09a06bf3e |
| revision_number | 0 |
| router_id | None |
| status | DOWN |
| updated_at | 2017-11-20T02:41:31Z |
+---------------------+--------------------------------------+

Dongcan Ye (hellochosen)
Changed in python-openstackclient:
assignee: nobody → Dongcan Ye (hellochosen)
Revision history for this message
Dongcan Ye (hellochosen) wrote :

It seems that openstacksdk not pass the subnet_id param, so change it to python-openstacksdk.

affects: python-openstackclient → python-openstacksdk
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstacksdk (master)

Fix proposed to branch: master
Review: https://review.openstack.org/521421

Changed in python-openstacksdk:
status: New → In Progress
Dongcan Ye (hellochosen)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstacksdk (master)

Reviewed: https://review.openstack.org/521421
Committed: https://git.openstack.org/cgit/openstack/python-openstacksdk/commit/?id=4419c553a458c6f22770327b25019329098cb740
Submitter: Zuul
Branch: master

commit 4419c553a458c6f22770327b25019329098cb740
Author: Dongcan Ye <email address hidden>
Date: Mon Nov 20 13:50:26 2017 +0800

    Add subnet_id property for FloatingIP

    In openstackclient we can pass a "subnet_id" param while creating
    floatingip, but missing in FloatingIP properties.

    Change-Id: I5c2b93d7e737755958ff074f3a84e592c94f0fe2
    Closes-Bug: #1733258

Changed in python-openstacksdk:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstacksdk 0.10.0

This issue was fixed in the openstack/python-openstacksdk 0.10.0 release.

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.