Bug 1469632 - Error when refreshing manifest - Runtime Error could not execute statement at com.mysql.jdbc.SQLError.createSQLException
Error when refreshing manifest - Runtime Error could not execute statement at...
Status: VERIFIED
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Subscription Management (Show other bugs)
6.2.10
All All
unspecified Severity high (vote)
: 6.2.14
: --
Assigned To: Justin Sherrill
Jitendra Yejare
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-11 10:57 EDT by Waldirio M Pinheiro
Modified: 2017-12-11 09:25 EST (History)
9 users (show)

See Also:
Fixed In Version: tfm-rubygem-katello-3.4.4
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 20308 None None None 2017-07-14 12:42 EDT

  None (edit)
Description Waldirio M Pinheiro 2017-07-11 10:57:36 EDT
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 14:47:41 EDT
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 12:42:01 EDT
Created redmine issue http://projects.theforeman.org/issues/20308 from this bug
Comment 11 Justin Sherrill 2017-07-14 13:32 EDT
Created attachment 1298556 [details]
Patch
Comment 15 pm-sat@redhat.com 2017-07-28 14:16:01 EDT
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 pm-sat@redhat.com 2017-08-03 18:19:07 EDT
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 09:14:29 EST
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 09:25:37 EST
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.

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