[PDB-1263] Round robin support for EC2 subnets Created: 2015/02/25  Updated: 2015/06/04  Resolved: 2015/04/23

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: None
Fix Version/s: PDB 2.3.5

Type: New Feature Priority: Normal
Reporter: Ryan Senior Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
is blocked by BKR-217 Add round robin support for EC2 subnets Resolved
Support
is supported by PDB-1466 Handle review feedback for EC2 round ... Closed
Template:
Epic Link: QA/QEng Phase 1
Story Points: 8
Sprint: PuppetDB 2015-04-22

 Description   

Using VPCs requires that we pin our instances to a specific subnet which also implies a specific availability zone. Under normal conditions this is fine, but when one availability zone is at capacity, it results in errors like the one below:

[AWS EC2 500 0.194905 0 retries] run_instances(:block_device_mappings=>[{:device_name=>"/dev/sda1",:ebs=>{:delete_on_termination=>true,:volume_size=>8}}],:client_token=>"35a3e6d2-119b-431b-94c1-7bcebe5af82f",:disable_api_termination=>false,:image_id=>"ami-bd420e8d",:instance_initiated_shutdown_behavior=>"terminate",:instance_type=>"c3.large",:key_name=>"Beaker-jenkins-sector",:max_count=>1,:min_count=>1,:monitoring=>{:enabled=>true},:security_group_ids=>["sg-9f6926fa"],:subnet_id=>"subnet-92dd65f7") AWS::EC2::Errors::InsufficientInstanceCapacity We currently do not have sufficient c3.large capacity in the Availability Zone you requested (us-west-2b). Our system will be working on provisioning additional capacity. You can currently get c3.large capacity by not specifying an Availability Zone in your request or choosing us-west-2a, us-west-2c.
Failed: errored in CLI.provision
#<AWS::EC2::Errors::InsufficientInstanceCapacity: We currently do not have sufficient c3.large capacity in the Availability Zone you requested (us-west-2b). Our system will be working on provisioning additional capacity. You can currently get c3.large capacity by not specifying an Availability Zone in your request or choosing us-west-2a, us-west-2c.>

If we were not specifying an availability zone, it would have just picked one of the other zones that were under capacity (and we would have not seen the error). Since we need to have the subnet pinned in order to use VPCs Ken Barber has created a subnet in each of the zones. If we were able to specify a list of subnet ids and beaker was able to roll to the next subnet when one failed, it would give us the same ability as not specifying a vpc/subnet.

This change involves changing Beaker to support a list of subnets, the failover code and updating PuppetDB to take advantage of that new subnet list feature.



 Comments   
Comment by Rob Browning [ 2015/04/15 ]

Currently waiting for preliminary team review.

Comment by Rob Browning [ 2015/04/22 ]

Issued initial upstream pull request: https://github.com/puppetlabs/beaker/pull/791

Comment by Ken Barber [ 2015/04/23 ]

I'm guessing this is meant to be "Ready for merge" not "Needs information" since its in review by the beaker team now?

Comment by Wyatt Alt [ 2015/05/06 ]

I'm removing 2.3.x as a fix version here. I'll add it back in a bit later.

Comment by Wyatt Alt [ 2015/05/07 ]

replacing 2.3.x as the fix version.

Generated at Mon Dec 09 12:26:15 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.