Bug 1523254 - Under Satellite high load 'subscription-manager --force' command on clients locks itself and fails
Summary: Under Satellite high load 'subscription-manager --force' command on clients l...
Keywords:
Status: CLOSED DUPLICATE of bug 1514508
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.2.10
Hardware: All
OS: Linux
high
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-07 14:22 UTC by anerurka
Modified: 2021-09-09 12:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-05 15:57:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
register.png (104.85 KB, image/png)
2017-12-07 14:22 UTC, anerurka
no flags Details
unregister.png (93.81 KB, image/png)
2017-12-07 14:23 UTC, anerurka
no flags Details

Description anerurka 2017-12-07 14:22:37 UTC
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:

Comment 1 anerurka 2017-12-07 14:23:22 UTC
Created attachment 1364322 [details]
unregister.png


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