Hide Forgot
Description of problem: There seems to be some error involving `katello_pools` table causing a transaction error, causing further queries to fail with: # happened on product create 2016-12-03 23:59:01 [app] [E] ForemanTasks::TaskError: Task 98445faf-2e97-480f-824c-258d98a1f359: ActiveRecord::StatementInvalid: PG::Error: ERROR: current transaction is aborted, commands ignored until end of transaction block | : SELECT "katello_pools".* FROM "katello_pools" WHERE "katello_pools"."cp_id" = '8a93a2a558c7956b0158c83313da12d6' ORDER BY "katello_pools"."id" ASC LIMIT 1 I've not been able to manually reproduce the issue, however our automation hits the issue quite often (at different places) so I'm attaching the foreman-debug tarball. According the production.log, all the occurrences involve querying the `katello_pools` table and seem to happen during Product manipulation. Version-Release number of selected component (if applicable): satellite 6.2.5 snap2 How reproducible: unsure
Created redmine issue http://projects.theforeman.org/issues/20788 from this bug
recent automation run into this in setupClass, which revealed interesting information. It seems that after the race condition is hit, there already is Katello AR created for the product, yet it does not exist Candlepin (and never will be, since the dynflow task errored out). This generates inconsistency and every user interaction with the product in katello results in error in candlepin, as the product does not exist there (not the missing product id in the uri [/products//content]): 2017-09-01 16:27:36,267 [thread=http-bio-8443-exec-6] [req=3fbe3a67-91d0-4f10-864c-aaf172412553, org=] ERROR org.candlepin.common.exceptions.mappers.CandlepinExceptionMapper - Runtime Error RESTEASY001185: Could not find resource for org.jboss.resteasy.spi.NotFoundException: RESTEASY001185: Could not find resource for relative : /products//content/15042976562127485393238 of full path: https://localhost:8443/candlepin/products//content/15042976562127485393238?enabl ยป_______at org.jboss.resteasy.core.registry.PathParamSegment.matchPattern(PathParamSegment.java:209) ~[resteasy-jaxrs-2.3.10.Final.jar:na] - I did some googling around 'RESTEASY001185' and found many bugs and google group threads discussing this error mainly after upgrades (for repos and subscriptions). I believe they're all caused by the similar race conditions - I guess the dynflow tasks should assure atomicity of the actions in the task.
Upstream bug assigned to jsherril
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20788 has been resolved.
Roman, is there any traceback associated with the error?
Created attachment 1360260 [details] katello_pools PG error traceback @Justin, here it is (attachment)
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