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 1171602

Summary: subscription-manager status always exits 1
Product: Red Hat Enterprise Linux 7 Reporter: Stephen Benjamin <stbenjam>
Component: subscription-managerAssignee: Chris "Ceiu" Rog <crog>
Status: CLOSED DUPLICATE QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: crog, ovasik, wpoteat
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-16 14:56:50 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:
Bug Depends On:    
Bug Blocks: 1005618    

Description Stephen Benjamin 2014-12-08 08:27:01 UTC
This is an upstream release on CentOS 7 - not sure where to file this other than here..


[root@katello-centos7-bats bats]# rpm -q subscription-manager
subscription-manager-1.13.9-1.el7.centos.x86_64
[root@katello-centos7-bats bats]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

[root@katello-centos7-bats bats]# echo $?
1

This is a regression - it used to return the right exit code, and it's now holding back Katello from adding content tests.

Comment 2 Chris "Ceiu" Rog 2014-12-11 17:11:04 UTC
commit 13fe8ffd8f876d27079b961fb6675424e65b9a10
Author: Chris Rog <crog>
Date:   Mon Nov 24 09:19:18 2014 -0500

    1119688: Improved exit code usage
    
    - The EnvironmentCommand now returns the proper exit code when the
      server does not support environments.
    - When the server does not support environments, the command will
      no longer log that it successfully retrieved the environments
      from the server.
    - The StatusCommand now properly sets the exit code when the system
      status is current/valid.

Comment 4 William Poteat 2015-01-16 14:56:50 UTC
Fixed by other bug as per Comment 2

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