Created attachment 1364321 [details] register.png Description of problem: Under Satellite high load 'subscription-manager --force' command on clients locks itself and fails Version-Release number of selected component (if applicable): Satellite Server v.6.2.12 How reproducible: Executed a 'satellite-manager register --force' on a satellite client: [1 ] subscription-manager register --force --activationkey=xxxxx --org=xxxxx' As expected [1] created an [2] unregister task followed by a [3] register task on Satellite, but the register task failed because it did not wait until the unregister task finish, so [1] failed on step [3] because step [2] was not finished: [2][screenshot attached at unregister.png] --------------------------------------------------- Id: 20c63be7-60b7-4deb-ab9a-b088b75ffff6 Label: Actions::Katello::Host::Unregister Name: Unregister Host Owner: foreman_admin Execution type: Delayed Start at: 2017-11-30 08:03:38 UTC Start before: - Started at: 2017-11-30 08:03:38 UTC Ended at: 2017-11-30 08:08:48 UTC State: stopped Result: success ---------------------------------------------------------- [3][screenshot attached at register.png] ------------------------------------------------------------------ Id: fd0cb4b9-d43f-42ad-ab83-b59c75121b92 Label: Actions::Katello::Host::Register Name: Register Host Owner: foreman_admin Execution type: Delayed Start at: 2017-11-30 08:05:38 UTC Start before: - Started at: 2017-11-30 08:05:38 UTC Ended at: 2017-11-30 08:05:38 UTC State: stopped Result: error Required lock: read Conflicts with tasks: - https://satellite.example.com/foreman_tasks/tasks/20c63be7-60b7-4deb-ab9a-b088b75ffff6 Required lock is already taken by other running tasks. Please inspect their state, fix their errors and resume them. Actual results: unregister task [2] started at 08:03:30 and finished 08:08:48 ( ~ 5 minutes before !), but the register task [3] started at 08:05:38 and failed because [2] did not finished. As can be seen the register task [3] just wait 120s for the unregister task [2] to finish, and then tries the register. As global result under this conditions 'subscription-manager --force' is locking itself if the unregister task [2] takes more than 120s. Expected results: register task should not be started until unregister task is completed. Additional info:
Created attachment 1364322 [details] unregister.png