rapid7 / builderator

Tools to make CI Packer builds awesome
MIT License
23 stars 9 forks source link

Retry security group create/delete on aws errors #122

Closed rdickey-r7 closed 6 years ago

rdickey-r7 commented 6 years ago

Sometimes, a security group will fail to create or delete, causing a build to fail with this error:

.../aws-sdk-core-2.11.26/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call':
An internal error has occurred (Aws::EC2::Errors::InternalError)
  .../aws-sdk-core-2.11.26/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
  .../aws-sdk-core-2.11.26/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'
  .../aws-sdk-core-2.11.26/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
  .../aws-sdk-core-2.11.26/lib/seahorse/client/plugins/response_target.rb:21:in `call'
  .../aws-sdk-core-2.11.26/lib/seahorse/client/request.rb:70:in `send_request'
  .../aws-sdk-core-2.11.26/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
  .../builderator-2.0.3/lib/builderator/util.rb:92:in `remove_security_group'
  .../builderator-2.0.3/lib/builderator/interface/packer.rb:80:in `block (3 levels) in initialize'

This is subcromulent, and is fixed by this commit.