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 973938 - rct cat-cert throwing traceback when used option "q" to quit from the piped output
Summary: rct cat-cert throwing traceback when used option "q" to quit from the piped o...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.0
Assignee: Carter Kozak
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-06-13 07:21 UTC by Rehana
Modified: 2014-06-18 00:25 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:26:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rehana 2013-06-13 07:21:23 UTC
Description of problem:
I have observed traceback error when used "q" to quit from the piped output of rct cat-cert. This was observed on entitlement cert "Red Hat Employee Subscription" on rhn and on stage as well

Version-Release number of selected component (if applicable):
rpm -qa | grep subs
subscription-manager-gui-1.8.10-1.el5_9
subscription-manager-migration-1.8.10-1.el5_9
subscription-manager-firstboot-1.8.10-1.el5_9
subscription-manager-debuginfo-1.8.10-1.el5_9
subscription-manager-migration-data-1.11.3.1-1.el5
subscription-manager-1.8.10-1.el5_9


How reproducible:
3/3

Steps to Reproduce:
1.Reigster the client to rhn 
2.subscribe to "Red Hat Employee Subscription"
[root@localhost entitlement]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Employee Subscription
Provides:          Red Hat Enterprise Linux Workstation
                   Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                   Red Hat Enterprise Linux Server
                   Red Hat Enterprise Linux High Availability (for RHEL Server)
                   Red Hat Enterprise Linux Resilient Storage (for RHEL Server)
SKU:               SYS0395
Contract:          3229260
Account:           477931
Serial:            8891091091341932369
Pool ID:           8a85f9843affb61f013b19cbe1a95f11
Active:            True
Quantity Used:     1
Service Level:     None
Service Type:      None
Status Details:    
Starts:            09/27/2012
Ends:              09/27/2013

3.execute rct cat-cert 6167493450032926306.pem | more
4.now press the key "q" on the first output screen itself

Actual results:
[root@localhost entitlement]# rct cat-cert 8891091091341932369.pem | more

+-------------------------------------------+
	Entitlement Certificate
+-------------------------------------------+

Certificate:
	Path: 8891091091341932369.pem
	Version: 3.2
	Serial: 8891091091341932369
	Start Date: 2012-09-27 04:00:00+00:00
	End Date: 2013-09-27 03:59:59+00:00
	Pool ID: 8a85f9843affb61f013b19cbe1a95f11

Subject:
	CN: 8a85f9823f14fd96013f3c39642c7fc3

Issuer:
	C: US
	CN: Red Hat Candlepin Authority
	O: Red Hat, Inc.
	OU: Red Hat Network
	ST: North Carolina
	emailAddress: ca-support

Product:
	ID: 69
	Name: Red Hat Enterprise Linux Server
	Version: 
	Arch: x86_64,ia64,x86
	Tags: 

Product:
	ID: 71
	Name: Red Hat Enterprise Linux Workstation
	Version: 
	Arch: x86_64,x86
	Tags: 

Product:
	ID: 83
	Name: Red Hat Enterprise Linux High Availability (for RHEL Server)
	Version: 
	Arch: x86_64,ppc64,ia64,ppc,x86
	Tags: 

Product:
	ID: 85
	Name: Red Hat Enterprise Linux Load Balancer (for RHEL Server)
	Version: 
	Arch: x86_64,x86
	Tags: 

Traceback (most recent call last):
  File "/usr/bin/rct", line 44, in ?
    sys.exit(abs(main() or 0))
  File "/usr/bin/rct", line 39, in main
    return RctCLI().main()
  File "/usr/share/rhsm/subscription_manager/cli.py", line 166, in main
    return cmd.main()
  File "/usr/share/rhsm/rct/commands.py", line 39, in main
    return_code = self._do_command()
  File "/usr/share/rhsm/rct/cert_commands.py", line 76, in _do_command
    skip_products=self.options.no_products)
  File "/usr/share/rhsm/rct/printing.py", line 218, in printc
    printer.printc(cert)
  File "/usr/share/rhsm/rct/printing.py", line 114, in printc
    print self.cert_to_str(cert)
IOError: [Errno 32] Broken pipe

Expected results:
User should be able to quit without any traceback

Additional info:
tested with other subscriptions like ("Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)") ,didnt get any traceback  error.

Comment 2 Bryan Kearney 2013-06-17 20:35:10 UTC
fixed in 

commit 265c0ab38a8f3fd2bf6337e7110a1ef7c9974982
Author: Bryan Kearney <bkearney>
Date:   Fri Jun 14 13:09:06 2013 -0400

    973938: Flush std out and catch errors to work around the broken pipe from the more command

Comment 3 Rehana 2013-07-15 12:33:58 UTC
Verification failed,( tested against subscription.rhn.redhat.com and stage server)

[root@localhost pki]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

Product Name: Awesome OS for x86_64 Bits
Status:       Not Subscribed

[root@localhost entitlement]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Employee Subscription
Provides:          Red Hat Enterprise Linux Workstation
                   Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                   Red Hat Enterprise Linux Server
                   Red Hat Enterprise Linux High Availability (for RHEL Server)
                   Red Hat Enterprise Linux Resilient Storage (for RHEL Server)
SKU:               SYS0395
Contract:          3229260
Account:           477931
Serial:            5122295646439905477
Pool ID:           8a85f9843affb61f013b19cbe0d85efc
Active:            True
Quantity Used:     1
Service Level:     None
Service Type:      None
Status Details:    
Starts:            09/27/2012
Ends:              09/27/2013

[root@localhost pki]# cd entitlement/
[root@localhost entitlement]# ll
total 24
-rw------- 1 root root 1679 Jul 15 14:40 5122295646439905477-key.pem
-rw-r--r-- 1 root root 9139 Jul 15 14:40 5122295646439905477.pem

[root@localhost entitlement]# rct cc 5122295646439905477.pem | more
+-------------------------------------------+
	Entitlement Certificate
+-------------------------------------------+

Certificate:
	Path: 5122295646439905477.pem
	Version: 3.2
	Serial: 5122295646439905477
	Start Date: 2012-09-27 04:00:00+00:00
	End Date: 2013-09-27 03:59:59+00:00
	Pool ID: 8a85f9843affb61f013b19cbe0d85efc

Subject:
	CN: 8a85f9843fd48828013fe19a913f4afa

Issuer:
	C: US
	CN: Red Hat Candlepin Authority
	O: Red Hat, Inc.
	OU: Red Hat Network
	ST: North Carolina
	emailAddress: ca-support

Product:
	ID: 69
	Name: Red Hat Enterprise Linux Server
	Version: 
	Arch: x86_64,ia64,x86
	Tags: 

Product:
	ID: 71
	Name: Red Hat Enterprise Linux Workstation
Traceback (most recent call last):
  File "/usr/bin/rct", line 44, in ?
    sys.exit(abs(main() or 0))
  File "/usr/bin/rct", line 39, in main
    return RctCLI().main()
  File "/usr/share/rhsm/subscription_manager/cli.py", line 166, in main
    return cmd.main()
  File "/usr/share/rhsm/rct/commands.py", line 39, in main
    return_code = self._do_command()
  File "/usr/share/rhsm/rct/cert_commands.py", line 76, in _do_command
    skip_products=self.options.no_products)
  File "/usr/share/rhsm/rct/printing.py", line 218, in printc
    printer.printc(cert)
  File "/usr/share/rhsm/rct/printing.py", line 114, in printc
    print self.cert_to_str(cert)
IOError: [Errno 32] Broken pipe

[root@localhost entitlement]# rct sc 5122295646439905477.pem 
Type: Entitlement Certificate
Version: 3.2
DER size: 1802b
Subject Key ID size: 20b
Content sets: 181

[root@localhost entitlement]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.8.13-1.el5_9
python-rhsm: 1.8.13-1.el5_9

[root@localhost entitlement]# rpm -qa | grep subsc
subscription-manager-migration-data-1.11.3.1-1.git.1.78afd75.el5
subscription-manager-gui-1.8.13-1.el5_9
subscription-manager-firstboot-1.8.13-1.el5_9
subscription-manager-debuginfo-1.8.13-1.el5_9
subscription-manager-migration-1.8.13-1.el5_9
subscription-manager-1.8.13-1.el5_9

Comment 4 Bryan Kearney 2013-07-16 20:02:09 UTC
This is due to how python and more interact. I believ it is fixed for 6.x version. I can either move it to 6.5 to verify, or close/wontfix on 5. Preferences?

-- bk

Comment 5 Bryan Kearney 2013-07-18 20:28:20 UTC
This appears to be fixed in 6.5, so I am moving it there to ON_QA. DO not test on RHEL 5

Comment 8 Carter Kozak 2014-01-27 13:57:36 UTC
commit fbec05bcd472d7c652cdb996dad3480c9f44cd95
Author: ckozak <ckozak>
Date:   Wed Jan 22 13:22:58 2014 -0500

    973938: correctly handle SIGPIPE in rct

Comment 10 Rehana 2014-02-04 15:38:04 UTC
Retested on,

subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.10.13-1.el7
python-rhsm: 1.10.12-1.el7

Retested with subscription having huge content

[root@hp-ml350egen8-01 entitlement]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Employee Subscription
Provides:          JBoss Enterprise Web Platform
                   Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended Update Support
                   Kernel Derivative Works for HPC for Power Systems
                   Red Hat Storage Software Appliance
                   Red Hat Enterprise Linux Workstation
                   Red Hat Storage Management Console (for RHEL Server)
                   Red Hat Enterprise Linux for IBM POWER - Extended Update Support
                   Red Hat Software Collections (for RHEL Client)
                   Red Hat Developer Toolset (for RHEL Client)
                   Red Hat Enterprise Linux High Performance Networking (for RHEL for IBM POWER) - Extended Update Support
                   Red Hat Beta
                   Red Hat OpenShift Enterprise Infrastructure Beta
                   Red Hat Enterprise Identity Replication
                   Red Hat Enterprise Linux 7 Workstation High Touch Beta
                   Red Hat OpenStack
                   Red Hat Software Collections Beta (for RHEL Client)
                   Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                   Red Hat S-JIS Support (for RHEL Server)
                   Red Hat Developer Toolset (for RHEL for IBM POWER)
                   Red Hat Enterprise Virtualization
                   Red Hat Enterprise Linux 7 Public Beta
                   Red Hat Hardware Certification Test Suite
                   Red Hat Enterprise Linux High Performance Networking (for RHEL Compute Node)
                   Red Hat Enterprise Linux 7 for HPC Compute Node High Touch Beta
                   JBoss Enterprise Application Platform
                   Red Hat Enterprise Linux Server - Extended Update Support
                   Red Hat Developer Toolset (for RHEL HPC Node)
                   Red Hat Enterprise Linux Server
                   Red Hat Enterprise Linux for IBM POWER
                   Red Hat Enterprise Linux EUS Compute Node
                   Red Hat Enterprise Linux High Performance Networking (for RHEL for IBM POWER)
                   Red Hat Software Collections (for RHEL Workstation)
                   Red Hat Enterprise Linux 7 Server High Touch Beta
                   Red Hat OpenShift Enterprise Application Node Beta
                   Red Hat Enterprise Linux High Availability (for RHEL Server) - Extended Update Support
                   Red Hat Enterprise Linux Server HTB
                   Red Hat Enterprise Linux Scalable File System (for RHEL Workstation)
                   JBoss Enterprise Application Platform - ELS
                   Red Hat Software Collections Beta (for RHEL Workstation)
                   Red Hat Developer Toolset (for RHEL for IBM POWER) - Extended Update Support
                   Red Hat Enterprise Linux 7 for IBM POWER Public Beta
                   Red Hat Enterprise Linux 7 for IBM POWER High Touch Beta
                   Red Hat Enterprise Linux 7 for IBM System z Public Beta
                   Red Hat Developer Toolset (for RHEL Server EUS)
                   Red Hat Enterprise Linux EUS Compute Node High Performance Networking
                   Red Hat Enterprise Linux Desktop
                   Red Hat Storage Server for On-premise
                   Red Hat Enterprise Linux for IBM System z - Extended Update Support
                   Red Hat EUCJP Support (for RHEL Server) - Extended Update Support
                   Red Hat Directory Server
                   MRG Realtime
                   Red Hat Enterprise Linux Resilient Storage (for RHEL Server)
                   Red Hat Developer Toolset (for RHEL Server)
                   Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support
                   Red Hat OpenShift Enterprise Infrastructure
                   Red Hat Software Test Suite 5 (for RHEL Server)
                   Red Hat Enterprise Linux High Availability (for RHEL Server)
                   Red Hat OpenShift Enterprise Client Tools Beta
                   Red Hat OpenShift Enterprise Client Tools
                   Red Hat Enterprise Linux EUS Compute Node Scalable File System
                   Red Hat Enterprise Linux 7 for IBM System z High Touch Beta
                   JBoss Enterprise Web Server
                   Red Hat Developer Toolset (for RHEL Workstation)
                   Red Hat Enterprise Linux for SAP
                   Red Hat Enterprise Linux for IBM System z
                   Red Hat EUCJP Support (for RHEL Server)
                   Red Hat Storage
                   Red Hat Enterprise Linux 7 Desktop High Touch Beta
                   Red Hat Enterprise Linux Resilient Storage (for RHEL Server) - Extended Update Support
                   Red Hat Software Collections (for RHEL Server)
                   Red Hat Enterprise Linux 7 High Availability High Touch Beta
                   Red Hat OpenShift Enterprise Application Node
                   Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support
                   Red Hat Enterprise Linux Scalable File System (for RHEL Server)
                   Red Hat Software Collections Beta (for RHEL Server)
                   Red Hat Enterprise Linux Scalable File System (for RHEL Compute Node)
                   Red Hat Enterprise Linux Workstation HTB
                   Red Hat Enterprise Linux for Scientific Computing
                   Red Hat S-JIS Support (for RHEL Server) - Extended Update Support
                   Red Hat Enterprise Linux High Performance Networking (for RHEL Server)
                   Kernel Derivative Works for Bluegene/Q
                   Red Hat OpenShift Enterprise JBoss EAP add-on Beta
SKU:               ES0113909
Contract:          10169793
Account:           477931
Serial:            8453633493143393151
Pool ID:           8a85f9823e3d5e43013e3ddd4e2a0977
Active:            True
Quantity Used:     1
Service Level:     SELF-SUPPORT
Service Type:      L1-L3
Status Details:    
Subscription Type: Standard
Starts:            04/24/2013
Ends:              12/31/2021
System Type:       Physical

[root@hp-ml350egen8-01 entitlement]# rct cc 8453633493143393151.pem | more

+-------------------------------------------+
	Entitlement Certificate
+-------------------------------------------+

Certificate:
	Path: 8453633493143393151.pem
	Version: 3.2
	Serial: 8453633493143393151
	Start Date: 2013-04-24 04:00:00+00:00
	End Date: 2022-01-01 04:59:59+00:00
	Pool ID: 8a85f9823e3d5e43013e3ddd4e2a0977

Subject:
	CN: 8a99f98443ea13940143fd7575d65d72

Issuer:
	C: US
	CN: Red Hat Candlepin Authority
	O: Red Hat, Inc.
	OU: Red Hat Network
	ST: North Carolina
	emailAddress: ca-support

Product:
	ID: 126
	Name: Red Hat S-JIS Support (for RHEL Server)
	Version: 
	Arch: x86_64
	Tags: 
	Brand Type: 

Product:
	ID: 127
[root@hp-ml350egen8-01 entitlement]# rct sc 8453633493143393151.pem
Type: Entitlement Certificate
Version: 3.2
DER size: 2822b
Subject Key ID size: 20b
Content sets: 841

Moving this bug to Verified

Comment 11 Ludek Smid 2014-06-13 11:26:18 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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