Bug 1313980 - add interface doesn't select the first free IP from range
Summary: add interface doesn't select the first free IP from range
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 8.0 (Liberty)
Assignee: Matthias Runge
QA Contact: Ido Ovadia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-02 18:17 UTC by Martin Pavlásek
Modified: 2016-03-07 09:09 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-07 09:09:35 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1553935 0 None None None 2016-03-07 09:09:34 UTC

Description Martin Pavlásek 2016-03-02 18:17:14 UTC
Description of problem:
When adding a router interface to network, the interface should get the first free IP address from the subnet (/24).

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. create router "test_router"
2. create network "test_net"
3. in test_net create subnet "test_subnet":
net address 10.0.0.0/24
IPv4
checkDisable gateway
click to Create
4. Network topology, click to router, Add interface, select "test_net: 10.0.0.0/24 (test_subnet)", leave IP address empty, submit the dialogue
5. red popoup is displayed: "Error: Failed to add_interface: Bad router request: Subnet for router interface must have a gateway IP" - it's valid behaviour so far
6. networks - click to "test_net" row, edit subnet "test_subnet":
uncheck Disable gateway,
set gateway IP 10.0.0.1,
check enable DHCP (is already checked by default),
allocation pool: 10.0.0.2,10.0.0.254
hit Save button
7. Network topology, click to router "test_router", Add interface, select "test_net: 10.0.0.0/24 (test_subnet)", leave IP address empty, submit the dialogue


Actual results:
Adding interface is trying to use first IP address from the subnet range, but it's already used as gateway, so red popup is displayed instead:
Error: Failed to add_interface: Unable to complete operation for network 490131be-13e9-49b8-b515-6d2dec8847da. The IP address 10.0.0.1 is in use.

Expected results:
The first unoccupied address is selected automatically.

Additional info:
If is new subnet created with gateway IP from beginning, router port is created successfully and it picks the same IP as is defined as subnet gateway

Comment 2 Martin Pavlásek 2016-03-03 08:58:47 UTC
I've forgotten to mention version of packages (RHEL 7.2):

python-django-horizon-8.0.1-1.el7ost.noarch
openstack-dashboard-8.0.1-1.el7ost.noarch
openstack-packstack-puppet-7.0.0-0.12.dev1699.g8f54936.el7ost.noarch
openstack-neutron-common-7.0.1-10.el7ost.noarch
openstack-neutron-ml2-7.0.1-10.el7ost.noarch
openstack-neutron-7.0.1-10.el7ost.noarch

Comment 3 Matthias Runge 2016-03-07 09:09:35 UTC
I don't see, how this is specifically related to the product. Moving this upstream


Note You need to log in before you can comment on or make changes to this bug.