← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1732890] Re: floatingip-create:Ignore floating_ip_address when specifying both floating_ip_address and subnet

 

Reviewed:  https://review.openstack.org/521707
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=088e317cd2dd8488feb29a4fa6600227d1810479
Submitter: Zuul
Branch:    master

commit 088e317cd2dd8488feb29a4fa6600227d1810479
Author: Dongcan Ye <hellochosen@xxxxxxxxx>
Date:   Tue Nov 21 11:46:56 2017 +0800

    Honor both floating_ip_address and subnet_id when creating FIP
    
    In the current code, if user specifies floating-ip-address
    and subnet, we only process the subnet when creating
    the fip port.
    
    This patch adds floating_ip_address and subnet_id to
    fip port's fixed_ips, if floating_ip_address is not in the subnet,
    InvalidIpForSubnet exception will be raised.
    
    This patch also fixes a default value error in tests.
    
    Change-Id: I436353690839281ca7e13eaf792249306b71dd4b
    Closes-Bug: #1732890


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1732890

Title:
  floatingip-create:Ignore floating_ip_address when specifying both
  floating_ip_address and subnet

Status in neutron:
  Fix Released

Bug description:
  When I created floating ip with "floating_ip_address" and "subnet", it ignored "floating_ip_address".
  $neutron floatingip-create --floating-ip-address 172.24.4.25 --subnet d5ece368-35fb-4537-be84-eda656250974
  Created a new floatingip:
  +---------------------+--------------------------------------+
  | Field               | Value                                |
  +---------------------+--------------------------------------+
  | created_at          | 2017-11-17T09:42:57Z                 |
  | description         |                                      |
  | fixed_ip_address    |                                      |
  | floating_ip_address | 172.24.4.10                          |
  | floating_network_id | fa18e1d7-1f33-48c0-a77f-f192f3c1c6df |
  | id                  | 4d6129a4-9076-4e79-b3f0-b05ce68deb05 |
  | port_id             |                                      |
  | project_id          | f0f9361fbf8e495b97eeadae6a81e14d     |
  | revision_number     | 1                                    |
  | router_id           |                                      |
  | status              | DOWN                                 |
  | tenant_id           | f0f9361fbf8e495b97eeadae6a81e14d     |
  | updated_at          | 2017-11-17T09:42:57Z                 |
  +---------------------+--------------------------------------+

  This is my REQ:
  DEBUG: keystoneauth.session REQ: curl -g -i -X POST http://10.10.10.7:9696/v2.0/floatingips.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}0996a50cdaac248681cedb7000dbe71c7bd1a3e0" -d '{"floatingip": {"floating_network_id": "fa18e1d7-1f33-48c0-a77f-f192f3c1c6df", "subnet_id": "d5ece368-35fb-4537-be84-eda656250974", "floating_ip_address": "172.24.4.25"}}'
  And this is my RESP:
  RESP BODY: {"floatingip": {"router_id": null, "status": "DOWN", "description": "", "tenant_id": "f0f9361fbf8e495b97eeadae6a81e14d", "created_at": "2017-11-17T09:42:57Z", "updated_at": "2017-11-17T09:42:57Z", "floating_network_id": "fa18e1d7-1f33-48c0-a77f-f192f3c1c6df", "fixed_ip_address": null, "floating_ip_address": "172.24.4.10", "revision_number": 1, "project_id": "f0f9361fbf8e495b97eeadae6a81e14d", "port_id": null, "id": "4d6129a4-9076-4e79-b3f0-b05ce68deb05"}}

  I think we should make sure the "floating_ip_address" belongs to the "subnet" and create it.
  Or we should report a error message when we set these parameters at the same time.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1732890/+subscriptions


References