Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1789457

Summary: subscription-manager strips content from exception messages
Product: Red Hat Enterprise Linux 7 Reporter: Craig Donnelly <cdonnell>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: medium    
Version: 7.8CC: csnyder, jhnidek, pmoravec
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.24.40-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:22:47 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 Craig Donnelly 2020-01-09 15:38:27 UTC
Description of problem:
subscription-manager has had a previous update to display exception messages it receives in order to curb display of tracebacks to the end user.

Unfortunately, in some cases the message gets broken due to some character stripping.

This example from Satellite 6.6:

2020-01-08 17:07:33,302 [DEBUG] subscription-manager:20899:MainThread @connection.py:571 - Making request: PUT /rhsm/consumers/ebcefa53-6e2b-4529-a86a-ba20f1352412
2020-01-08 17:07:33,677 [DEBUG] subscription-manager:20899:MainThread @connection.py:618 - Response: status=500, request="PUT /rhsm/consumers/ebcefa53-6e2b-4529-a86a-ba20f1352412"
2020-01-08 17:07:33,677 [INFO] subscription-manager:20899:MainThread @connection.py:639 - {"displayMessage":"Required lock is already taken by other running tasks.\nPlease inspect their state, fix their errors and resume them.\n\nRequired lock: update\nConflicts with tasks:\n- https://cragsat66.usersys.redhat.com/foreman_tasks/tasks/d784c51f-237e-48af-abc5-4ea8c0732c9f","errors":["Required lock is already taken by other running tasks.\nPlease inspect their state, fix their errors and resume them.\n\nRequired lock: update\nConflicts with tasks:\n- https://cragsat66.usersys.redhat.com/foreman_tasks/tasks/d784c51f-237e-48af-abc5-4ea8c0732c9f"]}
2020-01-08 17:07:33,678 [DEBUG] subscription-manager:20899:MainThread @syspurposelib.py:204 - Syspurpose updated: Syspurpose Sync
        status: Failed to sync system purpose
        updates: 
        exceptions: 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://cragsat66.usersys.redhat.com/foreman_tasks/tasks/d784c51f 237e 48af abc5 4ea8c0732c9f



Version-Release number of selected component (if applicable):
subscription-manager-1.24.24-1.el7.x86_64

How reproducible: 100%


Steps to Reproduce:
1. Turn off foreman-tasks on Satellite 6
2. Try to auto-attach
3. Get broken up URL for satellite task

Actual results:
Missing '-' characters and oddly missing '('.

Expected results:
Full messages.

Additional info:

Comment 2 Pavel Moravec 2020-02-21 15:01:09 UTC
I bet I raised a BZ on the same topic as well (and it got commented, even), but I cant find it /o\ .

Comment 6 Craig Donnelly 2020-06-17 18:18:34 UTC
Verifying against Satellite 6.6.0 with subscription-manager-1.24.40-1.el7.x86_64:

[root@dhcp-13-226-246 rhsm]# rpm -q subscription-manager
subscription-manager-1.24.40-1.el7.x86_64

>> Killed foreman-tasks on the satellite to induce error:

[root@dhcp-13-226-246 rhsm]# subscription-manager register --force
Registering to: cragsat66.usersys.redhat.com:443/rhsm
Username: admin 
Password: 
The system has been registered with ID: e0ffa085-dcd5-409d-9f34-11ba46a8cdb3
The registered system name is: dhcp-13-226-246.ml17.lab.eng.rdu.redhat.com
[root@dhcp-13-226-246 rhsm]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@dhcp-13-226-246 rhsm]# subscription-manager remove --all
1 local certificate has been deleted.
1 subscription removed at the server.
[root@dhcp-13-226-246 rhsm]# subscription-manager attach --auto
Unable to sync syspurpose with server: 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://cragsat66.usersys.redhat.com/foreman_tasks/tasks/77c50e61-8aa4-43e5-ae19-ce1e04fb4f10

>>> Above error is shown in full with complete error code and a usable URL to see task in satellite, looks good.

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

>> VERIFIED.

Comment 8 errata-xmlrpc 2020-09-29 19:22:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (subscription-manager bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3866