Project

General

Profile

Bug #29007

Updated by James Jeffers almost 5 years ago

Attempting a file upload via hammer for a pulpcore enabled server fails, whereas uploading via the UI worked. 



 ``` 
 18:53:05 rails.1     | 2020-02-13T18:53:05 [E|app|] Katello::HttpErrors::BadRequest: Task d17b6157-5272-4f0f-9e3c-66d1e3f28cc3: NoMethodError: undefined method `uploads_api' for #<Katello::Pulp3::Repository::File:0x0000000009151ec8> 
 18:53:05 rails.1     |    | /home/vagrant/projects/katello/app/controllers/katello/api/v2/repositories_controller.rb:423:in `rescue in import_uploads' 
 18:53:05 rails.1     |    | /home/vagrant/projects/katello/app/controllers/katello/api/v2/repositories_controller.rb:417:in `import_uploads' 
 [...] 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:194:in `process_action' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/rendering.rb:30:in `process_action' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:109:in `block in run_callbacks' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/app/controllers/api/v2/base_controller.rb:163:in `disable_json_root' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:136:in `run_callbacks' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:41:in `process_action' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/rescue.rb:22:in `process_action' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `block in instrument' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `instrument' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/params_wrapper.rb:256:in `process_action' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/railties/controller_runtime.rb:24:in `process_action' 
 18:53:05 rails.1     |    | /home/vagrant/projects/katello/app/controllers/katello/concerns/api/api_controller.rb:39:in `process_action' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:134:in `process' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionview-5.2.1/lib/action_view/rendering.rb:32:in `process' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal.rb:191:in `dispatch' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal.rb:252:in `dispatch' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:52:in `dispatch' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:34:in `serve' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/mapper.rb:18:in `block in <class:Constraints>' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/mapper.rb:48:in `serve' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:52:in `block in serve' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `each' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `serve' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:840:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:524:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `public_send' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `method_missing' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/mapper.rb:48:in `serve' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:52:in `block in serve' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `each' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `serve' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:840:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/projects/katello/lib/katello/middleware/event_daemon.rb:10:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/apipie-rails-0.5.17/lib/apipie/static_dispatcher.rb:66:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/bullet-6.1.0/lib/bullet/rack.rb:15:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/apipie-rails-0.5.17/lib/apipie/extractor/recorder.rb:137:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/lib/foreman/middleware/telemetry.rb:10:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/apipie-rails-0.5.17/lib/apipie/middleware/checksum_in_headers.rb:27:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-openid-1.4.2/lib/rack/openid.rb:98:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/tempfile_reaper.rb:17:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/etag.rb:27:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/conditional_get.rb:40:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/head.rb:14:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/http/content_security_policy.rb:18:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/session/abstract/id.rb:277:in `context' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/session/abstract/id.rb:271:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/cookies.rb:670:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:559:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:98:in `run_callbacks' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/executor.rb:14:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/rack/logger.rb:38:in `call_app' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/rack/logger.rb:28:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/request_id.rb:27:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/projects/katello/lib/katello/prevent_json_parsing.rb:12:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/method_override.rb:24:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/runtime.rb:24:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/executor.rb:14:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/sendfile.rb:113:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/secure_headers-6.3.0/lib/secure_headers/middleware.rb:11:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:524:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `public_send' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `method_missing' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/urlmap.rb:77:in `block in call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/urlmap.rb:61:in `each' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.1.1/lib/rack/urlmap.rb:61:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/puma-4.3.1/lib/puma/configuration.rb:228:in `call' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/puma-4.3.1/lib/puma/server.rb:681:in `handle_request' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/puma-4.3.1/lib/puma/server.rb:472:in `process_client' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/puma-4.3.1/lib/puma/server.rb:328:in `block in run' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/puma-4.3.1/lib/puma/thread_pool.rb:134:in `block in spawn_thread' 
 18:53:05 rails.1     |    | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context' 
 18:53:05 rails.1     | 2020-02-13T18:53:05 [I|app|] Completed 400 Bad Request in 3262ms (Views: 0.4ms | ActiveRecord: 113.2ms) 
 ``` 

Back