Comment 5 for bug 1367060

Revision history for this message
Dan Sneddon (dsneddon) wrote : Re: [Bug 1367060] Re: nova network-create allows invalid fixed-ip creation

This bug only applies to Nova Network. Perhaps I should have made that more clear in the bug report.

> On Sep 12, 2014, at 10:55 AM, Thang Pham <email address hidden> wrote:
>
> I only noticed it (specifically using "nova network-create") with nova-
> network. If neutron is enabled, "nova network-create" throws a
> NotImplementedError exception.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1367060
>
> Title:
> nova network-create allows invalid fixed-ip creation
>
> Status in OpenStack Compute (Nova):
> In Progress
>
> 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".
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nova/+bug/1367060/+subscriptions