Bug 1311580

Summary: codec error when calling subscription manager
Product: Red Hat Enterprise Linux 7 Reporter: Alessandro Silva <alsilva>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WORKSFORME QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: high    
Version: 7.2CC: alsilva, bcourt, miabbott, vrjain, wpoteat
Target Milestone: rcKeywords: StringChange, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-26 13:32:12 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:

Description Alessandro Silva 2016-02-24 14:02:01 UTC
Description of problem:

When run subscription-manager command to list pools, the following error is reported:

subscription-manager register
Registering to: subscription.rhn.redhat.com:443/subscription
Username: login
Password: *******
The system has been registered with ID: f5e0b607-162a-4b8b-bc90-f1c6f8790469 
-bash-4.2# subscription-manager list --available --all
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
'ascii' codec can't encode character u'\xe3' in position 8706: ordinal not in range(128)


Version-Release number of selected component (if applicable):

RHEL ATOMIC HOST 7.2


How reproducible:

1. # subscription-manager register
2. # subscription-manager list --available --all
3. # subscription-manager attach pool=pool


Actual results:

We're not able to list available pools, However to conclude the register we need to use "# subscription manager auto-attach"


Expected results:

A list of subscriptions pools


Additional info:

Why the subscription-manager list command returns RHEL 7.1 and "#atomic host" and "rpm-ostree" 7.2.2-1. Is this the expected behavior?


-bash-4.2# subscription-manager list 
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Atomic Host
Product ID:     271
Version:        7
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         04/24/13
Ends:           12/31/21

Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.1
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         04/24/13
Ends:           12/31/21

-bash-4.2# atomic host status
  TIMESTAMP (UTC)         VERSION     ID             OSNAME               REFSPEC                                                        
* 2016-02-18 15:34:28     7.2.2-1     04019d7e50     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     
-bash-4.2# rpm-ostree -p status
============================================================
  * DEFAULT ON BOOT
----------------------------------------
  version    7.2.2-1    
  timestamp  2016-02-18 15:34:28
  id         04019d7e50b22c19b717e657b58c0e33333eb92448fb99fe478c922d6e8bbe95.0
  osname     rhel-atomic-host
  refspec    rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
============================================================
-bash-4.2# atomic host status
  TIMESTAMP (UTC)         VERSION     ID             OSNAME               REFSPEC                                                        
* 2016-02-18 15:34:28     7.2.2-1     04019d7e50     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard

Comment 2 Micah Abbott 2016-02-24 15:10:14 UTC
I wasn't able to reproduce this using an employee subscription.  And I think this belongs to 'subscription-manager', so I changed the component.


-bash-4.2# atomic host status
  TIMESTAMP (UTC)         VERSION     ID             OSNAME               REFSPEC                                                        
* 2016-02-18 15:34:28     7.2.2-1     04019d7e50     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     
  2016-02-12 16:43:35     7.2.2       a903629278     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     

-bash-4.2# subscription-manager register --serverurl=subscription.rhn.redhat.com:443/subscription --baseurl=https://cdn.redhat.com --username=qa --password=******
Registering to: subscription.rhn.redhat.com:443/subscription
The system has been registered with ID: a78ab97e-c974-414a-b906-dc3e05cd0dbd 

-bash-4.2# subscription-manager list --available --all
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Employee SKU
Provides:            Oracle Java (for RHEL Server) - AUS
                     Oracle Java (for RHEL Client)
                     Red Hat Enterprise Linux 7 High Availability High Touch Beta
                     Red Hat Enterprise Linux High Availability (for IBM z Systems)
                     Red Hat Enterprise Linux 6 Server HTB
                     Red Hat EUCJP Support (for RHEL Server)
                     Red Hat Enterprise Linux for Power, little endian
                     Red Hat Enterprise Linux EUS Compute Node
                     Red Hat Enterprise Linux for Power, big endian - Extended Update Support
                     Red Hat OpenShift Enterprise JBoss EAP add-on
                     Oracle Java (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server) - AUS
....

Comment 3 Barnaby Court 2016-02-25 20:41:32 UTC
What version of the subscription-manager package is installed?

Comment 4 Alessandro Silva 2016-02-25 21:03:39 UTC
-bash-4.2# rpm -qa subscription-manager
subscription-manager-1.15.9-15.el7.x86_64

This package was provided by the latest RHEL Atomic Host

Comment 5 William Poteat 2016-04-26 18:20:55 UTC
A Byte Order Mark has made its way into the text of one of the pools. This is a data issue.

Comment 9 William Poteat 2016-07-26 13:32:12 UTC
After investigation, I can only conclude that the tester was using a non-ascii console. This SKU is used often and this would be a show stopper for many users.

The character in question is ã. That is by no means a bizarre item.

I am closing as worksforme.

If the issue can be reproduced on an ascii enabled console, please reopen.