Subnet creation (Quantum) defaults to mask /32

Bug #1102504 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Julie Pichon
Folsom
Fix Released
Medium
Julie Pichon

Bug Description

When creating a subnet during the network creation process, if the user doesn't include a mask in the Network address field, the subnet mask defaults to /32, making it impossible to allocate an IP when launching an instance later on (Quantum logs: IpAddressGenerationFailure No more IP addresses available on network). It's easy to miss when creating a new network.

Steps to reproduce:
1. Go to the network page and create a new network
2. On the subnet page, specify an ip without a netmask
3. Try to launch an instance with that network

Actual results:
The subnet was created with a netmask of /32 and the instance errors.

Expected results:
Probably creating a subnet without a netmask should fail. Quantum does allow you to create a subnet with cidr /32, but because providing the netmask is mandatory this problem is less likely to happen.

Julie Pichon (jpichon)
description: updated
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Makes sense to me.

Changed in horizon:
importance: Undecided → Medium
milestone: none → grizzly-3
status: New → Confirmed
Julie Pichon (jpichon)
Changed in horizon:
assignee: nobody → Julie Pichon (jpichon)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/20493

Revision history for this message
Julie Pichon (jpichon) wrote :

After a few attempts at also adding partial or complete client-side validation to require a mask resulted in getting bogged down with more and more difficult to read and maintain Javascript IP address validation code, I decided to focus on a solution that only validates server-side, and prevent the creation of networks with a mask matching a single IP altogether.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/20493
Committed: http://github.com/openstack/horizon/commit/05207f58c2182a396bb360e64b7e2b66270a6323
Submitter: Jenkins
Branch: master

commit 05207f58c2182a396bb360e64b7e2b66270a6323
Author: Julie Pichon <email address hidden>
Date: Fri Jan 25 16:26:20 2013 +0000

    Prevent the user from creating a single IP address sized network

    If the user doesn't specify a mask when creating a subnet, the mask
    defaults to /32 (IPv4) or /128 (IPv6) making it impossible to allocate
    an IP address when later launching an instance. This patch prevents
    creating a subnet with such a small mask.

    Fixes bug #1102504

    Change-Id: I4962e0a416b8ec9aca013e41783994f65c22a989

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/21120

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/folsom)

Reviewed: https://review.openstack.org/21120
Committed: http://github.com/openstack/horizon/commit/1af5e786ae37c7b65cb9384738465b87d851000a
Submitter: Jenkins
Branch: stable/folsom

commit 1af5e786ae37c7b65cb9384738465b87d851000a
Author: Julie Pichon <email address hidden>
Date: Fri Jan 25 16:26:20 2013 +0000

    Prevent the user from creating a single IP address sized network

    If the user doesn't specify a mask when creating a subnet, the mask
    defaults to /32 (IPv4) or /128 (IPv6) making it impossible to allocate
    an IP address when later launching an instance. This patch prevents
    creating a subnet with such a small mask.

    Fixes bug #1102504

    Change-Id: I4962e0a416b8ec9aca013e41783994f65c22a989

Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/23799

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/folsom)

Reviewed: https://review.openstack.org/23799
Committed: http://github.com/openstack/horizon/commit/6e1d0690c9c0ed27ede0d2fc44e4d771a8ec0da1
Submitter: Jenkins
Branch: stable/folsom

commit 6e1d0690c9c0ed27ede0d2fc44e4d771a8ec0da1
Author: Julie Pichon <email address hidden>
Date: Wed Mar 6 17:11:02 2013 +0000

    Prevent creating a single IP address sized network (network details)

    The backport for bug #1102504 was incomplete and did not cover
    providing the same error message when creating a subnet from the
    network details page.

    This additional patch is not needed on the master branch, as subnet
    creation was refactored during the grizzly cycle.

    Fixes bug #1149890

    Change-Id: I451e37c347a6540825ad9bf66d4a32c39601dd19

Thierry Carrez (ttx)
Changed in horizon:
milestone: grizzly-3 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers