Red Hat Bugzilla – Bug 1475056
Manifest refresh fails with 'deadlock detected'
Last modified: 2018-06-23 01:21:57 EDT
Description of problem:
Refreshing the manifest on Satellite 6.2.10 results in the following error:
2017-07-21 16:05:26 EDT ERROR: deadlock detected
2017-07-21 16:05:26 EDT DETAIL: Process 2848 waits for ShareLock on transaction 231777414; blocked by process 1382.
Process 1382 waits for ShareLock on transaction 231777394; blocked by process 2848.
Process 2848: insert into cp_pool_products (created, updated, pool_id, product_id, product_name, dtype, id) values ($1, $2, $3, $4, $5, 'provided', $6)
Process 1382: insert into cp_entitlement (created, updated, consumer_id, dirty, endDateOverride, owner_id, pool_id, quantity, updatedOnStart, id) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
Version-Release number of selected component (if applicable):
So far only on customer Satellite
That's right - in this case subsequent manifest refreshes continue to fail.
The following workaround should enable those blocked by this issue to move forward with manifest import.
Temporarily disable conflicting, external traffic to the satellite for the duration of manifest import.
Important notes before getting started:
This will result in all attempts to register/unregister or update entitlements from client systems to fail for the duration of manifest import.
After this workaround is completed, operations should return to normal.
Steps to accomplish the above:
1) Add the following to /etc/httpd/conf.d/05-foreman-ssl.d/katello.conf (less the triple quotes):
2) Restart httpd: `systemctl restart httpd`
3) Navigate to the manifest import page (Content -> Red Hat Subscriptions -> Click "Manage Manifest" button)
4) Select the file to import using the dialog displayed after clicking "Browse".
5) Click "Upload"
6) Wait awhile (in my case this took somewhere between 30min and 1 hour depending on hardware, it may take longer depending on the size and contents of the manifest)
7) Remove the passage added to /etc/httpd/conf.d/05-foreman-ssl.d/katello.conf in step 1.
8) Restart httpd: `systemctl restart httpd`
After completing the above, the manifest import should succeed.
The above worked for me on my reproducer of the deadlock issue. I believe it will work for others as well.