nova network-create allows invalid fixed-ip creation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Thang Pham |
Bug Description
Creating a network with 'nova network-create' allows the creation of fixed-ips that fall outside the fixed-range-v4, resulting in invalid fixed IPs.
To recreate:
Create a network with network-create that contains a fixed-cidr that falls outside the fixed-range-v4.
Actual outcome:
If the user runs the following command
nova network-create vmnet --fixed-range-v4 10.1.0.0/24 --fixed-cidr 10.20.0.0/16 --bridge br-100
This command succeeds, and creates invalid fixed IPs which can be retrieved with 'nova fixed-ip-get', for example:
nova fixed-ip-get 10.20.0.1
+------
| address | cidr | hostname | host |
+------
| 10.20.0.1 | 10.1.0.0/24 | - | - |
+------
This address falls outside the cidr, so is invalid.
Desired outcome:
Nova network-create should verify that the fixed-cidr is a subset of fixed-range-v4, if the fixed-cidr falls outside of the fixed-range-v4 the command should fail with an error, such as "ERROR: fixed-cidr must be a subset of fixed-range-v4".
Changed in nova: | |
assignee: | nobody → Thang Pham (thang-pham) |
Changed in nova: | |
milestone: | none → kilo-1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-1 → 2015.1.0 |
This is at best a medium bug given that it's admin apis