Problem with security groups using Hammer

Hi everyone,

In short, I'm trying to create a host in AWS using foreman and hammer-cli.
Everything works fine except when including a security group. If I remove
"security_group_ids=XXXX" the host is created correctly, and it is included
into "default" security group.

Here are the steps. Using:

hammer -d host create --hostgroup-id=2 --compute-resource-id=1 --compute-
attributes=
"flavor_id=t1.micro,subnet_id=subnet-XXXXX,managed_ip=private,security_group_ids=sg-XXXXXX,image_id=ami-XXXXXXXX"
–name=NAME

throws the following error:

[DEBUG 2014-08-05 09:57:36 API] Params: {
"host" => {
"name" => "NAME",
"compute_resource_id" => "1",
"hostgroup_id" => "2",
"build" => true,
"enabled" => true,
"managed" => true,
"compute_attributes" => {
"flavor_id" => "t1.micro",
"subnet_id" => "subnet-XXXXXXXX",
"managed_ip" => "private",
"security_group_ids" => "sg-XXXXXXXX",
"image_id" => "ami-XXXXXXXX",
"volumes_attributes" => {},
"interfaces_attributes" => {},
"nics_attributes" => {}
},

"host_parameters_attributes" => {}
}
}

[DEBUG 2014-08-05 09:57:36 API] Headers: {}
[ERROR 2014-08-05 09:57:37 API] 422 Unprocessable Entity
{
"error" => {
"id" => nil,
"errors" => {
"base" => [
[0] "Failed to create a compute XXXX-AWS (eu-west-1-EC2) instance NAME:
undefined method reject!' for \"sg-XXXXX\":String\n " ] }, "full_messages" => [ [0] "Failed to create a compute XXXX-AWS (eu-west-1-EC2) instance NAME: undefined methodreject!' for "sg-XXXXX":String\n "
]
}
}

[ERROR 2014-08-05 09:57:37 Exception] Failed to create a compute XXXXXX (eu-
west-1-EC2) instance NAME: undefined method `reject!' for
"sg-XXXXXXXX":String

Could not create the host:

Failed to create a compute XXXX-AWS (eu-west-1-EC2) instance NAME:
undefined method `reject!' for "sg-XXXXX":String

What am I doing wrong? =S
Any clue?

Thanks in advance!

Updated!
Some info just before the first DEBUG message:

[ INFO 2014-08-05 09:57:36 HammerCLIForeman::Host::CreateCommand] Called
with options: {"option_compute_resource_id"=>"1", "option_managed"=>true,
"option_build"=>true, "option_enabled"=>true, "option_compute_attributes"=>{
"flavor_id"=>"t1.micro", "subnet_id"=>"subnet-XXXXX", "managed_ip"=>
"private", "security_group_ids"=>"sg-XXXXX", "image_id"=>"ami-XXXXX"},
"option_volume_list"=>[], "option_interface_list"=>[], "option_name"=>"NAME"
, "option_hostgroup_id"=>"2"}

··· El martes, 5 de agosto de 2014 14:56:02 UTC+2, jllucas escribió: > > Hi everyone, > > In short, I'm trying to create a host in AWS using foreman and hammer-cli. > Everything works fine except when including a security group. If I remove > "security_group_ids=XXXX" the host is created correctly, and it is included > into "default" security group. > > Here are the steps. Using: > > hammer -d host create --hostgroup-id=2 --compute-resource-id=1 --compute- > attributes= > "flavor_id=t1.micro,subnet_id=subnet-XXXXX,managed_ip=private,security_group_ids=sg-XXXXXX,image_id=ami-XXXXXXXX" > --name=NAME > > throws the following error: > > [DEBUG 2014-08-05 09:57:36 API] Params: { > "host" => { > "name" => "NAME", > "compute_resource_id" => "1", > "hostgroup_id" => "2", > "build" => true, > "enabled" => true, > "managed" => true, > "compute_attributes" => { > "flavor_id" => "t1.micro", > "subnet_id" => "subnet-XXXXXXXX", > "managed_ip" => "private", > "security_group_ids" => "sg-XXXXXXXX", > "image_id" => "ami-XXXXXXXX", > "volumes_attributes" => {}, > "interfaces_attributes" => {}, > "nics_attributes" => {} > }, > > "host_parameters_attributes" => {} > } > } > > [DEBUG 2014-08-05 09:57:36 API] Headers: {} > [ERROR 2014-08-05 09:57:37 API] 422 Unprocessable Entity > { > "error" => { > "id" => nil, > "errors" => { > "base" => [ > [0] "Failed to create a compute XXXX-AWS (eu-west-1-EC2) instance NAME: > undefined method `reject!' for \"sg-XXXXX\":String\n " > ] > }, > "full_messages" => [ > [0] "Failed to create a compute XXXX-AWS (eu-west-1-EC2) instance NAME: > undefined method `reject!' for \"sg-XXXXX\":String\n " > ] > } > } > > [ERROR 2014-08-05 09:57:37 Exception] Failed to create a compute XXXXXX ( > eu-west-1-EC2) instance NAME: undefined method `reject!' for > "sg-XXXXXXXX":String > > Could not create the host: > > Failed to create a compute XXXX-AWS (eu-west-1-EC2) instance NAME: > undefined method `reject!' for "sg-XXXXX":String > > > What am I doing wrong? =S > Any clue? > > Thanks in advance! >

Hello,
from the log you sent it looks the problem is somewhere in the api. Can
you please provide logs from your foreman server?

Regards
Tomas

··· On 08/05/2014 02:56 PM, jllucas wrote: > Hi everyone, > > In short, I'm trying to create a host in AWS using foreman and hammer-cli. > Everything works fine except when including a security group. If I > remove "security_group_ids=XXXX" the host is created correctly, and it > is included into "default" security group. > > Here are the steps. Using: > > > > hammer -d host create > --hostgroup-id=2--compute-resource-id=1--compute-attributes="flavor_id=t1.micro,subnet_id=subnet-XXXXX,managed_ip=private,security_group_ids=sg-XXXXXX,image_id=ami-XXXXXXXX"--name=NAME > > > > throws the following error: > > > > > [DEBUG 2014-08-0509:57:36API]Params:{ > "host"=>{ > "name"=>"NAME", > "compute_resource_id"=>"1", > "hostgroup_id"=>"2", > "build"=>true, > "enabled"=>true, > "managed"=>true, > "compute_attributes"=>{ > "flavor_id"=>"t1.micro", > "subnet_id"=>"subnet-XXXXXXXX", > "managed_ip"=>"private", > "security_group_ids"=>"sg-XXXXXXXX", > "image_id"=>"ami-XXXXXXXX", > "volumes_attributes"=>{}, > "interfaces_attributes"=>{}, > "nics_attributes"=>{} > }, > > "host_parameters_attributes"=>{} > } > } > > [DEBUG 2014-08-0509:57:36API]Headers:{} > [ERROR 2014-08-0509:57:37API]422UnprocessableEntity > { > "error"=>{ > "id"=>nil, > "errors"=>{ > "base"=>[ > [0]"Failed to create a compute XXXX-AWS (eu-west-1-EC2) instance NAME: > undefined method `reject!' for \"sg-XXXXX\":String\n " > ] > }, > "full_messages"=>[ > [0]"Failed to create a compute XXXX-AWS (eu-west-1-EC2) instance NAME: > undefined method `reject!' for \"sg-XXXXX\":String\n " > ] > } > } > > [ERROR 2014-08-0509:57:37Exception]Failedto create a compute XXXXXX > (eu-west-1-EC2)instance NAME:undefinedmethod `reject!' for > "sg-XXXXXXXX":String > > Could not create the host: > > Failed to create a compute XXXX-AWS(eu-west-1-EC2) instance NAME: > undefined method `reject!' for "sg-XXXXX":String > > > > > > What am I doing wrong? =S > Any clue? > > Thanks in advance! >

Hi Tomas,

here is the foreman server log output:

==> /var/log/foreman/production.log <==

Started GET "/apidoc/apipie_checksum" for 10.30.211.252 at 2014-08-06 06:48:
55 +0000

Processing by Apipie::ApipiesController#apipie_checksum as JSON
Parameters: {"apipy"=>{}}
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/
views/apipie/apipies/apipie_checksum.json.erb (0.3ms)

Completed 200 OK in 28ms (Views: 27.5ms | ActiveRecord: 0.0ms)

==> /var/log/httpd/foreman-ssl_access_ssl.log <==

10.30.211.252 - - [06/Aug/2014:06:48:55 +0000] "GET
//apidoc/apipie_checksum HTTP/1.1" 200 51 "-" "Ruby"

==> /var/log/foreman/production.log <==

Started GET "/apidoc/apipie_checksum" for 10.30.211.252 at 2014-08-06 06:48:
57 +0000
Processing by Apipie::ApipiesController#apipie_checksum as JSON
Parameters: {"apipy"=>{}}
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/
views/apipie/apipies/apipie_checksum.json.erb (0.0ms)

Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)

==> /var/log/httpd/foreman-ssl_access_ssl.log <==

10.30.211.252 - - [06/Aug/2014:06:48:57 +0000] "GET
//apidoc/apipie_checksum HTTP/1.1" 200 51 "-" "Ruby"

==> /var/log/foreman/production.log <==

Started POST "/api/hosts" for 10.30.211.252 at 2014-08-06 06:48:57 +0000
Processing by Api::V2::HostsController#create as JSON

Parameters: {"host"=>{"name"=>"hamm02.dev", "compute_resource_id"=>"1",
"hostgroup_id"=>"2", "build"=>true, "enabled"=>true, "managed"=>true,
"compute_attributes"=>{"flavor_id"=>"t1.micro", "subnet_id"=>"subnet-XXXXXX"
, "managed_ip"=>"private", "security_group_ids"=>"sg-XXXXXX", "image_id"=>
"ami-XXXXXX", "volumes_attributes"=>{}, "interfaces_attributes"=>{},
"nics_attributes"=>{}}, "host_parameters_attributes"=>{}}, "apiv"=>"v2"}

Authorized user admin(Admin User)
Adding Compute instance for NAME

Failed to create a compute AWS (eu-west-1-EC2) instance NAME: undefined
method `reject!' for "sg-XXXXXX":String

/usr/share/foreman/app/models/compute_resources/foreman/model/ec2.rb:47:in create_vm&#39; /usr/share/foreman/app/models/concerns/orchestration/compute.rb:74:insetCompute'
/usr/share/foreman/app/models/concerns/orchestration.rb:137:in execute&#39; /usr/share/foreman/app/models/concerns/orchestration.rb:85:inblock in
process'
/usr/share/foreman/app/models/concerns/orchestration.rb:77:in each&#39; /usr/share/foreman/app/models/concerns/orchestration.rb:77:inprocess'
/usr/share/foreman/app/models/concerns/orchestration.rb:18:in on_save&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:649:in_run__2003682610530452671__save__2848375144815248943__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/
active_support/callbacks.rb:405:in __run_callback&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in_run_save_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
run_callbacks&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/ active_record/callbacks.rb:264:increate_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:84:in
save&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:50:insave'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/
active_record/attribute_methods/dirty.rb:22:in save&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:inblock (2 levels) in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in
block in with_transaction_returning_status&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/ active_record/connection_adapters/abstract/database_statements.rb:192:intransaction'

/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in
transaction&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:inwith_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/
active_record/transactions.rb:241:in block in save&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:252:inrollback_active_record_state!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:240:in
save&#39; /usr/share/foreman/app/models/concerns/foreman/sti.rb:29:insave_with_type'

/usr/share/foreman/app/controllers/api/v2/hosts_controller.rb:73:in `create'

/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in
send_action&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/ abstract_controller/base.rb:167:inprocess_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in
process_action&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:inblock in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/
active_support/callbacks.rb:505:in block (3 levels) in _run__3542710290574378084__process_action__4597678329994426285__callbacks&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:inblock in _conditional_callback_around_6572'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in
around&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/ active_support/callbacks.rb:310:in_callback_around_1790'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_6572&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:482:inblock (2 levels) in
_run__3542710290574378084__process_action__4597678329994426285__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/
active_support/callbacks.rb:215:in block in _conditional_callback_around_6571&#39; /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in
clear_thread'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_6571&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/ active_support/callbacks.rb:415:inblock in
_run__3542710290574378084__process_action__4597678329994426285__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_6570&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:inaround'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/
active_support/callbacks.rb:310:in _callback_around_13&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in_conditional_callback_around_6570'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in
_run__3542710290574378084__process_action__4597678329994426285__callbacks&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/ active_support/callbacks.rb:405:in__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
_run_process_action_callbacks&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:inrun_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/
abstract_controller/callbacks.rb:17:in process_action&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:inprocess_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in
block in process_action&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/ active_support/notifications.rb:123:inblock in instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in
instrument&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:ininstrument'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/
action_controller/metal/instrumentation.rb:29:in process_action&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:inprocess_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in
process_action&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/ abstract_controller/base.rb:121:inprocess'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in
process&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:indispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/
action_controller/metal/rack_delegation.rb:14:in dispatch&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:inblock in action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/ action_dispatch/routing/route_set.rb:73:indispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/mapper.rb:42:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb
:68:in block in call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:ineach'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/ action_dispatch/routing/route_set.rb:600:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/lib/apipie/static_dispatcher.rb:65:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/lib/apipie/
middleware/checksum_in_headers.rb:27:in call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget. rb:35:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:incall'
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in
context&#39; /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/ abstract/id.rb:200:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/
active_record/connection_adapters/abstract/connection_pool.rb:473:in call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:inblock in call'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
_run__3791047089585838957__call__2848375144815248943__callbacks&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/ active_support/callbacks.rb:405:in__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
_run_call_callbacks&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:inrun_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/
action_dispatch/middleware/callbacks.rb:27:in call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/ action_dispatch/middleware/show_exceptions.rb:56:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in
call_app&#39; /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/
action_dispatch/middleware/request_id.rb:22:in call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/ active_support/cache/strategy/local_cache.rb:72:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb:136:in forward&#39; /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:inpass'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in
invalidate&#39; /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/ context.rb:71:incall!'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:incall'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/
application.rb:223:in call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:inmethod_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in
call&#39; /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:inblock
in call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in
each&#39; /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:incall'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/
thread_handler_extension.rb:77:in process_request&#39; /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:inaccept_and_process_next_request'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in
main_loop&#39; /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/ request_handler.rb:441:inblock (3 levels) in start_threads'

Rolling back due to a problem: [Configurar instancia de computación
hamm02.dev 2 failed [#<Host::Managed id: nil, name: "hamm02.dev", ip: nil,
last_compile: nil, last_freshcheck: nil, last_report: nil, updated_at: nil,
source_file_id: nil, created_at: nil, mac: nil, root_pass: nil, serial:
nil, puppet_status: 0, domain_id: 2, architecture_id: 1,
operatingsystem_id: 2, environment_id: 3, subnet_id: nil, ptable_id: nil,
medium_id: nil, build: true, comment: nil, disk: nil, installed_at: nil,
model_id: nil, hostgroup_id: 2, owner_id: 1, owner_type: "User", enabled:
true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file:
nil, uuid: nil, compute_resource_id: 1, puppet_proxy_id: 6, certname: nil,
image_id: 3, organization_id: nil, location_id: nil, type: "Host::Managed",
otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil>,
:setCompute]]

Unprocessable entity Host::Managed (id: new):

Failed to create a compute AWS (eu-west-1-EC2) instance hamm02.dev:
undefined method `reject!' for "sg-XXXXXXX":String

Rendered api/v2/errors/unprocessable_entity.json.rabl within
api/v2/layouts/error_layout (1.1ms)

Completed 422 Unprocessable Entity in 391ms (Views: 2.9ms | ActiveRecord:
18.0ms)

==> /var/log/httpd/foreman-ssl_access_ssl.log <==

10.30.211.252 - - [06/Aug/2014:06:48:57 +0000] "POST //api/hosts HTTP/1.1"
422 343 "-" "Ruby"

Any clue?

Thanks!

··· El martes, 5 de agosto de 2014 15:17:28 UTC+2, Tomas Strachota escribió: > > On 08/05/2014 02:56 PM, jllucas wrote: > > Hi everyone, > > > > In short, I'm trying to create a host in AWS using foreman and > hammer-cli. > > Everything works fine except when including a security group. If I > > remove "security_group_ids=XXXX" the host is created correctly, and it > > is included into "default" security group. > > > > Here are the steps. Using: > > > > > > > hammer -d host create > > > --hostgroup-id=2--compute-resource-id=1--compute-attributes="flavor_id=t1.micro,subnet_id=subnet-XXXXX,managed_ip=private,security_group_ids=sg-XXXXXX,image_id=ami-XXXXXXXX"--name=NAME > > > > > > > > throws the following error: > > > > > > > > > [DEBUG 2014-08-0509:57:36API]Params:{ > > "host"=>{ > > "name"=>"NAME", > > "compute_resource_id"=>"1", > > "hostgroup_id"=>"2", > > "build"=

Up!
Any clue?

Thanks in advance!

··· El miércoles, 6 de agosto de 2014 09:03:23 UTC+2, jllucas escribió: > > Hi Tomas, > > here is the foreman server log output: > > ==> /var/log/foreman/production.log <== > > Started GET "/apidoc/apipie_checksum" for 10.30.211.252 at 2014-08-06 06: > 48:55 +0000 > > Processing by Apipie::ApipiesController#apipie_checksum as JSON > Parameters: {"apipy"=>{}} > Rendered /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app > /views/apipie/apipies/apipie_checksum.json.erb (0.3ms) > > Completed 200 OK in 28ms (Views: 27.5ms | ActiveRecord: 0.0ms) > > ==> /var/log/httpd/foreman-ssl_access_ssl.log <== > > 10.30.211.252 - - [06/Aug/2014:06:48:55 +0000] "GET > //apidoc/apipie_checksum HTTP/1.1" 200 51 "-" "Ruby" > > ==> /var/log/foreman/production.log <== > > Started GET "/apidoc/apipie_checksum" for 10.30.211.252 at 2014-08-06 06: > 48:57 +0000 > Processing by Apipie::ApipiesController#apipie_checksum as JSON > Parameters: {"apipy"=>{}} > Rendered /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app > /views/apipie/apipies/apipie_checksum.json.erb (0.0ms) > > Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms) > > ==> /var/log/httpd/foreman-ssl_access_ssl.log <== > > 10.30.211.252 - - [06/Aug/2014:06:48:57 +0000] "GET > //apidoc/apipie_checksum HTTP/1.1" 200 51 "-" "Ruby" > > ==> /var/log/foreman/production.log <== > > Started POST "/api/hosts" for 10.30.211.252 at 2014-08-06 06:48:57 +0000 > Processing by Api::V2::HostsController#create as JSON > > Parameters: {"host"=>{"name"=>"hamm02.dev", "compute_resource_id"=>"1", > "hostgroup_id"=>"2", "build"=>true, "enabled"=>true, "managed"=>true, > "compute_attributes"=>{"flavor_id"=>"t1.micro", "subnet_id"=> > "subnet-XXXXXX", "managed_ip"=>"private", "security_group_ids"=> > "sg-XXXXXX", "image_id"=>"ami-XXXXXX", "volumes_attributes"=>{}, > "interfaces_attributes"=>{}, "nics_attributes"=>{}}, > "host_parameters_attributes"=>{}}, "apiv"=>"v2"} > > Authorized user admin(Admin User) > Adding Compute instance for NAME > > Failed to create a compute AWS (eu-west-1-EC2) instance NAME: undefined > method `reject!' for "sg-XXXXXX":String > > /usr/share/foreman/app/models/compute_resources/foreman/model/ec2.rb:47:in > `create_vm' > /usr/share/foreman/app/models/concerns/orchestration/compute.rb:74:in > `setCompute' > /usr/share/foreman/app/models/concerns/orchestration.rb:137:in `execute' > /usr/share/foreman/app/models/concerns/orchestration.rb:85:in `block in > process' > /usr/share/foreman/app/models/concerns/orchestration.rb:77:in `each' > /usr/share/foreman/app/models/concerns/orchestration.rb:77:in `process' > /usr/share/foreman/app/models/concerns/orchestration.rb:18:in `on_save' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:649:in > `_run__2003682610530452671__save__2848375144815248943__callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/ > active_support/callbacks.rb:405:in `__run_callback' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in > `_run_save_callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2. > ...

> Up!
> Any clue?
>
> Thanks in advance!

Got it! Sorry for the delay.
Please use:
"security_group_ids"=>["sg-XXXXXX"]
in compute attributes. Note the square brackets. Api expects ids to be
saved in an array.

It should definitely raise better exception. There's already an issue
for that:
http://projects.theforeman.org/issues/3649

Regards
Tomas

··· On 08/08/2014 08:55 AM, jllucas wrote:

El miércoles, 6 de agosto de 2014 09:03:23 UTC+2, jllucas escribió:

Hi Tomas,

here is the foreman server log output:

>
==>/var/log/foreman/production.log <==

StartedGET "/apidoc/apipie_checksum"for10.30.211.252at
2014-08-0606:48:55+0000

ProcessingbyApipie::ApipiesController#apipie_checksum as JSON
Parameters:{"apipy"=>{}}
Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb
(0.3ms)

Completed200OK in28ms(Views:27.5ms|ActiveRecord:0.0ms)

==>/var/log/httpd/foreman-ssl_access_ssl.log <==

10.30.211.252--[06/Aug/2014:06:48:55+0000]"GET
//apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby"

==>/var/log/foreman/production.log <==

StartedGET "/apidoc/apipie_checksum"for10.30.211.252at
2014-08-0606:48:57+0000
ProcessingbyApipie::ApipiesController#apipie_checksum as JSON
Parameters:{"apipy"=>{}}
Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb
(0.0ms)

Completed200OK in1ms(Views:0.9ms|ActiveRecord:0.0ms)

==>/var/log/httpd/foreman-ssl_access_ssl.log <==

10.30.211.252--[06/Aug/2014:06:48:57+0000]"GET
//apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby"

==>/var/log/foreman/production.log <==

StartedPOST "/api/hosts"for10.30.211.252at 2014-08-0606:48:57+0000
ProcessingbyApi::V2::HostsController#create as JSON

Parameters:{"host"=>{"name"=>"hamm02.dev","compute_resource_id"=>"1","hostgroup_id"=>"2","build"=>true,"enabled"=>true,"managed"=>true,"compute_attributes"=>{"flavor_id"=>"t1.micro","subnet_id"=>"subnet-XXXXXX","managed_ip"=>"private","security_group_ids"=>"sg-XXXXXX","image_id"=>"ami-XXXXXX","volumes_attributes"=>{},"interfaces_attributes"=>{},"nics_attributes"=>{}},"host_parameters_attributes"=>{}},"apiv"=>"v2"}

Authorizeduser admin(AdminUser)
AddingComputeinstance forNAME

Failedto create a compute AWS (eu-west-1-EC2)instance
NAME:undefinedmethod `reject!' for "sg-XXXXXX":String

/usr/share/foreman/app/models/compute_resources/foreman/model/ec2.rb:47:in
`create_vm'
/usr/share/foreman/app/models/concerns/orchestration/compute.rb:74:in `setCompute'
/usr/share/foreman/app/models/concerns/orchestration.rb:137:in`execute'
/usr/share/foreman/app/models/concerns/orchestration.rb:85:in `block
inprocess'
/usr/share/foreman/app/models/concerns/orchestration.rb:77:in `each'
/usr/share/foreman/app/models/concerns/orchestration.rb:77:in`process'
/usr/share/foreman/app/models/concerns/orchestration.rb:18:in `on_save'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:649:in
`_run__2003682610530452671__save__2848375144815248943__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in`__run_callback'

/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in
`_run_save_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.
>
...


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Hi Tomas,

That doesn't appear to be working, at least not how I am trying to use it:

foreman@foreman:/etc/hammer# hammer -v --show-ids host create
–compute-resource-id=1
–compute-attributes="security_group_ids=>["sg-0050d565"],managed_ip=private"
–name="hammer-test-1" --environment-id=1 --architecture-id=1 --domain-id=1
–puppet-proxy-id=1 --operatingsystem-id=1 --partition-table-id=
–build=false
[ERROR 2014-08-14 21:53:11 API] 422 Unprocessable Entity
{
"error" => {
"id" => nil,
"errors" => {
"base" => [
[0] "Failed to create a compute Amazon-EC2-us-east-1
(us-east-1-EC2) instance hammer-test-1.xxxx.xxx: undefined method reject!&#39; for \&quot;&gt;[sg-0050d565]\&quot;:String\n &quot; ] }, &quot;full_messages&quot; =&gt; [ [0] &quot;Failed to create a compute Amazon-EC2-us-east-1 (us-east-1-EC2) instance hammer-test-1.xxxx.xxx: undefined methodreject!'
for &quot;>[sg-0050d565]&quot;:String\n "
]
}
}
[ERROR 2014-08-14 21:53:11 Exception] Failed to create a compute
Amazon-EC2-us-east-1 (us-east-1-EC2) instance hammer-test-1.xxxx.xxx:
undefined method `reject!' for ">[sg-0050d565]":String

I have tried various iterations of moving quotes and escaping, etc… any
thoughts?

thx

/jer

··· On Friday, August 8, 2014 7:42:34 AM UTC-4, Tomas Strachota wrote: > > On 08/08/2014 08:55 AM, jllucas wrote: > > Up! > > Any clue? > > > > Thanks in advance! > > Got it! Sorry for the delay. > Please use: > "security_group_ids"=>["sg-XXXXXX"] > in compute attributes. Note the square brackets. Api expects ids to be > saved in an array. > > It should definitely raise better exception. There's already an issue > for that: > http://projects.theforeman.org/issues/3649 > > Regards > Tomas > > > > > > > > El miércoles, 6 de agosto de 2014 09:03:23 UTC+2, jllucas escribió: > > > > Hi Tomas, > > > > here is the foreman server log output: > > > > > > > ==>/var/log/foreman/production.log <== > > > > StartedGET "/apidoc/apipie_checksum"for10.30.211.252at > > 2014-08-0606:48:55+0000 > > > > ProcessingbyApipie::ApipiesController#apipie_checksum as JSON > > Parameters:{"apipy"=>{}} > > > Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb > > > (0.3ms) > > > > Completed200OK in28ms(Views:27.5ms|ActiveRecord:0.0ms) > > > > ==>/var/log/httpd/foreman-ssl_access_ssl.log <== > > > > 10.30.211.252--[06/Aug/2014:06:48:55+0000]"GET > > //apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby" > > > > ==>/var/log/foreman/production.log <== > > > > StartedGET "/apidoc/apipie_checksum"for10.30.211.252at > > 2014-08-0606:48:57+0000 > > ProcessingbyApipie::ApipiesController#apipie_checksum as JSON > > Parameters:{"apipy"=>{}} > > > Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb > > > (0.0ms) > > > > Completed200OK in1ms(Views:0.9ms|ActiveRecord:0.0ms) > > > > ==>/var/log/httpd/foreman-ssl_access_ssl.log <== > > > > 10.30.211.252--[06/Aug/2014:06:48:57+0000]"GET > > //apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby" > > > > ==>/var/log/foreman/production.log <== > > > > StartedPOST "/api/hosts"for10.30.211.252at 2014-08-0606:48:57+0000 > > ProcessingbyApi::V2::HostsController#create as JSON > > > > > Parameters:{"host"=>{"name"=>"hamm02.dev","compute_resource_id"=>"1","hostgroup_id"=>"2","build"=>true,"enabled"=>true,"managed"=>true,"compute_attributes"=>{"flavor_id"=>"t1.micro","subnet_id"=>"subnet-XXXXXX","managed_ip"=>"private","security_group_ids"=>"sg-XXXXXX","image_id"=>"ami-XXXXXX","volumes_attributes"=>{},"interfaces_attributes"=>{},"nics_attributes"=>{}},"host_parameters_attributes"=>{}},"apiv"=>"v2"} > > > > > Authorizeduser admin(AdminUser) > > AddingComputeinstance forNAME > > > > Failedto create a compute AWS (eu-west-1-EC2)instance > > NAME:undefinedmethod `reject!' for "sg-XXXXXX":String > > > > > /usr/share/foreman/app/models/compute_resources/foreman/model/ec2.rb:47:in > > `create_vm' > > > /usr/share/foreman/app/models/concerns/orchestration/compute.rb:74:in > `setCompute' > > > /usr/share/foreman/app/models/concerns/orchestration.rb:137:in`execute' > > /usr/share/foreman/app/models/concerns/orchestration.rb:85:in `block > > inprocess' > > /usr/share/foreman/app/models/concerns/orchestration.rb:77:in `each' > > > /usr/share/foreman/app/models/concerns/orchestration.rb:77:in`process' > > /usr/share/foreman/app/models/concerns/orchestration.rb:18:in > `on_save' > > > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:649:in > > > `_run__2003682610530452671__save__2848375144815248943__callbacks' > > > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in`__run_callback' > > > > > > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in > > > `_run_save_callbacks' > > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2. > > > > > ... > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to foreman-user...@googlegroups.com > > <mailto:foreman-users+unsubscribe@googlegroups.com >. > > To post to this group, send email to forema...@googlegroups.com > > > <mailto:forema...@googlegroups.com >. > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > >

Hi everyone,

for me neither. Tomas, could you please post the hammer command that you
used?

Regards!

··· El viernes, 15 de agosto de 2014 00:13:35 UTC+2, Jeremy Hartman escribió: > > Hi Tomas, > > That doesn't appear to be working, at least not how I am trying to use it: > > foreman@foreman:/etc/hammer# hammer -v --show-ids host create > --compute-resource-id=1 > --compute-attributes="security_group_ids=>["sg-0050d565"],managed_ip=private" > --name="hammer-test-1" --environment-id=1 --architecture-id=1 --domain-id=1 > --puppet-proxy-id=1 --operatingsystem-id=1 --partition-table-id= > --build=false > [ERROR 2014-08-14 21:53:11 API] 422 Unprocessable Entity > { > "error" => { > "id" => nil, > "errors" => { > "base" => [ > [0] "Failed to create a compute Amazon-EC2-us-east-1 > (us-east-1-EC2) instance hammer-test-1.xxxx.xxx: undefined method `reject!' > for \">[sg-0050d565]\":String\n " > ] > }, > "full_messages" => [ > [0] "Failed to create a compute Amazon-EC2-us-east-1 > (us-east-1-EC2) instance hammer-test-1.xxxx.xxx: undefined method `reject!' > for \">[sg-0050d565]\":String\n " > ] > } > } > [ERROR 2014-08-14 21:53:11 Exception] Failed to create a compute > Amazon-EC2-us-east-1 (us-east-1-EC2) instance hammer-test-1.xxxx.xxx: > undefined method `reject!' for ">[sg-0050d565]":String > > I have tried various iterations of moving quotes and escaping, etc... any > thoughts? > > thx > > /jer > > On Friday, August 8, 2014 7:42:34 AM UTC-4, Tomas Strachota wrote: >> >> On 08/08/2014 08:55 AM, jllucas wrote: >> > Up! >> > Any clue? >> > >> > Thanks in advance! >> >> Got it! Sorry for the delay. >> Please use: >> "security_group_ids"=>["sg-XXXXXX"] >> in compute attributes. Note the square brackets. Api expects ids to be >> saved in an array. >> >> It should definitely raise better exception. There's already an issue >> for that: >> http://projects.theforeman.org/issues/3649 >> >> Regards >> Tomas >> >> >> > >> > >> > El miércoles, 6 de agosto de 2014 09:03:23 UTC+2, jllucas escribió: >> > >> > Hi Tomas, >> > >> > here is the foreman server log output: >> > >> > > >> > ==>/var/log/foreman/production.log <== >> > >> > StartedGET "/apidoc/apipie_checksum"for10.30.211.252at >> > 2014-08-0606:48:55+0000 >> > >> > ProcessingbyApipie::ApipiesController#apipie_checksum as JSON >> > Parameters:{"apipy"=>{}} >> > >> Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb >> >> > (0.3ms) >> > >> > Completed200OK in28ms(Views:27.5ms|ActiveRecord:0.0ms) >> > >> > ==>/var/log/httpd/foreman-ssl_access_ssl.log <== >> > >> > 10.30.211.252--[06/Aug/2014:06:48:55+0000]"GET >> > //apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby" >> > >> > ==>/var/log/foreman/production.log <== >> > >> > StartedGET "/apidoc/apipie_checksum"for10.30.211.252at >> > 2014-08-0606:48:57+0000 >> > ProcessingbyApipie::ApipiesController#apipie_checksum as JSON >> > Parameters:{"apipy"=>{}} >> > >> Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb >> >> > (0.0ms) >> > >> > Completed200OK in1ms(Views:0.9ms|ActiveRecord:0.0ms) >> > >> > ==>/var/log/httpd/foreman-ssl_access_ssl.log <== >> > >> > 10.30.211.252--[06/Aug/2014:06:48:57+0000]"GET >> > //apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby" >> > >> > ==>/var/log/foreman/production.log <== >> > >> > StartedPOST "/api/hosts"for10.30.211.252at 2014-08-0606:48:57+0000 >> > ProcessingbyApi::V2::HostsController#create as JSON >> > >> > >> Parameters:{"host"=>{"name"=>"hamm02.dev","compute_resource_id"=>"1","hostgroup_id"=>"2","build"=>true,"enabled"=>true,"managed"=>true,"compute_attributes"=>{"flavor_id"=>"t1.micro","subnet_id"=>"subnet-XXXXXX","managed_ip"=>"private","security_group_ids"=>"sg-XXXXXX","image_id"=>"ami-XXXXXX","volumes_attributes"=>{},"interfaces_attributes"=>{},"nics_attributes"=>{}},"host_parameters_attributes"=>{}},"apiv"=>"v2"} >> >> > >> > Authorizeduser admin(AdminUser) >> > AddingComputeinstance forNAME >> > >> > Failedto create a compute AWS (eu-west-1-EC2)instance >> > NAME:undefinedmethod `reject!' for "sg-XXXXXX":String >> > >> > >> /usr/share/foreman/app/models/compute_resources/foreman/model/ec2.rb:47:in >> > `create_vm' >> > >> /usr/share/foreman/app/models/concerns/orchestration/compute.rb:74:in >> `setCompute' >> > >> /usr/share/foreman/app/models/concerns/orchestration.rb:137:in`execute' >> > /usr/share/foreman/app/models/concerns/orchestration.rb:85:in >> `block >> > inprocess' >> > /usr/share/foreman/app/models/concerns/orchestration.rb:77:in >> `each' >> > >> /usr/share/foreman/app/models/concerns/orchestration.rb:77:in`process' >> > /usr/share/foreman/app/models/concerns/orchestration.rb:18:in >> `on_save' >> > >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:649:in >> >> > `_run__2003682610530452671__save__2848375144815248943__callbacks' >> > >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in`__run_callback' >> >> > >> > >> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in >> >> > `_run_save_callbacks' >> > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2. >> > > >> > ... >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "Foreman users" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an email to foreman-user...@googlegroups.com >> > . >> > To post to this group, send email to forema...@googlegroups.com >> > . >> > Visit this group at http://groups.google.com/group/foreman-users. >> > For more options, visit https://groups.google.com/d/optout. >> >>

> Hi everyone,
>
> for me neither. Tomas, could you please post the hammer command that you
> used?
>
> Regards!

I must apologize. I identified the problem in the logs and then tested
it only via api. There's a bug in hammer which prevents it from sending
arrays in --compute-attributes.

I've created a fix. Please test with following PR if you can:
https://github.com/theforeman/hammer-cli/pull/137

hammer host create
–compute-attributes="security_group_ids=[sg-0050d565],managed_ip=private"

Regards
Tomas

··· On 08/18/2014 08:59 AM, jllucas wrote:

El viernes, 15 de agosto de 2014 00:13:35 UTC+2, Jeremy Hartman escribió:

Hi Tomas,

That doesn't appear to be working, at least not how I am trying to
use it:

>
foreman@foreman:/etc/hammer# hammer -v --show-ids host create
--compute-resource-id=1
--compute-attributes="security_group_ids=>["sg-0050d565"],managed_ip=private"
--name="hammer-test-1" --environment-id=1 --architecture-id=1
--domain-id=1 --puppet-proxy-id=1 --operatingsystem-id=1
--partition-table-id= --build=false
[ERROR 2014-08-14 21:53:11 API] 422 Unprocessable Entity
{
     "error" => {
                    "id" => nil,
                "errors" => {
             "base" => [
                 [0] "Failed to create a compute
Amazon-EC2-us-east-1 (us-east-1-EC2) instance
hammer-test-1.xxxx.xxx: undefined method `reject!' for
\">[sg-0050d565]\":String\n "
             ]
         },
         "full_messages" => [
             [0] "Failed to create a compute Amazon-EC2-us-east-1
(us-east-1-EC2) instance hammer-test-1.xxxx.xxx: undefined method
`reject!' for \">[sg-0050d565]\":String\n "
         ]
     }
}
[ERROR 2014-08-14 21:53:11 Exception] Failed to create a compute
Amazon-EC2-us-east-1 (us-east-1-EC2) instance
hammer-test-1.xxxx.xxx: undefined method `reject!' for
">[sg-0050d565]":String
>

I have tried various iterations of moving quotes and escaping,
etc... any thoughts?

thx

/jer

On Friday, August 8, 2014 7:42:34 AM UTC-4, Tomas Strachota wrote:

    On 08/08/2014 08:55 AM, jllucas wrote:
     > Up!
     > Any clue?
     >
     > Thanks in advance!

    Got it! Sorry for the delay.
    Please use:
        "security_group_ids"=>["sg-XXXXXX"]
    in compute attributes. Note the square brackets. Api expects ids
    to be
    saved in an array.

    It should definitely raise better exception. There's already an
    issue
    for that:
    http://projects.theforeman.org/issues/3649
    <http://projects.theforeman.org/issues/3649>

    Regards
    Tomas


     >
     >
     > El miércoles, 6 de agosto de 2014 09:03:23 UTC+2, jllucas >         escribió:
     >
     >     Hi Tomas,
     >
     >     here is the foreman server log output:
     >
     >     >
     >     ==>/var/log/foreman/production.log <==
     >
     >     StartedGET "/apidoc/apipie_checksum"for10.30.211.252at
     >     2014-08-0606:48:55+0000
     >
     >     ProcessingbyApipie::ApipiesController#apipie_checksum as
    JSON
     >     Parameters:{"apipy"=>{}}
     >
    Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb

     >     (0.3ms)
     >
     >     Completed200OK in28ms(Views:27.5ms|ActiveRecord:0.0ms)
     >
     >     ==>/var/log/httpd/foreman-ssl_access_ssl.log <==
     >
     >     10.30.211.252--[06/Aug/2014:06:48:55+0000]"GET
     >     //apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby"
     >
     >     ==>/var/log/foreman/production.log <==
     >
     >     StartedGET "/apidoc/apipie_checksum"for10.30.211.252at
     >     2014-08-0606:48:57+0000
     >     ProcessingbyApipie::ApipiesController#apipie_checksum as
    JSON
     >     Parameters:{"apipy"=>{}}
     >
    Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb

     >     (0.0ms)
     >
     >     Completed200OK in1ms(Views:0.9ms|ActiveRecord:0.0ms)
     >
     >     ==>/var/log/httpd/foreman-ssl_access_ssl.log <==
     >
     >     10.30.211.252--[06/Aug/2014:06:48:57+0000]"GET
     >     //apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby"
     >
     >     ==>/var/log/foreman/production.log <==
     >
     >     StartedPOST "/api/hosts"for10.30.211.252at
    2014-08-0606:48:57+0000
     >     ProcessingbyApi::V2::HostsController#create as JSON
     >
     >
    Parameters:{"host"=>{"name"=>"hamm02.dev","compute_resource_id"=>"1","hostgroup_id"=>"2","build"=>true,"enabled"=>true,"managed"=>true,"compute_attributes"=>{"flavor_id"=>"t1.micro","subnet_id"=>"subnet-XXXXXX","managed_ip"=>"private","security_group_ids"=>"sg-XXXXXX","image_id"=>"ami-XXXXXX","volumes_attributes"=>{},"interfaces_attributes"=>{},"nics_attributes"=>{}},"host_parameters_attributes"=>{}},"apiv"=>"v2"}

     >
     >     Authorizeduser admin(AdminUser)
     >     AddingComputeinstance forNAME
     >
     >     Failedto create a compute AWS (eu-west-1-EC2)instance
     >     NAME:undefinedmethod `reject!' for "sg-XXXXXX":String
     >
     >
    /usr/share/foreman/app/models/compute_resources/foreman/model/ec2.rb:47:in

     >     `create_vm'
     >
    /usr/share/foreman/app/models/concerns/orchestration/compute.rb:74:in
    `setCompute'
     >
    /usr/share/foreman/app/models/concerns/orchestration.rb:137:in`execute'

     >
    /usr/share/foreman/app/models/concerns/orchestration.rb:85:in
    `block
     >     inprocess'
     >
    /usr/share/foreman/app/models/concerns/orchestration.rb:77:in
    `each'
     >
    /usr/share/foreman/app/models/concerns/orchestration.rb:77:in`process'

     >
    /usr/share/foreman/app/models/concerns/orchestration.rb:18:in
    `on_save'
     >
    /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:649:in

     >
    `_run__2003682610530452671__save__2848375144815248943__callbacks'
     >
    /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in`__run_callback'

     >
     >
    /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in

     >     `_run_save_callbacks'
     >     /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.
     >     >
     >     ...
     >
     > --
     > You received this message because you are subscribed to the
    Google
     > Groups "Foreman users" group.
     > To unsubscribe from this group and stop receiving emails from
    it, send
     > an email to foreman-user...@googlegroups.com
     > <mailto:foreman-users+unsubscribe@googlegroups.com>.
     > To post to this group, send email to forema...@googlegroups.com
     > <mailto:forema...@googlegroups.com>.
     > Visit this group at
    http://groups.google.com/group/foreman-users
    <http://groups.google.com/group/foreman-users>.
     > For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

thanks for the pull request, i merged it in and tested as requested (server
version 1.5.1):

the cli appears to be accepting the command, however the API is returning
an error:

Started POST "/api/hosts" for 10.128.4.160 at 2014-08-19 18:49:50 +0000
Processing by Api::V2::HostsController#create as JSON
Parameters: {"host"=>{"name"=>"hammer-test-1", "environment_id"=>"1",
"architecture_id"=>"1", "domain_id"=>"1", "puppet_proxy_id"=>"1",
"operatingsystem_id"=>"1", "compute_resource_id"=>"1", "build"=>false,
"enabled"=>true, "managed"=>true, "compute_attributes"=>{
"security_group_ids"=>["sg-0050d565"], "volumes_attributes"=>{},
"interfaces_attributes"=>{}, "nics_attributes"=>{}}, "ptable_id"=>"",
"host_parameters_attributes"=>{}}, "apiv"=>"v2"}
Authorized user admin(Admin User)
Adding Compute instance for hammer-test-1.xxxx.xxx
Successfully decrypted field for Foreman::Model::EC2 Amazon-EC2-us-east-1
Rolling back due to a problem: [Set up compute instance hammer-test-1.xxxx.xxx
2 failed [#<Host::Managed id: nil, name: "hammer-test-1.xxxx.xxx", ip: nil,
last_compile: nil, last_freshcheck: nil, last_report: nil, updated_at: nil,
source_file_id: nil, created_at: nil, mac: nil, root_pass: nil, serial:
nil, puppet_status: 0, domain_id: 1, architecture_id: 1,
operatingsystem_id: 1, environment_id: 1, subnet_id: nil, ptable_id: nil,
medium_id: nil, build: false, comment: nil, disk: nil, installed_at: nil,
model_id: nil, hostgroup_id: nil, owner_id: 1, owner_type: "User", enabled:
true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file:
nil, uuid: nil, compute_resource_id: 1, puppet_proxy_id: 1, certname: nil,
image_id: nil, organization_id: nil, location_id: nil, type:
"Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil,
provision_method: nil>, :setCompute]]
resource have no errors (RuntimeError)
/usr/share/foreman/app/controllers/api/base_controller.rb:86:in
process_resource_error&#39; /usr/share/foreman/app/controllers/api/base_controller.rb:105:in
process_response'
/usr/share/foreman/app/controllers/api/v2/hosts_controller.rb:73:in create&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/ action_controller/metal/implicit_render.rb:4:insend_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:167:in
process_action&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rendering.rb:10:inprocess_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/
abstract_controller/callbacks.rb:18:in block in process_action&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:505:inblock (3 levels) in
_run__4459501957923365628__process_action__1647352445595852054__callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in
block in _conditional_callback_around_6435&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/ active_support/callbacks.rb:326:inaround'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in
_callback_around_1782&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in_conditional_callback_around_6435'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/
active_support/callbacks.rb:482:in block (2 levels) in _run__4459501957923365628__process_action__1647352445595852054__callbacks&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:inblock in _conditional_callback_around_6434'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in
clear_thread&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/ active_support/callbacks.rb:214:in_conditional_callback_around_6434'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:415:in
block in _run__4459501957923365628__process_action__1647352445595852054__callbacks&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:inblock in _conditional_callback_around_6433'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/
active_support/callbacks.rb:326:in around&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in_callback_around_13'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in
_conditional_callback_around_6433&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/ active_support/callbacks.rb:414:in_run__4459501957923365628__process_action__1647352445595852054__callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in
__run_callback&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in_run_process_action_callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/
active_support/callbacks.rb:81:in run_callbacks&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:17:inprocess_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rescue.rb:29:in
process_action&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/ action_controller/metal/instrumentation.rb:30:inblock in process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in
block in instrument&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications/instrumenter.rb:20:ininstrument'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/
active_support/notifications.rb:123:in instrument&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:29:inprocess_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/params_wrapper.rb:207:in
process_action&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/ active_record/railties/controller_runtime.rb:18:inprocess_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:121:in
process&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/rendering.rb:45:inprocess'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/
action_controller/metal.rb:203:in dispatch&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rack_delegation.rb:14:indispatch'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal.rb:246:in
block in action&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/ action_dispatch/routing/route_set.rb:73:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:in
dispatch&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:36:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/
action_dispatch/routing/mapper.rb:43:in call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:inblock in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in
each&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router. rb:56:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:608:in
call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.1.3/lib/apipie/static_dispatcher.rb:65:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.1.3/lib/apipie/
middleware/checksum_in_headers.rb:27:in call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/best_standards_support.rb:17:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/etag.rb:23:in
call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/conditionalget .rb:35:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/head.rb:14:in
call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/params_parser.rb:21:incall'
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/flash.rb:242:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in
context&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/ abstract/id.rb:205:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/cookies.rb:341:in
call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/query_cache.rb:64:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/
active_record/connection_adapters/abstract/connection_pool.rb:479:in call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:28:inblock in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in
_run__3616475373233695490__call__2084506232186143942__callbacks&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/ active_support/callbacks.rb:405:in__run_callback'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in
_run_call_callbacks&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:inrun_callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/
action_dispatch/middleware/callbacks.rb:27:in call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/remote_ip.rb:31:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/ action_dispatch/middleware/show_exceptions.rb:56:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:32:in
call_app&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:inblock in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/
active_support/tagged_logging.rb:22:in tagged&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/request_id.rb:22:in
call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride .rb:21:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in
call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/cache/strategy/local_cache.rb:72:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:15:in
call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/static.rb:63:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in
forward&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/ context.rb:143:inpass'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in
invalidate&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:incall!'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/
context.rb:51:in call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/engine.rb:484:incall'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/application.rb:231:in
call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/railtie/ configurable.rb:30:inmethod_missing'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:134:in
call&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:64:inblock in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:
in each&#39; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:incall'
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:77:in
process_request&#39; /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler. rb:142:inaccept_and_process_next_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in
main_loop&#39; /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:448:inblock (3 levels) in start_threads'
Rendered api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout
(0.5ms)
Completed 500 Internal Server Error in 525.3ms (Views: 1.4ms | ActiveRecord:
15.8ms)

is there something that i need to do on the server side as well to accept
the update?

thx

/jer

··· On Monday, August 18, 2014 10:22:41 AM UTC-4, Tomas Strachota wrote: > > On 08/18/2014 08:59 AM, jllucas wrote: > > Hi everyone, > > > > for me neither. Tomas, could you please post the hammer command that you > > used? > > > > Regards! > > I must apologize. I identified the problem in the logs and then tested > it only via api. There's a bug in hammer which prevents it from sending > arrays in --compute-attributes. > > I've created a fix. Please test with following PR if you can: > https://github.com/theforeman/hammer-cli/pull/137 > > hammer host create > --compute-attributes="security_group_ids=[sg-0050d565],managed_ip=private" > ... > > Regards > Tomas > > > > > El viernes, 15 de agosto de 2014 00:13:35 UTC+2, Jeremy Hartman > escribió: > > > > Hi Tomas, > > > > That doesn't appear to be working, at least not how I am trying to > > use it: > > > > > > > foreman@foreman:/etc/hammer# hammer -v --show-ids host create > > --compute-resource-id=1 > > > --compute-attributes="security_group_ids=>["sg-0050d565"],managed_ip=private" > > > --name="hammer-test-1" --environment-id=1 --architecture-id=1 > > --domain-id=1 --puppet-proxy-id=1 --operatingsystem-id=1 > > --partition-table-id= --build=false > > [ERROR 2014-08-14 21:53:11 API] 422 Unprocessable Entity > > { > > "error" => { > > "id" => nil, > > "errors" => { > > "base" => [ > > [0] "Failed to create a compute > > Amazon-EC2-us-east-1 (us-east-1-EC2) instance > > hammer-test-1.xxxx.xxx: undefined method `reject!' for > > \">[sg-0050d565]\":String\n " > > ] > > }, > > "full_messages" => [ > > [0] "Failed to create a compute Amazon-EC2-us-east-1 > > (us-east-1-EC2) instance hammer-test-1.xxxx.xxx: undefined method > > `reject!' for \">[sg-0050d565]\":String\n " > > ] > > } > > } > > [ERROR 2014-08-14 21:53:11 Exception] Failed to create a compute > > Amazon-EC2-us-east-1 (us-east-1-EC2) instance > > hammer-test-1.xxxx.xxx: undefined method `reject!' for > > ">[sg-0050d565]":String > > > > > > > I have tried various iterations of moving quotes and escaping, > > etc... any thoughts? > > > > thx > > > > /jer > > > > On Friday, August 8, 2014 7:42:34 AM UTC-4, Tomas Strachota wrote: > > > > On 08/08/2014 08:55 AM, jllucas wrote: > > > Up! > > > Any clue? > > > > > > Thanks in advance! > > > > Got it! Sorry for the delay. > > Please use: > > "security_group_ids"=>["sg-XXXXXX"] > > in compute attributes. Note the square brackets. Api expects ids > > to be > > saved in an array. > > > > It should definitely raise better exception. There's already an > > issue > > for that: > > http://projects.theforeman.org/issues/3649 > > > > > > Regards > > Tomas > > > > > > > > > > > > > El miércoles, 6 de agosto de 2014 09:03:23 UTC+2, jllucas > > escribió: > > > > > > Hi Tomas, > > > > > > here is the foreman server log output: > > > > > > > > > > ==>/var/log/foreman/production.log <== > > > > > > StartedGET "/apidoc/apipie_checksum"for10.30.211.252at > > > 2014-08-0606:48:55+0000 > > > > > > ProcessingbyApipie::ApipiesController#apipie_checksum as > > JSON > > > Parameters:{"apipy"=>{}} > > > > > > Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb > > > > > > (0.3ms) > > > > > > Completed200OK in28ms(Views:27.5ms|ActiveRecord:0.0ms) > > > > > > ==>/var/log/httpd/foreman-ssl_access_ssl.log <== > > > > > > 10.30.211.252--[06/Aug/2014:06:48:55+0000]"GET > > > //apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby" > > > > > > ==>/var/log/foreman/production.log <=3

Thanks!
It works for us.

Regards

··· El lunes, 18 de agosto de 2014 16:22:41 UTC+2, Tomas Strachota escribió: > > On 08/18/2014 08:59 AM, jllucas wrote: > > Hi everyone, > > > > for me neither. Tomas, could you please post the hammer command that you > > used? > > > > Regards! > > I must apologize. I identified the problem in the logs and then tested > it only via api. There's a bug in hammer which prevents it from sending > arrays in --compute-attributes. > > I've created a fix. Please test with following PR if you can: > https://github.com/theforeman/hammer-cli/pull/137 > > hammer host create > --compute-attributes="security_group_ids=[sg-0050d565],managed_ip=private" > ... > > Regards > Tomas > > > > > El viernes, 15 de agosto de 2014 00:13:35 UTC+2, Jeremy Hartman > escribió: > > > > Hi Tomas, > > > > That doesn't appear to be working, at least not how I am trying to > > use it: > > > > > > > foreman@foreman:/etc/hammer# hammer -v --show-ids host create > > --compute-resource-id=1 > > > --compute-attributes="security_group_ids=>["sg-0050d565"],managed_ip=private" > > > --name="hammer-test-1" --environment-id=1 --architecture-id=1 > > --domain-id=1 --puppet-proxy-id=1 --operatingsystem-id=1 > > --partition-table-id= --build=false > > [ERROR 2014-08-14 21:53:11 API] 422 Unprocessable Entity > > { > > "error" => { > > "id" => nil, > > "errors" => { > > "base" => [ > > [0] "Failed to create a compute > > Amazon-EC2-us-east-1 (us-east-1-EC2) instance > > hammer-test-1.xxxx.xxx: undefined method `reject!' for > > \">[sg-0050d565]\":String\n " > > ] > > }, > > "full_messages" => [ > > [0] "Failed to create a compute Amazon-EC2-us-east-1 > > (us-east-1-EC2) instance hammer-test-1.xxxx.xxx: undefined method > > `reject!' for \">[sg-0050d565]\":String\n " > > ] > > } > > } > > [ERROR 2014-08-14 21:53:11 Exception] Failed to create a compute > > Amazon-EC2-us-east-1 (us-east-1-EC2) instance > > hammer-test-1.xxxx.xxx: undefined method `reject!' for > > ">[sg-0050d565]":String > > > > > > > I have tried various iterations of moving quotes and escaping, > > etc... any thoughts? > > > > thx > > > > /jer > > > > On Friday, August 8, 2014 7:42:34 AM UTC-4, Tomas Strachota wrote: > > > > On 08/08/2014 08:55 AM, jllucas wrote: > > > Up! > > > Any clue? > > > > > > Thanks in advance! > > > > Got it! Sorry for the delay. > > Please use: > > "security_group_ids"=>["sg-XXXXXX"] > > in compute attributes. Note the square brackets. Api expects ids > > to be > > saved in an array. > > > > It should definitely raise better exception. There's already an > > issue > > for that: > > http://projects.theforeman.org/issues/3649 > > > > > > Regards > > Tomas > > > > > > > > > > > > > El miércoles, 6 de agosto de 2014 09:03:23 UTC+2, jllucas > > escribió: > > > > > > Hi Tomas, > > > > > > here is the foreman server log output: > > > > > > > > > > ==>/var/log/foreman/production.log <== > > > > > > StartedGET "/apidoc/apipie_checksum"for10.30.211.252at > > > 2014-08-0606:48:55+0000 > > > > > > ProcessingbyApipie::ApipiesController#apipie_checksum as > > JSON > > > Parameters:{"apipy"=>{}} > > > > > > Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb > > > > > > (0.3ms) > > > > > > Completed200OK in28ms(Views:27.5ms|ActiveRecord:0.0ms) > > > > > > ==>/var/log/httpd/foreman-ssl_access_ssl.log <== > > > > > > 10.30.211.252--[06/Aug/2014:06:48:55+0000]"GET > > > //apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby" > > > > > > ==>/var/log/foreman/production.log <== > > > > > > StartedGET "/apidoc/apipie_checksum"for10.30.211.252at > > > 2014-08-0606:48:57+0000 > > > ProcessingbyApipie::ApipiesController#apipie_checksum as > > JSON > > > Parameters:{"apipy"=>{}} > > > > > > Rendered/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb > > > > > > (0.0ms) > > > > > > Completed200OK in1ms(Views:0.9ms|ActiveRecord:0.0ms) > > > > > > ==>/var/log/httpd/foreman-ssl_access_ssl.log <== > > > > > > 10.30.211.252--[06/Aug/2014:06:48:57+0000]"GET > > > //apidoc/apipie_checksum HTTP/1.1"20051"-""Ruby" > > > > > > ==>/var/log/foreman/production.log <== > > > > > > StartedPOST "/api/hosts"for10.30.211.252at > > 2014-08-0606:48:57+0000 > > > ProcessingbyApi::V2::HostsController#create as JSON > > > > > > > > > Parameters:{"host"=>{"name"=>"hamm02.dev","compute_resource_id"=>"1","hostgroup_id"=>"2","build"=>true,"enabled"=>true,"managed"=>true,"compute_attributes"=>{"flavor_id"=>"t1.micro","subnet_id"=>"subnet-XXXXXX","managed_ip"=>"private","security_group_ids"=>"sg-XXXXXX","image_id"=>"ami-XXXXXX","volumes_attributes"=>{},"interfaces_attributes"=>{},"nics_attributes"=>{}},"host_parameters_attributes"=>{}},"apiv"=>"v2"} > > > > > > > > > Authorizeduser admin(AdminUser) > > > AddingComputeinstance forNAME > > > > > > Failedto create a compute AWS (eu-west-1-EC2)instance > > > NAME:undefinedmethod `reject!' for "sg-XXXXXX":String > > > > > > > > > /usr/share/foreman/app/models/compute_resources/foreman/model/ec2.rb:47:in > > > > > `create_vm' > > > > > > /usr/share/foreman/app/models/concerns/orchestration/compute.rb:74:in > > `setCompute' > > > > > > /usr/share/foreman/app/models/concerns/orchestration.rb:137:in`execute' > > > > > > > /usr/share/foreman/app/models/concerns/orchestration.rb:85:in > > `block > > > inprocess' > > > > > /usr/share/foreman/app/models/concerns/orchestration.rb:77:in > > `each' > > > > > > /usr/share/foreman/app/models/concerns/orchestration.rb:77:in`process' > > > > > > > /usr/share/foreman/app/models/concerns/orchestration.rb:18:in > > `on_save' > > > > > > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:649:in > > > > > > > > > `_run__2003682610530452671__save__2848375144815248943__callbacks' > > > > > > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in`__run_callback' > > > > > > > > > > > > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in > > > > > > `_run_save_callbacks' > > > > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2. > > > > > > > ... > > > > > > -- > > > You received this message because you are subscribed to the > > Google > > > Groups "Foreman users" group. > > > To unsubscribe from this group and stop receiving emails from > > it, send > > > an email to foreman-user...@googlegroups.com > > > >. > > > To post to this group, send email to > forema...@googlegroups.com > > > . > > > Visit this group at > > http://groups.google.com/group/foreman-users > > . > > > For more options, visit https://groups.google.com/d/optout > > . > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to foreman-user...@googlegroups.com > > <mailto:foreman-users+unsubscribe@googlegroups.com >. > > To post to this group, send email to forema...@googlegroups.com > > > <mailto:forema...@googlegroups.com >. > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > >

> thanks for the pull request, i merged it in and tested as requested
> (server version 1.5.1):
>
> the cli appears to be accepting the command, however the API is
> returning an error:
>
> >
> StartedPOST "/api/hosts"for10.128.4.160at 2014-08-1918:49:50+0000
> ProcessingbyApi::V2::HostsController#create as JSON
> Parameters:{"host"=>{"name"=>"hammer-test-1","environment_id"=>"1","architecture_id"=>"1","domain_id"=>"1","puppet_proxy_id"=>"1","operatingsystem_id"=>"1","compute_resource_id"=>"1","build"=>false,"enabled"=>true,"managed"=>true,"compute_attributes"=>{"security_group_ids"=>["sg-0050d565"],"volumes_attributes"=>{},"interfaces_attributes"=>{},"nics_attributes"=>{}},"ptable_id"=>"","host_parameters_attributes"=>{}},"apiv"=>"v2"}
> Authorizeduser admin(AdminUser)
> AddingComputeinstance forhammer-test-1.xxxx.xxx
> Successfullydecrypted field forForeman::Model::EC2 Amazon-EC2-us-east-1
> Rollingback due to a problem:[Setup compute instance
> hammer-test-1.xxxx.xxx 2failed [#<Host::Managed id: nil, name:
> "hammer-test-1.xxxx.xxx", ip: nil, last_compile: nil, last_freshcheck:
> nil, last_report: nil, updated_at: nil, source_file_id: nil, created_at:
> nil, mac: nil, root_pass: nil, serial: nil, puppet_status: 0, domain_id:
> 1, architecture_id: 1, operatingsystem_id: 1, environment_id: 1,
> subnet_id: nil, ptable_id: nil, medium_id: nil, build: false, comment:
> nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil,
> owner_id: 1, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1,
> managed: true, use_image: nil, image_file: nil, uuid: nil,
> compute_resource_id: 1, puppet_proxy_id: 1, certname: nil, image_id:
> nil, organization_id: nil, location_id: nil, type: "Host::Managed", otp:
> nil, realm_id: nil, compute_profile_id: nil, provision_method: nil>,
> :setCompute]]
> resource have noerrors (RuntimeError)
> /usr/share/foreman/app/controllers/api/base_controller.rb:86:inprocess_resource_error&#39; &gt; /usr/share/foreman/app/controllers/api/base_controller.rb:105:in &gt;process_response'
> /usr/share/foreman/app/controllers/api/v2/hosts_controller.rb:73:in create&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/implicit_render.rb:4:insend_action'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:167:in
> process_action&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rendering.rb:10:in &gt;process_action'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:18:inblock &gt; in process_action&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:505:in &gt;block
> (3levels)in_run__4459501957923365628__process_action__1647352445595852054__callbacks'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in
> block in _conditional_callback_around_6435&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:326:inaround'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in
> _callback_around_1782&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in &gt;_conditional_callback_around_6435'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:482:inblock &gt; (2 levels) in &gt; _run__4459501957923365628__process_action__1647352445595852054__callbacks&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in &gt;block in_conditional_callback_around_6434'
> /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in
> clear_thread&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in_conditional_callback_around_6434'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:415:in
> block &gt; in_run__4459501957923365628__process_action__1647352445595852054__callbacks&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in &gt;block in _conditional_callback_around_6433'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:326:inaround&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in &gt;_callback_around_13'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in
> _conditional_callback_around_6433&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:414:in_run__4459501957923365628__process_action__1647352445595852054__callbacks'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in
> __run_callback&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in &gt;_run_process_action_callbacks'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:inrun_callbacks&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:17:in &gt;process_action'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rescue.rb:29:in
> process_action&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:30:inblock
> in process_action'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in
> block ininstrument&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications/instrumenter.rb:20:in &gt;instrument'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:ininstrument&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:29:in &gt;process_action'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/params_wrapper.rb:207:in
> process_action&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/railties/controller_runtime.rb:18:inprocess_action'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:121:in
> process&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/rendering.rb:45:in &gt;process'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal.rb:203:indispatch&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rack_delegation.rb:14:in &gt;dispatch'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal.rb:246:in
> block in action&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:incall'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:in
> dispatch&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:36:in &gt;call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/mapper.rb:43:incall&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in &gt;block incall'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in
> each&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:incall'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:608:in
> call&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.1.3/lib/apipie/static_dispatcher.rb:65:in &gt;call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.1.3/lib/apipie/middleware/checksum_in_headers.rb:27:incall&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/best_standards_support.rb:17:in &gt;call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/etag.rb:23:in
> call&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:incall'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/head.rb:14:in
> call&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/params_parser.rb:21:in &gt;call'
> /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:incall&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/flash.rb:242:in &gt;call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in
> context&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:incall'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/cookies.rb:341:in
> call&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/query_cache.rb:64:in &gt;call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:incall&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:28:in &gt;block incall'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in
> _run__3616475373233695490__call__2084506232186143942__callbacks&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in__run_callback'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in
> _run_call_callbacks&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in &gt;run_callbacks'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:27:incall&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/remote_ip.rb:31:in &gt;call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
> call&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/show_exceptions.rb:56:incall'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:32:in
> call_app&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in &gt;block in call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/tagged_logging.rb:22:intagged&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in &gt;call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/request_id.rb:22:in
> call&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:incall'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in
> call&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/cache/strategy/local_cache.rb:72:in &gt;call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:15:incall&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/static.rb:63:in &gt;call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in
> forward&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:inpass'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in
> invalidate&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in &gt;call!'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:incall&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/engine.rb:484:in &gt;call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/application.rb:231:in
> call&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:inmethod_missing'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:134:in
> call&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:64:in &gt;block in call'
> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:ineach&#39; &gt; /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in &gt;call'
> /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:77:in
> process_request&#39; &gt; /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:142:inaccept_and_process_next_request'
> /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in
> main_loop&#39; &gt; /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:448:in &gt;block (3 levels) in start_threads'
> Renderedapi/v2/errors/standard_error.json.rabl within
> api/v2/layouts/error_layout (0.5ms)
> Completed500InternalServerErrorin525.3ms(Views:1.4ms|ActiveRecord:15.8ms)
>
> >
>
>
> is there something that i need to do on the server side as well to
> accept the update?
>
> thx
>
> /jer

No changes on the server side required. I'm afraid I have no idea what
went wrong in your case. It could be some error in Fog.
Someone else, any idea?

T.

··· On 08/19/2014 09:41 PM, Jeremy Hartman wrote:

On Monday, August 18, 2014 10:22:41 AM UTC-4, Tomas Strachota wrote:

On 08/18/2014 08:59 AM, jllucas wrote:
 > Hi everyone,
 >
 > for me neither. Tomas, could you please post the hammer command
that you
 > used?
 >
 > Regards!

I must apologize. I identified the problem in the logs and then tested
it only via api. There's a bug in hammer which prevents it from sending
arrays in --compute-attributes.

I've created a fix. Please test with following PR if you can:
https://github.com/theforeman/hammer-cli/pull/137
<https://github.com/theforeman/hammer-cli/pull/137>

hammer host create
--compute-attributes="security_group_ids=[sg-0050d565],managed_ip=private"

...

Regards
Tomas

 >
 > El viernes, 15 de agosto de 2014 00:13:35 UTC+2, Jeremy Hartman >     escribió:
 >
 >     Hi Tomas,
 >
 >     That doesn't appear to be working, at least not how I am
trying to
 >     use it:
 >
 >     >
 >     foreman@foreman:/etc/hammer# hammer -v --show-ids host create
 >     --compute-resource-id=1
 >
--compute-attributes="security_group_ids=>["sg-0050d565"],managed_ip=private"

 >     --name="hammer-test-1" --environment-id=1 --architecture-id=1
 >     --domain-id=1 --puppet-proxy-id=1 --operatingsystem-id=1
 >     --partition-table-id= --build=false
 >     [ERROR 2014-08-14 21:53:11 API] 422 Unprocessable Entity
 >     {
 >          "error" => {
 >                         "id" => nil,
 >                     "errors" => {
 >                  "base" => [
 >                      [0] "Failed to create a compute
 >     Amazon-EC2-us-east-1 (us-east-1-EC2) instance
 >     hammer-test-1.xxxx.xxx: undefined method `reject!' for
 >     \">[sg-0050d565]\":String\n "
 >                  ]
 >              },
 >              "full_messages" => [
 >                  [0] "Failed to create a compute
Amazon-EC2-us-east-1
 >     (us-east-1-EC2) instance hammer-test-1.xxxx.xxx: undefined
method
 >     `reject!' for \">[sg-0050d565]\":String\n "
 >              ]
 >          }
 >     }
 >     [ERROR 2014-08-14 21:53:11 Exception] Failed to create a compute
 >     Amazon-EC2-us-east-1 (us-east-1-EC2) instance
 >     hammer-test-1.xxxx.xxx: undefined method `reject!' for
 >     ">[sg-0050d565]":String
 >     >
 >
 >     I have tried various iterations of moving quotes and escaping,
 >     etc... any thoughts?
 >
 >     thx
 >
 >     /jer
 >
 >     On Friday, August 8, 2014 7:42:34 AM UTC-4, Tomas Strachota >     wrote:
 >
 >         On 08/08/2014 08:55 AM, jllucas wrote:
 >          > Up!
 >          > Any clue?
 >          >
 >          > Thanks in advance!
 >
 >         Got it! Sorry for the delay.
 >         Please use:
 >             "security_group_ids"=>["sg-XXXXXX"]
 >         in compute attributes. Note the square brackets. Api
expects ids
 >         to be
 >         saved in an array.
 >
 >         It should definitely raise better exception. There's
already an
 >         issue
 >         for that:
 > http://projects.theforeman.org/issues/3649
<http://projects.theforeman.org/issues/3649>
 >         <http://projects.theforeman.org/issues/3649
<http://projects.theforeman.org/issues/3649>

Hi,

I've experienced recently an error similar to yours:
*> resource have noerrors (RuntimeError) *
and it happened due to a bad configuration in my security groups. I had two
SG and they belonged to different VPCs, so the command crashed and the host
wasn't created.
Could you make sure that the SG sg-0050d565 belongs to
"compute_resource_id"=>"1 and so on?

Regards!

··· El viernes, 22 de agosto de 2014 10:01:09 UTC+2, Tomas Strachota escribió: > > On 08/19/2014 09:41 PM, Jeremy Hartman wrote: > > thanks for the pull request, i merged it in and tested as requested > > (server version 1.5.1): > > > > the cli appears to be accepting the command, however the API is > > returning an error: > > > > > > > StartedPOST "/api/hosts"for10.128.4.160at 2014-08-1918:49:50+0000 > > ProcessingbyApi::V2::HostsController#create as JSON > > > Parameters:{"host"=>{"name"=>"hammer-test-1","environment_id"=>"1","architecture_id"=>"1","domain_id"=>"1","puppet_proxy_id"=>"1","operatingsystem_id"=>"1","compute_resource_id"=>"1","build"=>false,"enabled"=>true,"managed"=>true,"compute_attributes"=>{"security_group_ids"=>["sg-0050d565"],"volumes_attributes"=>{},"interfaces_attributes"=>{},"nics_attributes"=>{}},"ptable_id"=>"","host_parameters_attributes"=>{}},"apiv"=>"v2"} > > > Authorizeduser admin(AdminUser) > > AddingComputeinstance forhammer-test-1.xxxx.xxx > > Successfullydecrypted field forForeman::Model::EC2 Amazon-EC2-us-east-1 > > Rollingback due to a problem:[Setup compute instance > > hammer-test-1.xxxx.xxx 2failed [# > "hammer-test-1.xxxx.xxx", ip: nil, last_compile: nil, last_freshcheck: > > nil, last_report: nil, updated_at: nil, source_file_id: nil, created_at: > > nil, mac: nil, root_pass: nil, serial: nil, puppet_status: 0, domain_id: > > 1, architecture_id: 1, operatingsystem_id: 1, environment_id: 1, > > subnet_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: > > nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil, > > owner_id: 1, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1, > > managed: true, use_image: nil, image_file: nil, uuid: nil, > > compute_resource_id: 1, puppet_proxy_id: 1, certname: nil, image_id: > > nil, organization_id: nil, location_id: nil, type: "Host::Managed", otp: > > nil, realm_id: nil, compute_profile_id: nil, provision_method: nil>, > > :setCompute]] > > resource have noerrors (RuntimeError) > > > /usr/share/foreman/app/controllers/api/base_controller.rb:86:in`process_resource_error' > > > /usr/share/foreman/app/controllers/api/base_controller.rb:105:in > > `process_response' > > /usr/share/foreman/app/controllers/api/v2/hosts_controller.rb:73:in > `create' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/implicit_render.rb:4:in`send_action' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:167:in > > > `process_action' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rendering.rb:10:in > > > `process_action' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:18:in`block > > > in process_action' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:505:in > > > `block > > > (3levels)in_run__4459501957923365628__process_action__1647352445595852054__callbacks' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in > > > `block in _conditional_callback_around_6435' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:326:in`around' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in > > > `_callback_around_1782' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in > > > `_conditional_callback_around_6435' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:482:in`block > > > (2 levels) in > > > _run__4459501957923365628__process_action__1647352445595852054__callbacks' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in > > > `block in_conditional_callback_around_6434' > > /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in > > `clear_thread' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in`_conditional_callback_around_6434' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:415:in > > > `block > > > in_run__4459501957923365628__process_action__1647352445595852054__callbacks' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in > > > `block in _conditional_callback_around_6433' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:326:in`around' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in > > > `_callback_around_13' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in > > > `_conditional_callback_around_6433' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:414:in`_run__4459501957923365628__process_action__1647352445595852054__callbacks' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in > > > `__run_callback' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in > > > `_run_process_action_callbacks' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in`run_callbacks' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:17:in > > > `process_action' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rescue.rb:29:in > > > `process_action' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:30:in`block > > > in process_action' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in > > > `block ininstrument' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications/instrumenter.rb:20:in > > > `instrument' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in`instrument' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:29:in > > > `process_action' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/params_wrapper.rb:207:in > > > `process_action' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/railties/controller_runtime.rb:18:in`process_action' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:121:in > > > `process' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/rendering.rb:45:in > > > `process' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal.rb:203:in`dispatch' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rack_delegation.rb:14:in > > > `dispatch' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal.rb:246:in > > > `block in action' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:in > > > `dispatch' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:36:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/mapper.rb:43:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in > > > `block incall' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in > > > `each' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:608:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.1.3/lib/apipie/static_dispatcher.rb:65:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.1.3/lib/apipie/middleware/checksum_in_headers.rb:27:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/best_standards_support.rb:17:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/etag.rb:23:in > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/head.rb:14:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/params_parser.rb:21:in > > > `call' > > /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in`call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/flash.rb:242:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in > > > `context' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/cookies.rb:341:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/query_cache.rb:64:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:28:in > > > `block incall' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in > > > `_run__3616475373233695490__call__2084506232186143942__callbacks' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in`__run_callback' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in > > > `_run_call_callbacks' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in > > > `run_callbacks' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:27:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/remote_ip.rb:31:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/debug_exceptions.rb:16:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/show_exceptions.rb:56:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:32:in > > > `call_app' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in > > > `block in call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/tagged_logging.rb:22:in`tagged' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/request_id.rb:22:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/cache/strategy/local_cache.rb:72:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:15:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/static.rb:63:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in > > > `forward' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in`pass' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in > > > `invalidate' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in > > > `call!' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in`call' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/engine.rb:484:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/application.rb:231:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in`method_missing' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:134:in > > > `call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:64:in > > > `block in call' > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in`each' > > > > /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in > > > `call' > > > /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:77:in > > > `process_request' > > > /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:142:in`accept_and_process_next_request' > > > > /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in > > > `main_loop' > > /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:448:in > > `block (3 levels) in start_threads' > > Renderedapi/v2/errors/standard_error.json.rabl within > > api/v2/layouts/error_layout (0.5ms) > > > Completed500InternalServerErrorin525.3ms(Views:1.4ms|ActiveRecord:15.8ms) > > > > > > > > > > > is there something that i need to do on the server side as well to > > accept the update? > > > > thx > > > > /jer > > No changes on the server side required. I'm afraid I have no idea what > went wrong in your case. It could be some error in Fog. > Someone else, any idea? > > T. > > > > > On Monday, August 18, 2014 10:22:41 AM UTC-4, Tomas Strachota wrote: > > > > On 08/18/2014 08:59 AM, jllucas wrote: > > > Hi everyone, > > > > > > for me neither. Tomas, could you please post the hammer command > > that you > > > used? > > > > > > Regards! > > > > I must apologize. I identified the problem in the logs and then > tested > > it only via api. There's a bug in hammer which prevents it from > sending > > arrays in --compute-attributes. > > > > I've created a fix. Please test with following PR if you can: > > https://github.com/theforeman/hammer-cli/pull/137 > > > > > > hammer host create > > > --compute-attributes="security_group_ids=[sg-0050d565],managed_ip=private" > > > > ... > > > > Regards > > Tomas > > > > > > > > El viernes, 15 de agosto de 2014 00:13:35 UTC+2, Jeremy Hartman > > escribió: > > > > > > Hi Tomas, > > > > > > That doesn't appear to be working, at least not how I am > > trying to > > > use it: > > > > > > > > > > foreman@foreman:/etc/hammer# hammer -v --show-ids host create > > > --compute-resource-id=1 > > > > > > --compute-attributes="security_group_ids=>["sg-0050d565"],managed_ip=private" > > > > > > --name="hammer-test-1" --environment-id=1 --architecture-id=1 > > > --domain-id=1 --puppet-proxy-id=1 --operatingsystem-id=1 > > > --partition-table-id= --build=false > > > [ERROR 2014-08-14 21:53:11 API] 422 Unprocessable Entity > > > { > > > "error" => { > > > "id" => nil, > > > "errors" => { > > > "base" => [ > > >

Yeah, mismatches in EC2 configurations are a common occurrence with
failures to provision VMs in AWS.

Foreman 1.6 has a fix (Bug #6099: New Host screen is eating Fog Errors - Foreman) which
should improve the errors returned. I haven't checked it with the
Hammer host creation mentioned below, but would hope that it returns a
proper error instead of the message saying there weren't any error messages.

If you would like to try it on 1.5, you could probably apply
https://github.com/theforeman/foreman/commit/c67f9c5eb.patch to
/usr/share/foreman and restart Apache.

··· -- Dominic Cleal Red Hat Engineering

On 28/08/14 07:21, jllucas wrote:

Hi,

I’ve experienced recently an error similar to yours:
/> resource have noerrors (RuntimeError) /
and it happened due to a bad configuration in my security groups. I had
two SG and they belonged to different VPCs, so the command crashed and
the host wasn’t created.
Could you make sure that the SG /sg-0050d565/ belongs to
"compute_resource_id"=>"1 and so on?

Regards!

El viernes, 22 de agosto de 2014 10:01:09 UTC+2, Tomas Strachota escribió:

On 08/19/2014 09:41 PM, Jeremy Hartman wrote:
> thanks for the pull request, i merged it in and tested as requested
> (server version 1.5.1):
>
> the cli appears to be accepting the command, however the API is
> returning an error:
>
> >
> StartedPOST "/api/hosts"for10.128.4.160at 2014-08-1918:49:50+0000
> ProcessingbyApi::V2::HostsController#create as JSON
>
Parameters:{"host"=>{"name"=>"hammer-test-1","environment_id"=>"1","architecture_id"=>"1","domain_id"=>"1","puppet_proxy_id"=>"1","operatingsystem_id"=>"1","compute_resource_id"=>"1","build"=>false,"enabled"=>true,"managed"=>true,"compute_attributes"=>{"security_group_ids"=>["sg-0050d565"],"volumes_attributes"=>{},"interfaces_attributes"=>{},"nics_attributes"=>{}},"ptable_id"=>"","host_parameters_attributes"=>{}},"apiv"=>"v2"}

> Authorizeduser admin(AdminUser)
> AddingComputeinstance forhammer-test-1.xxxx.xxx
> Successfullydecrypted field forForeman::Model::EC2
Amazon-EC2-us-east-1
> Rollingback due to a problem:[Setup compute instance
> hammer-test-1.xxxx.xxx 2failed [#<Host::Managed id: nil, name:
> "hammer-test-1.xxxx.xxx", ip: nil, last_compile: nil,
last_freshcheck:
> nil, last_report: nil, updated_at: nil, source_file_id: nil,
created_at:
> nil, mac: nil, root_pass: nil, serial: nil, puppet_status: 0,
domain_id:
> 1, architecture_id: 1, operatingsystem_id: 1, environment_id: 1,
> subnet_id: nil, ptable_id: nil, medium_id: nil, build: false,
comment:
> nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil,
> owner_id: 1, owner_type: "User", enabled: true,
puppet_ca_proxy_id: 1,
> managed: true, use_image: nil, image_file: nil, uuid: nil,
> compute_resource_id: 1, puppet_proxy_id: 1, certname: nil, image_id:
> nil, organization_id: nil, location_id: nil, type:
"Host::Managed", otp:
> nil, realm_id: nil, compute_profile_id: nil, provision_method: nil>,
> :setCompute]]
> resource have noerrors (RuntimeError)
>
/usr/share/foreman/app/controllers/api/base_controller.rb:86:in`process_resource_error'

> /usr/share/foreman/app/controllers/api/base_controller.rb:105:in
> `process_response'
>
/usr/share/foreman/app/controllers/api/v2/hosts_controller.rb:73:in
`create'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/implicit_render.rb:4:in`send_action'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:167:in

> `process_action'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rendering.rb:10:in

> `process_action'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:18:in`block

> in process_action'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:505:in

> `block
>
(3levels)in_run__4459501957923365628__process_action__1647352445595852054__callbacks'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in

> `block in _conditional_callback_around_6435'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:326:in`around'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in

> `_callback_around_1782'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in

> `_conditional_callback_around_6435'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:482:in`block

> (2 levels) in
>
_run__4459501957923365628__process_action__1647352445595852054__callbacks'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in

> `block in_conditional_callback_around_6434'
>
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in
> `clear_thread'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in`_conditional_callback_around_6434'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:415:in

> `block
>
in_run__4459501957923365628__process_action__1647352445595852054__callbacks'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in

> `block in _conditional_callback_around_6433'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:326:in`around'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in

> `_callback_around_13'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in

> `_conditional_callback_around_6433'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:414:in`_run__4459501957923365628__process_action__1647352445595852054__callbacks'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in

> `__run_callback'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in

> `_run_process_action_callbacks'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in`run_callbacks'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:17:in

> `process_action'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rescue.rb:29:in

> `process_action'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:30:in`block

> in process_action'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in

> `block ininstrument'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications/instrumenter.rb:20:in

> `instrument'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in`instrument'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:29:in

> `process_action'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/params_wrapper.rb:207:in

> `process_action'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/railties/controller_runtime.rb:18:in`process_action'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:121:in

> `process'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/abstract_controller/rendering.rb:45:in

> `process'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal.rb:203:in`dispatch'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal/rack_delegation.rb:14:in

> `dispatch'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_controller/metal.rb:246:in

> `block in action'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:in

> `dispatch'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:36:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/mapper.rb:43:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in

> `block incall'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in

> `each'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:608:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.1.3/lib/apipie/static_dispatcher.rb:65:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.1.3/lib/apipie/middleware/checksum_in_headers.rb:27:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/best_standards_support.rb:17:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/etag.rb:23:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/head.rb:14:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/params_parser.rb:21:in

> `call'
>
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in`call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/flash.rb:242:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in

> `context'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/cookies.rb:341:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/query_cache.rb:64:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:28:in

> `block incall'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in

> `_run__3616475373233695490__call__2084506232186143942__callbacks'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in`__run_callback'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in

> `_run_call_callbacks'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in

> `run_callbacks'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:27:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/remote_ip.rb:31:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/debug_exceptions.rb:16:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/show_exceptions.rb:56:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:32:in

> `call_app'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in

> `block in call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/tagged_logging.rb:22:in`tagged'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/request_id.rb:22:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/cache/strategy/local_cache.rb:72:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:15:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.18/lib/action_dispatch/middleware/static.rb:63:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in

> `forward'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in`pass'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in

> `invalidate'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in

> `call!'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in`call'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/engine.rb:484:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/application.rb:231:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in`method_missing'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:134:in

> `call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:64:in

> `block in call'
>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in`each'

>
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in

> `call'
>
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:77:in

> `process_request'
>
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:142:in`accept_and_process_next_request'

>
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in

> `main_loop'
> /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:448:in
> `block (3 levels) in start_threads'
> Renderedapi/v2/errors/standard_error.json.rabl within
> api/v2/layouts/error_layout (0.5ms)
>
Completed500InternalServerErrorin525.3ms(Views:1.4ms|ActiveRecord:15.8ms)

>
> >
>
>
> is there something that i need to do on the server side as well to
> accept the update?
>
> thx
>
> /jer

No changes on the server side required. I'm afraid I have no idea what
went wrong in your case. It could be some error in Fog.
Someone else, any idea?

T.

>
> On Monday, August 18, 2014 10:22:41 AM UTC-4, Tomas Strachota wrote:
>
>     On 08/18/2014 08:59 AM, jllucas wrote:
>      > Hi everyone,
>      >
>      > for me neith