Bug #5754

Cloud-init phone_home raise 500 error because of POST content

Added by Romain Vrignaud over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Romain Vrignaud
Category:Templates
Target version:Sprint 23
Difficulty: Bugzilla link:1107690
Found in release:1.5.0 Pull request:
Story points-
Velocity based estimate-
Release1.5.1Release relationshipAuto

Description

POST content (hostname ?) make foreman raise a 500 error.
We should empty the content of the POST.

Started POST "/unattended/built?token=xxxx" for 10.237.2.40 at 2014-05-16 08:28:48 +0000
Processing by UnattendedController#built as */*
  Parameters: {"instance_id"=>"i-0000198e", "pub_key_rsa"=>"xxxx", "hostname"=>"ddsfdsdfs", "pub_key_ecdsa"=>"xxxx", "pub_key_dsa"=>"xxx", "token"=>"xxx"}
WARNING: Can't verify CSRF token authenticity
Redirected to http://test.example.com:3000/users/login
Filter chain halted as :require_login rendered or redirected
Completed 302 Found in 2.5ms (ActiveRecord: 0.6ms)
Started POST "/users/login" for 10.237.2.40 at 2014-05-16 08:28:48 +0000
Processing by UsersController#login as */*
WARNING: Can't verify CSRF token authenticity
Setting current user thread-local variable to nil
Operation FAILED: undefined method `[]' for nil:NilClass
/home/rrondeau/foreman/app/controllers/users_controller.rb:72:in `login'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:167:in `process_action'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_controller/metal/rendering.rb:10:in `process_action'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:461:in `block (3 levels) in _run__2098843741482245584__process_action__4538368254813143935__callbacks'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_6377'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:326:in `around'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in `_callback_around_906'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_6377'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:460:in `block (2 levels) in _run__2098843741482245584__process_action__4538368254813143935__callbacks'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_6376'
/home/rrondeau/foreman/app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_6376'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:415:in `block in _run__2098843741482245584__process_action__4538368254813143935__callbacks'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_6375'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:326:in `around'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:310:in `_callback_around_13'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_6375'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:414:in `_run__2098843741482245584__process_action__4538368254813143935__callbacks'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in `__run_callback'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in `run_callbacks'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:17:in `process_action'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_controller/metal/rescue.rb:29:in `process_action'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in `block in instrument'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in `instrument'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/usr/lib/ruby/gems/2.0.0/gems/activerecord-3.2.18/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:121:in `process'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/abstract_controller/rendering.rb:45:in `process'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_controller/metal.rb:203:in `dispatch'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_controller/metal.rb:246:in `block in action'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:36:in `call'
/usr/lib/ruby/gems/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/usr/lib/ruby/gems/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/usr/lib/ruby/gems/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:608:in `call'
/usr/lib/ruby/gems/2.0.0/gems/apipie-rails-0.1.3/lib/apipie/static_dispatcher.rb:65:in `call'
/usr/lib/ruby/gems/2.0.0/gems/rack-openid-1.4.2/lib/rack/openid.rb:98:in `call'
/usr/lib/ruby/gems/2.0.0/gems/apipie-rails-0.1.3/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/head.rb:14:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home/rrondeau/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/flash.rb:242:in `call'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/usr/lib/ruby/gems/2.0.0/gems/activerecord-3.2.18/lib/active_record/query_cache.rb:64:in `call'
/usr/lib/ruby/gems/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in `_run__4061752724268364408__call__1048963326518903143__callbacks'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in `__run_callback'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in `run_callbacks'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:32:in `call_app'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in `block in call'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/tagged_logging.rb:22:in `tagged'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/usr/lib/ruby/gems/2.0.0/gems/activesupport-3.2.18/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/usr/lib/ruby/gems/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/static.rb:63:in `call'
/usr/lib/ruby/gems/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/usr/lib/ruby/gems/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
/usr/lib/ruby/gems/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
/usr/lib/ruby/gems/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
/usr/lib/ruby/gems/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/engine.rb:484:in `call'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/application.rb:231:in `call'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:134:in `call'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/urlmap.rb:64:in `block in call'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `each'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `call'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/rack/log_tailer.rb:17:in `call'
/usr/lib/ruby/gems/2.0.0/gems/thin-1.6.2/lib/thin/connection.rb:86:in `block in pre_process'
/usr/lib/ruby/gems/2.0.0/gems/thin-1.6.2/lib/thin/connection.rb:84:in `catch'
/usr/lib/ruby/gems/2.0.0/gems/thin-1.6.2/lib/thin/connection.rb:84:in `pre_process'
/usr/lib/ruby/gems/2.0.0/gems/thin-1.6.2/lib/thin/connection.rb:53:in `process'
/usr/lib/ruby/gems/2.0.0/gems/thin-1.6.2/lib/thin/connection.rb:39:in `receive_data'
/usr/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
/usr/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
/usr/lib/ruby/gems/2.0.0/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
/usr/lib/ruby/gems/2.0.0/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/handler/thin.rb:13:in `run'
/usr/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:268:in `start'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/commands/server.rb:70:in `start'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/commands.rb:55:in `block in <top (required)>'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/commands.rb:50:in `tap'
/usr/lib/ruby/gems/2.0.0/gems/railties-3.2.18/lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
  Rendered common/500.html.erb within layouts/application (3.9ms)
  Rendered layouts/base.html.erb (1.1ms)
Completed 500 Internal Server Error in 9.8ms (Views: 6.1ms | ActiveRecord: 1.5ms)

Related issues

Duplicated by Foreman - Bug #6000: on 1.5 hosts build on compute resources remain in "buildi... Duplicate 05/30/2014
Duplicated by Foreman - Bug #15074: cloud init fails to mark instance as built Duplicate 05/17/2016

Associated revisions

Revision adc47612
Added by Romain Vrignaud over 3 years ago

Fix #5754 Fix cloud-init phone_home function

History

#1 Updated by Dominic Cleal over 3 years ago

  • Project changed from Templates to Foreman
  • Category set to Templates
  • Status changed from Assigned to Closed
  • Target version set to Sprint 23
  • % Done changed from 0 to 100
  • Release set to 1.5.1
  • Found in release set to 1.5.0

#2 Updated by Dominic Cleal over 3 years ago

  • Duplicated by Bug #6000: on 1.5 hosts build on compute resources remain in "building" indefinitely added

#3 Updated by Bryan Kearney over 3 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1107690

#4 Updated by Dominic Cleal over 1 year ago

  • Duplicated by Bug #15074: cloud init fails to mark instance as built added

Also available in: Atom PDF