'Fixed IP xxx.xxx.xxx.xxx is already in use' error occurs in test_create_list_show_delete_interfaces

Bug #1616714 reported by zhufl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
zhufl

Bug Description

Problem:
    running test_create_list_show_delete_interfaces failes with error message "Fixed IP 172.168.200.1 is already in use."

Details:
    400 POST http://10.43.211.20:8774/v2/df674fd4cd054aa692ea53f7f6182a33/servers/5e00abec-cdd6-4acf- a0f9-afccc812495f/os-interface 0.774s

    2016-08-25 10:47:22.376 24558 DEBUG tempest.lib.common.rest_client [req-dc231c86-5d88-4f7f- 9495-d46c16e50d1e ]
    Request-Head: {}
                  Request-Body: {"interfaceAttachment": {"fixed_ips": [{"ip_address": "172.168.200.1"}], "net_id": "d36cf451-5a20-41e1-b04d-0d65e44e75d2"}}

    Response-Head: {'status': '400', 'content-length': '85'}
                  Response-Body: {"badRequest": {"message": "Fixed IP 172.168.200.1 is already in use.", "code": 400}}

Reason:
    There is gateway_ip in subnet used by the testcase

    [root@host-10-43-211-174]# neutron subnet-show 29a62fa8-68ed-42fe-83db-9996fcf37a6d
    +-------------------+------------------------------------------------------+
    | Field | Value |
    +-------------------+------------------------------------------------------+
    | allocation_pools | {"start": "172.168.200.2", "end": "172.168.200.254"} |
    | cidr | 172.168.200.0/24 |
    | dns_nameservers | |
    | enable_dhcp | True |
    | gateway_ip | 172.168.200.1 |
    | host_routes | |
    | id | 29a62fa8-68ed-42fe-83db-9996fcf37a6d |
    | ip_version | 4 |
    | ipv6_address_mode | |
    | ipv6_ra_mode | |
    | name | subnet01 |
    | network_id | d36cf451-5a20-41e1-b04d-0d65e44e75d2 |
    | subnetpool_id | |
    | tenant_id | 1f758ff53e0e472687e39e09621ec13c |
    +-------------------+------------------------------------------------------+

Solution:
    In get_unused_ip_addresses, gateway_ip of the subnet should be excluded

zhufl (zhu-fanglei)
Changed in tempest:
assignee: nobody → zhufl (zhu-fanglei)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Masayuki Igawa (igawa)
summary: + 'Fixed IP xxx.xxx.xxx.xxx is already in use' error occurs in
test_create_list_show_delete_interfaces
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/360199
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=8458ddec1cb187a53fe3031bb6059058bed96bbd
Submitter: Jenkins
Branch: master

commit 8458ddec1cb187a53fe3031bb6059058bed96bbd
Author: zhufl <email address hidden>
Date: Thu Aug 25 11:29:13 2016 +0800

    Exclude gateway_ip of subnet in get_unused_ip_addresses

    When running test_create_list_show_delete_interfaces, if subnet
    used by the testcase has gateway_ip set, a BadRequest exception
    will occur with error message something like "Fixed IP 172.168.200.1
    is already in use."
    This is to exclude gateway_ip of subnet in get_unused_ip_addresses
    besides pruning out addresses already allocated to existing ports.

    Change-Id: I036d2940ff39450ca30d19be1cd9ae581ffb1b4f
    Closes-Bug: 1616714

Changed in tempest:
status: In Progress → Fix Released
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.