RFE: Need API to provide network IP allocation counts

Bug #1457986 reported by David Bingham
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Wishlist
David Bingham

Bug Description

Operators have requested an API that allows them to quickly and easily determine the IP capacity of a network or subnet. Rather than discovering a network is full, an api could be proactively called by an operator or monitor to give some measure of when a network is reaching its capacity.

Some things desired from a new API for both network and subnets
* used IPs - How many IPs are reserved from a network/subnet
* total IPs - The capacity of IPs for this network/subnet
* Enough information about the network/subnet to be able to fetch detailed information about the resource (possible examples: id, name)

Naturally used_ips/total_ips gives the user a way to determine the percentage the resource has been consumed.

Some references to those needing this API:
* Philidelphia operators at the OPs meetup expressed great interest after watching a presentation describing this use.
* GoDaddy in-house implementation: In use for 1+ years. Also called by in-house NetworkAwareFilterScheduler. GoDaddy implementation:https://github.com/godaddy/openstack-neutron/commit/fcf325f9f9f7a9f87ba6bc1c53f9212d0e2decee
* Rackspace implementation: https://github.com/rackerlabs/quark/blob/master/quark/ip_availability.py#L48

Some notes about related patches (added 2015-11-17):
* https://review.openstack.org/180803 (Neutron Spec)
* https://review.openstack.org/#/c/212955 (Neutron patch)
* https://review.openstack.org/#/c/234541 (Second Neutron patch)

Changed in neutron:
assignee: nobody → David Bingham (wwriverrat)
description: updated
Changed in neutron:
status: New → In Progress
Changed in neutron:
assignee: David Bingham (wwriverrat) → Mike Dorman (mdorman-m)
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Guidelines, details on how to write RFE's, and the process for handling features if you have already submitted specs in the past, but are yet to be complete. can be found here:

https://github.com/openstack/neutron/blob/master/doc/source/policies/blueprints.rst

For more details, please reach out on #openstack-neutron or openstack-dev ML [neutron].

Revision history for this message
Aihua Edward Li (aihuaedwardli) wrote :

I am trying to reach out by email. But my email got bounced back.

I have filed a launchpad issue 1503462. This is now marked as duplicate of 1457986.

I am glad to see there are more parties that are interested in this feature. I would like to see how we can coordinate the effort on this feature.

We have two use-cases for this feature:

1. To assist nova to select a network when creating a new VM instance.

    For this use-case, we like to have a tenant-id in GET request and get ip-margins for all the networks belong to the network.

2. To provide information to monitor tools to show the capacities on dash-board.

     For this use-case, we need to return network name in the response.

So ideally, we would like to have the following REST API:

GET on /v2.0/<tenant-id>, the returned data is in the form of

{ "network-1-uuid": { "total-ips" : 256
                       "available-ips" : count1,
                       "name" : test-network,
                    }

}

We also have the implementation and accompanying tempest test scripts.

I am curious to see where we are on this issue. Is the draft REST API ready? Can we incorporate my use-case input into the considerations.

<email address hidden>

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

I think the spec never got respinned. If someone is willing to take over, they should

Changed in neutron:
assignee: Mike Dorman (mdorman-m) → nobody
tags: added: rfe-approved
removed: rfe
tags: added: usability
removed: extension usage
Changed in neutron:
assignee: nobody → Aihua Edward Li (aihuaedwardli)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/233465

Revision history for this message
Mike Dorman (mdorman-m) wrote : Re: RFE: Need API to provide network IP usage information

I think we have kind of de-facto abandoned the spec in favor of getting this extension in without a spec. I have not had time to focus on this lately, hopefully we can make some progress on this at the summit.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/liberty)

Change abandoned by Aihua Edward Li (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/233465
Reason: Move this to master

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

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

Changed in neutron:
assignee: Aihua Edward Li (aihuaedwardli) → David Bingham (wwriverrat)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron-specs (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/180803
Reason: This review was last updated before Mitaka started - September, 23, 2015 - and it still targets Liberty, which has released. Feel free to resubmit to Mikata, but please follow the latest feature submission guidelines as defined in: http://docs.openstack.org/developer/neutron/policies/blueprints.html

Changed in neutron:
status: In Progress → New
assignee: David Bingham (wwriverrat) → nobody
status: New → Incomplete
summary: - RFE: Need API to provide network IP usage information
+ RFE: Need API to provide network IP allocation counts
Changed in neutron:
assignee: nobody → David Bingham (wwriverrat)
Changed in neutron:
importance: Undecided → Wishlist
Changed in neutron:
status: Incomplete → In Progress
description: updated
description: updated
Changed in neutron:
milestone: none → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Aihua Edward Li (<email address hidden>) on branch: master
Review: https://review.openstack.org/234541
Reason: abandon this change, focus on https://review.openstack.org/212955

Changed in neutron:
milestone: mitaka-1 → mitaka-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-specs (master)

Reviewed: https://review.openstack.org/180803
Committed: https://git.openstack.org/cgit/openstack/neutron-specs/commit/?id=8a8a48216da5fe9c92cf6071a964964f9ef89fbd
Submitter: Jenkins
Branch: master

commit 8a8a48216da5fe9c92cf6071a964964f9ef89fbd
Author: dbingham <email address hidden>
Date: Mon Nov 30 18:54:14 2015 -0700

    Network IP Availability Extension API

    Add a new network IP availability API Extension for operators to predict
    and react when networks are reaching IP capacity.

    ip availability api extension rfe

    APIImpact
    DocImpact

    Change-Id: Ifd42982aea5bbfc095e30bd2a221ec472d55519a
    Implements: blueprint network-ip-usage-api
    Closes-Bug: 1457986

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Only the spec merged

Changed in neutron:
status: Fix Released → In Progress
milestone: mitaka-2 → mitaka-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/212955
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2f741ca5f9545c388270ddab774e9e030b006d8a
Submitter: Jenkins
Branch: master

commit 2f741ca5f9545c388270ddab774e9e030b006d8a
Author: Mike Dorman <email address hidden>
Date: Thu Aug 13 21:24:58 2015 -0600

    Add API extension for reporting IP availability usage statistics

    Implements an API extension for reporting availibility of IP
    addresses on Neutron networks/subnets based on the blueprint
    proposed at https://review.openstack.org/#/c/180803/

    This provides an easy way for operators to count the number of
    used and total IP addresses on any or all networks and/or
    subnets.

    Co-Authored-By: David Bingham <email address hidden>
    Co-Authored-By: Craig Jellick <email address hidden>

    APIImpact
    DocImpact: As a new API, will need all new docs. See devref for details.

    Implements: blueprint network-ip-usage-api
    Closes-Bug: 1457986
    Change-Id: I81406054d46b2c0e0ffcd56e898e329f943ba46f

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b3

This issue was fixed in the openstack/neutron 8.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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