Hide Forgot
Created attachment 1191472 [details] foreman-debug of candlepin ConstraintViolationException Description of problem: When i created 2 repositories concurrent a candlepin exception is thrown. One of the tasks is getting paused. After resuming it works. 2016-08-14 14:00:11 [app] [I] Started GET "/katello/api/v2/products" for 127.0.0.1 at 2016-08-14 14:00:11 +0000 2016-08-14 14:00:11 [app] [I] Processing by Katello::Api::V2::RepositoriesController#index as */* 2016-08-14 14:00:11 [app] [I] Parameters: {"per_page"=>9999, "organization_id"=>3, "name"=>"HOIRHEL-6.8-d20160814", "product_id"=>"36", "api_version"=>"v2", "repository"=>{"name"=>"HOIRHEL-6.8-d20160814", "product_id"=>"36"} } 2016-08-14 14:00:12 [app] [I] Authorized user hoici(hoici ) 2016-08-14 14:00:12 [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.68/app/views/katello/api/v2/repositories/index.json.rabl within katello/api/v2/layouts/collection (1.4ms) 2016-08-14 14:00:12 [app] [I] Completed 200 OK in 45ms (Views: 2.4ms | ActiveRecord: 8.0ms) 2016-08-14 14:00:12 [app] [I] Started POST "/katello/api/v2/repositories" for 127.0.0.1 at 2016-08-14 14:00:12 +0000 2016-08-14 14:00:12 [app] [I] Processing by Katello::Api::V2::RepositoriesController#create as */* 2016-08-14 14:00:12 [app] [I] Parameters: {"per_page"=>9999, "organization_id"=>3, "name"=>"HOIRHEL-6Server-d20160814", "product_id"=>"36", "content_type"=>"yum", "url"=>"http://fibsbamboodev.hag.hilti.com/hoici/release/HOIR HEL-6Server-d20160814/rpm", "api_version"=>"v2", "repository"=>{"name"=>"HOIRHEL-6Server-d20160814", "url"=>"http://fibsbamboodev.hag.hilti.com/hoici/release/HOIRHEL-6Server-d20160814/rpm", "content_type"=>"yum", "product_id"= >"36"}} 2016-08-14 14:00:12 [app] [I] Authorized user hoici(hoici ) 2016-08-14 14:00:12 [app] [I] Started POST "/katello/api/v2/repositories" for 127.0.0.1 at 2016-08-14 14:00:12 +0000 2016-08-14 14:00:12 [app] [I] Processing by Katello::Api::V2::RepositoriesController#create as */* 2016-08-14 14:00:12 [app] [I] Parameters: {"per_page"=>9999, "organization_id"=>3, "name"=>"HOIRHEL-6.8-d20160814", "product_id"=>"36", "content_type"=>"yum", "url"=>"http://fibsbamboodev.hag.hilti.com/hoici/release/HOIRHEL- 6.8-d20160814/rpm", "api_version"=>"v2", "repository"=>{"name"=>"HOIRHEL-6.8-d20160814", "url"=>"http://fibsbamboodev.hag.hilti.com/hoici/release/HOIRHEL-6.8-d20160814/rpm", "content_type"=>"yum", "product_id"=>"36"}} 2016-08-14 14:00:12 [app] [I] Authorized user hoici(hoici ) 2016-08-14 14:00:12 [app] [I] Processing by Katello::Api::V2::ProductsController#index as */* 2016-08-14 14:00:12 [app] [I] Parameters: {"per_page"=>9999, "organization_id"=>3, "name"=>"HOIRHEL", "api_version"=>"v2", "product"=>{"name"=>"HOIRHEL", "organization_id"=>3}} 2016-08-14 14:00:12 [app] [I] Authorized user hoici(hoici ) 2016-08-14 14:00:13 [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.68/app/views/katello/api/v2/products/index.json.rabl within katello/api/v2/layouts/collection (596.3ms) 2016-08-14 14:00:13 [app] [I] Completed 200 OK in 712ms (Views: 586.4ms | ActiveRecord: 30.0ms) 2016-08-14 14:00:13 [foreman-tasks/action] [E] Runtime Error could not execute statement at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse:2,102 (Katello::Errors::CandlepinError) | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.68/app/lib/actions/middleware/propagate_candlepin_errors.rb:21:in `rescue in propagate_candlepin_errors' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.68/app/lib/actions/middleware/propagate_candlepin_errors.rb:19:in `propagate_candlepin_errors' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.68/app/lib/actions/middleware/propagate_candlepin_errors.rb:9:in `run' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:22:in `call' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `pass' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:17:in `pass' See attached foreman-debug for more info, the time was 2016-08-14 at 14:00:12 Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Create 2 repositories at the same time 2. 3. Actual results: Expected results: Additional info: Creating multiple repositories at the same time with a script triggers a Nullpointer exception,i will file another BZ for this hammer -c/opt/hoici/etc/sat6/hammer-hoici.yaml product create --organization-id=3 --name=TestProdA for i in `seq 1 30`; do hammer -c/opt/hoici/etc/sat6/hammer-hoici.yaml repository create --organization-id=3 --product=TestProdA --content-type=yum --name=TestRepoA$i & done
The script to simulate and the NullPointerException is already discussed in BZ1356916
Enabled 4 repos at once and all enabled fine without any errors or paused tasks, marking as verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. > > For information on the advisory, and where to find the updated files, follow the link below. > > If the solution does not work for you, open a new bug report. > > https://access.redhat.com/errata/RHSA-2018:0336