Introduction

Amazon Web Services (AWS) provides EIP (Elastic IP) addresses which are static IP's that are associated with account which allows users to dynamically re-map to any instances they own [1][2]. ElP addresses allow to mask instance or availability zone failures by programmatically remapping to any instance account owns. Static allocation and dynamic remapping capabilities signifies the 'elasticity' in EIP and differentiates from the default dynamically allocated public ip for the instance. EIP combined with availability zone are used to build fail-over application architecture in AWS [3].

CloudStack provides users with ability to acquire zone level public IP's (that are static) in advanced zone that are associated with the account. Users also have control to create and recreate static nat with any instances they own. An acquired zone level public IP is associated with a guest network, so public IP can be used to associate with any instances in the guest network. With 'regions' and 'object store' vision of CloudStack, users would be able to launch instances across the zones. But there is no ability to transfer static public IP allocated to account across the zones to build a fail over strategy. It is desirable to bring the elastic characteristics of EIP in to CloudStack i.e) ability to transfer public IP across zones.

Goals

This proposal would like to introduce following functionality.

  1. introduce a new category of public IP called 'portable public ip' that are provisioned by admin at region level and are available for user consumption
  2. user's shall be able to acquire portable public IP if admin has provisioned portable public ip's at region level
  3. acquired portable public IP shall be able to used by user for any service with in advanced zone
  4. acquired portable public IP shall be usable for EIP service with in basic zone
  5. acquired portable public IP can associated and disassociated with any virtual network and VPC.
  6. acquired portable public IP association can be transferred from one network to another network

Document History

Version

Author

Date

Changes

Draft

Murali Reddy

15-Apr 2012

 

References

[1] http://aws.amazon.com/articles/1346

[2] http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html

[3] http://support.rightscale.com/09-Clouds/AWS/02-Amazon_EC2/Designing_Failover_Architectures_on_EC2/00-Best_Practices_for_using_Elastic_IPs_(EIP)_and_Availability_Zones

[4] http://docs.aws.amazon.com/AWSEC2/latest/APIReference/OperationList-query.html

[5] https://cwiki.apache.org/confluence/display/CLOUDSTACK/GSLB+(Global+Server+Load+Balancing)+Functional+specification+and+Design+Document

Functional requirements & non-requirements

region level portable public ip detailed design

This section presents the detailed design for the region level portable public ip service functionality. 

User API

associateIPAddress

associateIpAddress shall be enhanced to acquire a portable IP from the pool of portable public IP's provisioned at region level

Request parameters:

API Response: IPAddressResponse response shall be enhanced to return 'isPortable' parameter, that indicated portable IP is portable or not

disassociateIpAddress

release of portable public IP shall be performed by disassociateIpAddress API. There are no changes required from API perspective.

Admin API

Following administrator API shall be introduced to add/delete/list portable IP addresses in to/from portable public IP address pool

createPortableIpAddressRange

Request parameters:

API Response: PortableIpRangeResponse 

deletePortableIpAddressRange

Request parameters:

API response: will return 'SuccessResponse' on success

listPortableIpAddressRanges

Request parameters:

API Response: list of PortableIpRangeResponse objects

Api Response

'PortableAddressReponse' shall be introduced as API response object with following details

zone id, vm id, nic id, guest IP shall be not null only if 'associated' is true.  account name and domain id shall be not null only if state is allocated or releasing

Service Layer changes

allocatePortableIP: allocates a portable IP and associates portable IP to an account. Shall be called by associateIpAddress API when is_portable set to true. This method shall call allocatePortableIP method in network service layer.

releasePortableIpAddress: release portable ip association with an account. Shall be called by disassociateIpAddress API. This method shall call release public IP method in network manager.

Network Manager layer changes

- allocatePortableIp: allocates a portable IP from the range of portable IP's configured by admin. If admin has not provisioned portable IP's then then this method call shall fail.

- IP address release: dissociated a portable IP address with an account

- associatePortableIPToGuestNetwork: associates portable IP to a guest network

- disassociatePortableIPToGuestNetwork: disassociated a portable from a guest network. This new interface method shall only be called when 'isPortableIpTransferableFromNetwork' return true.

- isPortableIpTransferableFromNetwork: A new manager interface method shall be added. Should return true if portable IP is not associated with any services in a network. Returns false if portable IP is used for a purpose (firewall, LB, NAT, PF )

- Network delete: On network delete, default behaviour is to release the public IP's associated with the network. This behaviour shall be changed so that, portable IP shall be associated with the account. But portable IP shall be marked not associated with any network

RulesManager changes

Schema changes

'portable_ip_range' shall be added with following cloulmns

'portable_ip_address' table shall be added with following columns

'user_ip_address' table shall be enhanced with is_portable flag to indicate public ip is portable

Auditing

Action Events

When user transfers from portable IP from zone to another zone admin needs to be aware of the transfer so that required out-of-band actions can be taken. A new 'Action Event' shall be generated on every association and re-association of portable ip with a service in same zone or different zone with details of source and destination zone details.

Usage events

When a portable public IP is acquired or released an usage event shall be generated.