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.
This proposal would like to introduce following functionality.
Version | Author | Date | Changes |
---|---|---|---|
Draft | Murali Reddy | 15-Apr 2012 |
|
[1] http://aws.amazon.com/articles/1346
[2] http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
[4] http://docs.aws.amazon.com/AWSEC2/latest/APIReference/OperationList-query.html
This section presents the detailed design for the region level portable public ip service functionality.
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
release of portable public IP shall be performed by disassociateIpAddress API. There are no changes required from API perspective.
Following administrator API shall be introduced to add/delete/list portable IP addresses in to/from portable public IP address pool
Request parameters:
API Response: PortableIpRangeResponse
Request parameters:
API response: will return 'SuccessResponse' on success
Request parameters:
API Response: list of PortableIpRangeResponse objects
'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
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.
- 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
'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
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.