Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1676605

Summary: syspurpose show spawns two tasks, the second of which can conflict with the first
Product: Red Hat Satellite Reporter: jcallaha
Component: Subscription ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: jcallaha
Severity: urgent Docs Contact:
Priority: high    
Version: 6.5.0CC: cdonnell
Target Milestone: Released   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-12 19:28:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jcallaha 2019-02-12 16:34:05 UTC
Description of problem:


[root@test1 ~]# syspurpose add-addons Satellite6
Added Satellite6 to addons.
System purpose successfully sent to subscription management server.
[root@test1 ~]# 
[root@test1 ~]# syspurpose show
{
  "addons": [
    "Satellite6"
  ],
  "role": "Red Hat Enterprise Linux Workstation",
  "service_level_agreement": "Self-Support",
  "usage": "Development/Test"
}
HTTP error (500 - Internal Server Error): Required lock is already taken by other running tasks.
Please inspect their state, fix their errors and resume them.

Required lock: update
Conflicts with tasks:
- https://my.satellite.host.com/foreman_tasks/tasks/ae4c13dc-8272-4116-82b0-b4f6e5bdc9cc


Version-Release number of selected component (if applicable):
Satellite 6.5.0 Snap 15
RHEL 8 Beta

How reproducible:
Always

Steps to Reproduce:
1. Register a RHEL 8 client to Satellite 6.5.0
2. Run syspurpose show
3. Check foreman tasks for two new identical tasks

Optional:
4. Set values for syspurpose addons
5. Run syspurpose show

Actual results:
Two tasks will be spawned. A collision seems more likely when an addon is added from the client.

Expected results:
Only one task is spawned and no collisions occur.

Additional info:
Identical tasks

Id: 97d75f0c-3550-4a3b-8c21-1f4bcb38625d
Label: Actions::Katello::Host::Update
Duration: less than a minute
Raw input:
{"hostname"=>"test1.rhel8",
 "host"=>{"id"=>2, "name"=>"test1.rhel8"},
 "consumer_params"=>
  {"usage"=>"Development/Test",
   "role"=>"Red Hat Enterprise Linux Workstation",
   "addOns"=>[],
   "serviceLevel"=>"Self-Support"},
 "host_id"=>2,
 "dependency"=>{"uuid"=>"833ab05c-2df0-4548-a967-b02b82511c73"},
 "remote_user"=>"admin",
 "remote_cp_user"=>"admin",
 "current_timezone"=>"UTC",
 "current_user_id"=>1,
 "current_organization_id"=>nil,
 "current_location_id"=>nil}

Id: 8737c8be-250d-4b21-8df4-301e420fd6d2
Label: Actions::Katello::Host::Update
Duration: less than a minute
Raw input:
{"hostname"=>"test1.rhel8",
 "host"=>{"id"=>2, "name"=>"test1.rhel8"},
 "consumer_params"=>
  {"usage"=>"Development/Test",
   "role"=>"Red Hat Enterprise Linux Workstation",
   "addOns"=>[],
   "serviceLevel"=>"Self-Support"},
 "host_id"=>2,
 "dependency"=>{"uuid"=>"833ab05c-2df0-4548-a967-b02b82511c73"},
 "remote_user"=>"admin",
 "remote_cp_user"=>"admin",
 "current_timezone"=>"UTC",
 "current_user_id"=>1,
 "current_organization_id"=>nil,
 "current_location_id"=>nil}

Comment 2 jcallaha 2019-02-12 19:28:59 UTC

*** This bug has been marked as a duplicate of bug 1668251 ***