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 1702788

Summary: Syspurpose for RHEL8 Beta Tries to Create Conflicting Task
Product: Red Hat Satellite Reporter: Dustin Scott <dscott>
Component: Tasks PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Jan Hutaƙ <jhutar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: aruzicka, inecas
Target Milestone: Unspecified   
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-05-01 18:14:51 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 Dustin Scott 2019-04-24 18:49:35 UTC
PLEASE CORRECT COMPONENT IF IT IS WRONG

Description of problem:
When using the syspurpose info command, a task to update the host in Satellite is created, but it creates a conflicting task.


Version-Release number of selected component (if applicable):
[root@sat ~]# rpm -qa | grep satellite | sort -u
satellite-6.5.0-7.beta.el7sat.noarch
satellite-cli-6.5.0-7.beta.el7sat.noarch
satellite-common-6.5.0-7.beta.el7sat.noarch
satellite-installer-6.5.0.3-1.beta.el7sat.noarch
tfm-rubygem-foreman_theme_satellite-3.0.1.5-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. Register a RHEL8 System to Satellite
2. Run the syspurpose info command from the RHEL8 System
3.

Actual results:
Info is returned for the system, however a ForemanTasks error is returned.


Expected results:
Info is returned for the system without a ForemanTasks error


Additional info:


FROM THE SYSTEM
===============

- Notice the syspurpose is returned but a 500 Internal Server Error is produced with a foreman-tasks lock problem.

[root@rhel8-01 ~]# date; syspurpose show
Wed Apr 24 14:42:24 EDT 2019
{
  "service_level_agreement": "Self-Support"
}
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://sat.example.com/foreman_tasks/tasks/36ec2095-8395-47a8-968f-e58811b17698


FROM THE SATELLITE
==================

- The task was created and executed successfully.  Is this some sort of race condition?  Or duplication task creation?

[root@sat ~]# date
Wed Apr 24 14:42:32 EDT 2019
[root@sat ~]# hammer task info --id 36ec2095-8395-47a8-968f-e58811b17698
ID:          36ec2095-8395-47a8-968f-e58811b17698
Action:      Update for host rhel8-01.example.com 
State:       stopped
Result:      success
Started at:  2019/04/24 18:42:25
Ended at:    2019/04/24 18:42:26
Owner:       foreman_admin
Task errors:

Comment 3 Dustin Scott 2019-04-24 18:53:37 UTC
And for the syspurpose RPM version:

[root@rhel8-01 ~]# rpm -qa | grep syspu
python3-syspurpose-1.23.8-26.el8.x86_64

Comment 4 Brad Buckingham 2019-05-01 18:14:51 UTC

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