Description of problem: In case a hypervisor is registered as a Host and is running virt-who, a task to update the Host can fail on acquired lock. The reason is, both rhsmcertd-worker AND virt-who can fire "PUT /rhsm/consumers/${UUID}" requests concurrently and independently, what leads to concurrent Actions::Katello::Host::Update tasks where either of them fails with "Required lock is already taken by other running tasks" error. We should handle this better in our API, that e.g. should handle the 2nd request, wait till the 1st is completed and then continue in the 2nd one. Version-Release number of selected component (if applicable): Sat 6.3, expected in 6.4 as well. How reproducible: 100% with some effort / proper timing Steps to Reproduce: 1. Have a hypervisor registered as a Host, with virt-who installed & configured 2. Populate or update some host's facts, just to have Host update crunching the facts longer. 3. Enable rhsm debugs and restart rhsmcertd service 4. Check rhsm logs to spot time when "PUT /rhsm/consumers/${UUID}" is triggered. 5. At that time, run virt-who -o. 6. After a while, check for status of 2 Host update tasks for this Host. Actual results: 2nd Host update fails with "Required lock is already taken by other running tasks" error. Expected results: 2nd Host update task proceeds well. Additional info:
We are tracking this in: 1643649 going to close this as a dupe. *** This bug has been marked as a duplicate of bug 1643649 ***