Bug 1469632 - Error when refreshing manifest - Runtime Error could not execute statement at com.mysql.jdbc.SQLError.createSQLException
Summary: Error when refreshing manifest - Runtime Error could not execute statement at...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.2.10
Hardware: All
OS: All
unspecified
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-11 14:57 UTC by Waldirio M Pinheiro
Modified: 2020-12-14 09:05 UTC (History)
9 users (show)

Fixed In Version: tfm-rubygem-katello-3.4.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch (2.74 KB, application/mbox)
2017-07-14 17:32 UTC, Justin Sherrill
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20308 0 None None None 2017-07-14 16:42:03 UTC

Description Waldirio M Pinheiro 2017-07-11 14:57:36 UTC
Description of problem:
When customer try to refresh the manifest, receive error below

# hammer subscription refresh-manifest --organization=<org name>
[....................................................................................................................................................................................................................................] [100%]
Error: Runtime Error could not execute statement at com.mysql.jdbc.SQLError.createSQLException:1,078
# 


Version-Release number of selected component (if applicable):
Sat 6.2.10 / candlepin-0.9.54.21-1.el6.noarch

How reproducible:
100% on reproducer *in house*

Steps to Reproduce:
1. Execute command 
   hammer subscription refresh-manifest --organization=<org name>
2.
3.

Actual results:
Error: Runtime Error could not execute statement at com.mysql.jdbc.SQLError.createSQLException:1,078

Expected results:
Subscription refreshed.

Additional info:

Comment 6 Barnaby Court 2017-07-11 18:47:41 UTC
This error was caused because 2 concurrent calls were made to the hosted CP export endpoint. The first completed successfully and the 2nd failed due to a lock-wait while the first was executing. Katello should not be allowing 2 exports from hosted for a single organization at a time.

Comment 10 Justin Sherrill 2017-07-14 16:42:01 UTC
Created redmine issue http://projects.theforeman.org/issues/20308 from this bug

Comment 11 Justin Sherrill 2017-07-14 17:32:33 UTC
Created attachment 1298556 [details]
Patch

Comment 15 Satellite Program 2017-07-28 18:16:01 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20308 has been resolved.

Comment 16 Satellite Program 2017-08-03 22:19:07 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20308 has been resolved.

Comment 18 Jitendra Yejare 2017-12-11 14:14:29 UTC
Verified !

@Satellite 6.2.13 snap 2.0
@Satellite 6.3 snap 28


Observation:

Sat 6.2:
# hammer subscription refresh-manifest --organization='Default Organization'
[.........................................................................................................................................................................................................] [100%]


Sat 6.3:
# hammer subscription refresh-manifest --organization='Default Organization'
[..........................................................................................................................................................................................................] [100%]

But in 6.3, I saw an error in /var/log/messages:
Dec 11 08:49:33 localhost pulp: pulp.server.async.tasks:INFO: [f134de1f] Task failed : [f134de1f-c642-47ce-8aae-2adaaad555b1]
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536) Task pulp.server.managers.repo.importer.update_importer_config[f134de1f-c642-47ce-8aae-2adaaad555b1] raised unexpected: OperationError(u"Could not save document (Cannot update 'config.depth' and 'config' at the same time)",)
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536) Traceback (most recent call last):
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)     R = retval = fun(*args, **kwargs)
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 527, in __call__
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)     return super(Task, self).__call__(*args, **kwargs)
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 107, in __call__
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)     return super(PulpTask, self).__call__(*args, **kwargs)
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)     return self.run(*args, **kwargs)
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)   File "/usr/lib/python2.7/site-packages/pulp/server/controllers/importer.py", line 275, in update_importer_config
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)     repo_importer.save()
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)   File "/usr/lib/python2.7/site-packages/pulp/server/db/model/__init__.py", line 291, in save
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)     super(Importer, self).save()
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)   File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 398, in save
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536)     raise OperationError(message % unicode(err))
Dec 11 08:49:33 localhost pulp: celery.worker.job:ERROR: (25721-57536) OperationError: Could not save document (Cannot update 'config.depth' and 'config' at the same time)
Dec 11 08:49:33 localhost pulp: celery.worker.job:INFO: Task pulp.server.async.tasks._release_resource[741676f9-28c8-4afd-8012-8d1fd0e2b30a] succeeded in 0.0119093290004s: None

But this shouldnt block this bug from verifying as the error message in bug description is no more reproducible. Will raise new error for above error.

Comment 19 Jitendra Yejare 2017-12-11 14:25:37 UTC
Ok,

So here is an update on what I said in last comment about the error :

The error is repro on my setup only as its upgraded from sat 6.3 snap 27 to 28.
So maybe something wrong with conf during the upgrade.

Comment 20 Satellite Program 2018-02-21 16:54:37 UTC
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


Note You need to log in before you can comment on or make changes to this bug.