Project

General

Profile

Bug #2490

Empty EC2 security group can't be found

Added by Dominic Cleal about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When creating an EC2 host, an empty security group gets passed in and causes an error in fog:

Started POST "/hosts" for 127.0.0.1 at 2013-05-13 09:38:04 +0100
Processing by HostsController#create as */*
Parameters: {... "groups"=>["", "default"], ...}
Fog error: The security group '' does not exist
/home/dcleal/.rvm/gems/ruby-2.0.0-p0@foreman/gems/excon-0.20.1/lib/excon/middlewares/expects.rb:6:in `response_call'
/home/dcleal/.rvm/gems/ruby-2.0.0-p0@foreman/gems/excon-0.20.1/lib/excon/connection.rb:332:in `response'
/home/dcleal/.rvm/gems/ruby-2.0.0-p0@foreman/gems/excon-0.20.1/lib/excon/connection.rb:226:in `request'
/home/dcleal/.rvm/gems/ruby-2.0.0-p0@foreman/gems/fog-1.10.1/lib/fog/core/connection.rb:21:in `request'
/home/dcleal/.rvm/gems/ruby-2.0.0-p0@foreman/gems/fog-1.10.1/lib/fog/aws/compute.rb:384:in `_request'
/home/dcleal/.rvm/gems/ruby-2.0.0-p0@foreman/gems/fog-1.10.1/lib/fog/aws/compute.rb:379:in `request'
/home/dcleal/.rvm/gems/ruby-2.0.0-p0@foreman/gems/fog-1.10.1/lib/fog/aws/requests/compute/run_instances.rb:112:in `run_instances'
/home/dcleal/.rvm/gems/ruby-2.0.0-p0@foreman/gems/fog-1.10.1/lib/fog/aws/models/compute/server.rb:173:in `save'
/home/dcleal/.rvm/gems/ruby-2.0.0-p0@foreman/gems/fog-1.10.1/lib/fog/core/collection.rb:52:in `create'
/home/dcleal/code/foreman/foreman/app/models/compute_resource.rb:117:in `create_vm'
/home/dcleal/code/foreman/foreman/lib/foreman/model/ec2.rb:42:in `create_vm'

Associated revisions

Revision 11ea79ce (diff)
Added by Stef Telford about 6 years ago

fixes #2490 - filter empty EC2 security groups

Revision 0c857d7c (diff)
Added by Stef Telford about 6 years ago

fixes #2490 - filter empty EC2 security groups
(cherry picked from commit 11ea79ceacc2c9d0f2abed59a922b80d58c9031a)

History

#1 Updated by Dominic Cleal about 6 years ago

  • Status changed from Assigned to Ready For Testing

Submitted Stef's fix (from IRC):

https://github.com/theforeman/foreman/pull/610

#2 Updated by Anonymous about 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF