It's not possible to set gateway_ip of Subnet to None
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Steve Baker |
Bug Description
Hi,
In Neutron the "gateway_ip" field of a subnet is treaded differently depending of wether it's was set by user to None or not given which respectively mean don't set a gateway ip for gateway_ip=None and choose first available ip as gateway ip in the case where it's not given.
Now from Heat perspective if you set gateway_ip in the template to "null", heat will interpreter as if gateway_ip was set to empty string which will make Neutron raise an exception telling you that **'' is not a valid ip**, so AFAIK there is no way right now to create a subnet from Heat with no gateway ip.
Two possible fixes that i have in mind:
1- I tried to create a patch to enable using "null" as a value to gateway_ip and adding a new schema option AcceptNone (true or false) which IMHO sound to me like the correct way to handle this (and any upcoming cases Where None has a special meaning), but i found (the hard way) that Heat treat None and "not set" as the same thing and it rely heavily on this behavior which is very wrong IMHO.
2- Another fix which is specific to this case only (i.e. gateway ip) is to add a new resource Boolean property "no_gateway" and of course make sure that gateway_ip and this new property are mutually exclusive.
Thanks,
description: | updated |
description: | updated |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | havana-rc1 → 2013.2 |
Could you please describe exactly what should be passed to create_subnet for these cases?
- user specifies no gateway_ip
- user specifies 'null' for gateway_ip