Can't specify gateway when creating subnet with subnetpool and without cidr
Bug #1518819 reported by
Hong Hui Xiao
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Expired
|
Wishlist
|
Unassigned |
Bug Description
When creating a subnet by using the subnetpool(without specifying cidr), I can't specify the gateway. Either using --no-gateway or --gateway, the newly created subnet will have the first ip in the pool as the the gateway ip.
Looks like the code don't consider gateway ip at [1], and always set the first ip in pool as gateway ip in [2].
I fount this when creating an external network, which don't have a gateway indeed. The unnecessary gateway ip will create meaningless default route in router.
[1] https:/
[2] https:/
Changed in neutron: | |
assignee: | nobody → Hong Hui Xiao (xiaohhui) |
summary: |
- Can't specify gateway when creating subnet with subnetpool + Can't specify gateway when creating subnet with subnetpool and without + cidr |
tags: | added: api |
Changed in neutron: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: l3-dvr-backlog |
To post a comment you must log in.
I don't think I have any links to share about this but there was a lot of discussion on this in the blueprint spec and possibly the ML. The discussion was centered around how does one specify such a gateway? You don't know the network address of the subnet so you can't specify the gateway address.
In some versions of the spec, I had proposed that the gateway address and allocation pools could be specified by using 0 as the network address. For example, you'd specify 0.0.0.0.3 if you wanted to use the third address in the resulting. So, if the subnet ended up being 192.168.0.128/25 then your gateway would end up being 192.168.0.131. There were objections to using the gateway field for this because it would be somewhat non-RESTful to return a different gateway than the one in the request. I then proposed using a new input-only field called gateway_template or something.
In the end, a few people argued that if you don't care what the subnet is then why would you care what gateway address or allocation pool you get in the subnet? We settled on not allowing you to specify the gateway address in this use case.