Impossible to remove gateway_ip from a subnet

Bug #1185518 reported by Adin Scannell
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Confirmed
Medium
Unassigned

Bug Description

When trying to update a subnet in order to remove the gateway_ip, there is a hard-coded check that does validation on the given gateway ip address.

However in this case, None is a valid gateway_ip (and indicates no gateway) as per the logic in create_subnet.

Patch to be submitted shortly.

Revision history for this message
Adin Scannell (amscanne) wrote :

Patch submitted here:
http://review.openstack.org/30918

Revision history for this message
yong sheng gong (gongysh) wrote :

It seems we should bring back the discussion of 'reset the attrs of resources'.

Revision history for this message
Adin Scannell (amscanne) wrote :

I'm not at all opposed to whatever discussion this may bring up -- but this specific bug just seems to be a simple, small oversight in the update_subnet implementation. Thought I would submit a similarly trivial fix!

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

From my point of view, setting the attribute to null in the API should suffice to reset it, just like the attribute is set to null for creating a subnet without a gateway.
This would be consistent with the current semantics of the API.

I don't think it was a simple oversight however, since this has some implications on IPAM too.

The discussion about how to reset attribute pertained more the CLI if I recall correctly, and was more about distinguishing clearing from 'reset to default'. On the server side this shouldn't be problematic at all, unless, as it happened in the past, we're planning to change the API for suiting the CLI needs...

Changed in quantum:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Adin Scannell (amscanne) wrote :

I will add that it is currently impossible to submit null from the CLI. You've got to write a bit of python. Obviously also an issue, but independent.

Curious -- what are the implications for IPAM beyond those normally associated with changing the gateway?

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Implications for IPAM are:
1) DHCP agent should be notified so that when lease expires the default route is removed from running VMs
2) If a network:router_interface port is using the gateway_ip address we need to understand whether we want to raise (probably not), or add the gateway ip to the allocation pool (probably not either).

When creating a subnet you can submit a null gateway with --no-gateway. The CLI has no mechanism for explicitly specifying null values, as you say.

tags: added: api cli l3-ipam-dhcp
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.