OpenStack Compute (Nova)

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

Reported by Eoghan Glynn on 2012-03-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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) on 2012-03-09
Changed in nova:
assignee: nobody → Eoghan Glynn (eglynn)
status: New → In Progress
Eoghan Glynn (eglynn) on 2012-03-12
description: updated
description: updated
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.

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) on 2012-03-20
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers