nova-manage floating create interprets /32 range as being wider than the /31 range

Bug #951161 reported by Eoghan Glynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Eoghan Glynn

Bug Description

The implementation of 'nova-manage floating create' special-cases the /32 address range, so that:

   a.b.c.d/32 => [a.b.c.d]

However the logic of netaddr.IPNetwork.iter_hosts() is such that:

   a.b.c.d/31 => []

So effectively the /32 range is wider than the /31 range, whereas intuitively the opposite should be the case.

Eoghan Glynn (eglynn)
Changed in nova:
assignee: nobody → Eoghan Glynn (eglynn)
status: New → In Progress
Eoghan Glynn (eglynn)
description: updated
description: updated
Revision history for this message
Eoghan Glynn (eglynn) wrote :

The special-casing of /32 was introduced in:

  https://github.com/openstack/nova/commit/e430c842

as a work-around for the lack of ability to create a floating IP for a specific individual address.

This would be better achieved by just dropping the range altogether, such that:

  nova-manage floating create 192.168.1.150

creates a single flotaing IP address for that specific address.

This would avoid the contradictions inherent in how the /32 versus /31 ranges are currently handled.

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

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

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

Reviewed: https://review.openstack.org/5227
Committed: http://github.com/openstack/nova/commit/c5e51415282330030385304c5af8216e47b84991
Submitter: Jenkins
Branch: master

commit c5e51415282330030385304c5af8216e47b84991
Author: Eoghan Glynn <email address hidden>
Date: Mon Mar 12 10:27:24 2012 +0000

    Avoid nova-manage floating create <IP addr>/32

    Fixes bug 951161

    Avoid the counter-intuitive use of the /32 range to indicate a specific
    individial IP address.

    Instead a floating IP for a specific individual address is created by
    dropping the range specifier altogether, e.g.:

      nova-manage floating create 192.168.1.150

    Change-Id: I54b124e961accefa47f6faa7f201809c545c3fa5

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.