amazon-ec2rubber

rubber ec2 deployment Duplicate Default security groups


I am getting this error when i run the command: cap rubber:create_staging

response_call': Duplicate => the specified rule \"peer: sg-86b557e9, TCP, from port: 1, to port: 65535, ALLOW\" already exists (Fog::Compute::AWS::Error) from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/response_parser.rb:26:inresponse_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:402:in response' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:272:inrequest' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/idempotent.rb:12:in error_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:inerror_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:in error_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:292:inrescue in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:229:in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/idempotent.rb:12:inerror_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:in error_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:inerror_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:292:in rescue in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:229:inrequest' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/idempotent.rb:12:in error_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:inerror_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/middlewares/base.rb:10:in error_call' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:292:inrescue in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/excon-0.37.0/lib/excon/connection.rb:229:in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/xml/sax_parser_connection.rb:35:inrequest' from /home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/xml.rb:21:in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/aws/compute.rb:462:in_request' from /home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/aws/compute.rb:457:in request' from /home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb:49:inauthorize_security_group_ingress' from /home/user/.rvm/gems/ruby-2.1.0/gems/fog-1.22.1/lib/fog/aws/models/compute/security_group.rb:102:in authorize_port_range' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:380:inadd_security_group_rule' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:481:in block (2 levels) in sync_security_groups' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:476:ineach' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:476:in block in sync_security_groups' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:405:ineach' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:405:in sync_security_groups' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:260:insetup_security_groups' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/cloud/aws.rb:75:in before_create_instance' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/thread_safe_proxy.rb:13:inmethod_missing' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/recipes/rubber/instances.rb:267:in block in create_instance' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:inmon_synchronize' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/recipes/rubber/instances.rb:266:in create_instance' from /home/user/.rvm/gems/ruby-2.1.0/gems/rubber-2.10.0/lib/rubber/recipes/rubber/instances.rb:230:inblock (2 levels) in create_instances'


Solution

  • I just found a workaround, although I'm not sure how secure it is.

    I went onto my instance and edited the default group. I removed all the inbound rules except for the most basic one. This one I then opened up to anyone:

    screenshot

    That seemed to fix the problem.

    UPDATE: This was fixed in a recent commit to Rubber. I'm currently pointed to the github repo, but you can also wait for 2.10.1 to come out.