Create a router interface without providing an IP address should automatically take the next available IP in subnet range

Bug #1570486 reported by Daniel Castellanos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Triaged
Wishlist
Unassigned

Bug Description

When creating a Router Interface without providing an IP address (optional field) the code should take the next available ip address in subnet range.

Currently if you create a router interface in a subnet with a CIDR 10.1.0.0/20 and if you don't provide an IP address, the default ip address will always be set to 10.1.0.1, but if that IP address is already taken by another interface then the interface creation will fail informing the user the reason for the failure (which is ok)

I think the code should be intelligent enough to grab the next available ip address in the range when creating a router interface without providing the ip address, or even suggest (autofill) a value for that field

Tags: neutron ux
summary: Create a router interface without providing an IP address should
- automatically take the next available ip address in range
+ automatically take the next available IP in subnet range
description: updated
Sirisha (sirisha-1)
Changed in horizon:
assignee: nobody → Sirisha (sirisha-1)
Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Is this actually a Horizon bug? It sounds like the logic for this should be handled on the API side (Neutron) not by us.

Changed in horizon:
importance: Undecided → Wishlist
milestone: none → next
status: New → Incomplete
Revision history for this message
Daniel Castellanos (luis-daniel-castellanos) wrote :

Well yeah, I Agree with you Rob Cresswell. There are many implications trying to solve this on the horizon side (or only in the horizon side) I think it was worth it to expose this behavior as an UX issue... at the end the neutron API should handle that for us or at least handle the logic to get the next available IP and expose that through the API.

Sirisha (sirisha-1)
Changed in horizon:
assignee: Sirisha (sirisha-1) → nobody
Akihiro Motoki (amotoki)
Changed in horizon:
importance: Wishlist → Undecided
milestone: next → none
importance: Undecided → Wishlist
Revision history for this message
Akihiro Motoki (amotoki) wrote :

The case reported here happens when a user tries to connect a subnet to multiple routers. The first router interface consumes gateway_ip of the subnet. When connecting to the second router, the user needs to specify IP address of the interface.

I guess what the bug author requests is to allow users to add router interface without knowing an unused IP address.

There are several solutions. The way written in the bug description is a possible option.

Another way in my mind is to have a fallback mechanism which first tries to add a router interface with a specified subnet and if 409 (Conflict) is returned it creates a port on the requested subnet and then add a router interface using the created port. Creating a port allocates an unused IP address, so it behaves like auto-allocation of IP address for the router interface.
(Note that "Add Interface" form now lists subnets which are not connected to a requested router, so the above solution would work.)

Akihiro Motoki (amotoki)
Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
status: Incomplete → Triaged
Akihiro Motoki (amotoki)
Changed in horizon:
assignee: Akihiro Motoki (amotoki) → nobody
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.