Jump to: navigation, search

Neutron/Quantum-floating-ips

< Neutron
Revision as of 02:35, 8 July 2012 by Gongysh (talk)

Quantum Floating IPs

Summary

Nova has a concept of Fixed IPs and Floating IPs. Fixed IPs are assigned to an instance on creation and stay the same until the instance is explicitly terminated. Floating ips are ip addresses that can be dynamically associated with an instance. This address can be disassociated and associated with another instance at any time.

We can see how the Floating IPs are implemented by nova at: https://www.ibm.com/developerworks/mydeveloperworks/blogs/e93514d3-c4f0-4aa0-8844-497f370090f5/entry/openstack_s_floating_ips7?lang=en

This page describes how this feature is implemented in quantum.

User stories

  • create IP ranges under a certain group, only available for admin role.
  • allocate an floating IP to a certain tenant, only available for admin role.
  • deallocate an floating IP from a certain tenant
  • associate an floating IP to a given instance
  • disassociate an floating IP from a certain instance

Assumptions

N/A

Components to consider

To implement floating IPs in quantum, we have to consider:

  • Quantum client floating features, just like the one in nova client
  • Quantum API for floating features
  • Agent to implement IP table rules and bind floating IP to public interface.

In addition, we need to integrate:

  • Nova network API floating features

Design

Overview

File:Quantum$$Quantum-floating-ips$floating-ips.png

Just as shown by above fiture, we will have nova-network-api to support nova client floating commands. nova-network-api will invoke quantum cli lib to interactive with quantum server via API. The data about floating IPs will be store in to quantum DB. Quantum Agent, which is running on compute host will enforce the floating IP.

floating-ip top level resource

  • create a range of floating ips

POST /v2.0/floating-ips/

  • list floating ips under certain tenant or all tenants

GET /v2.0/floating-ips/

  • delete a floating ip

DELETE /v2.0/floating-ips/{ipid}

  • allocate a floating IP to a certain tenant from a given IP pool

POST /v2.0/floating-ips/action {"allocate": {"tenant_id": "xxxx"}} Note: tenant_id can be got from context if it is missing.

  • deallocate one floating IP from a certain tenant

POST /v2.0/floating-ips/{ipid}/action {"deallocate": {"tenant_id": "xxx"}} Note: tenant_id can be got from context if it is missing.

  • associate a floating IP to a certain instance

POST /v2.0/floating-ips/{ipid}/action {"associate": {"instance_id": "xxx", "interface": "eth0"}}

  • disassociate a floating IP from a certain instance

POST /v2.0/floating-ips/{ipid}/action {"disassociate": {"instance_id": "xxx"}}

Unresolved issues

  • Can a Floating IP be an IPv6 address?
  • Do we need to delete a range of floating ips?