Bug 1484265

Summary: After updating to latest subscription manager, abrt dumps seen for servers with "System Locale: LANG=ja_JP.UTF-8" [rhel-7.4.z]
Product: Red Hat Enterprise Linux 7 Reporter: Oneata Mircea Teodor <toneata>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: cshereme, hmatsumo, igkioka, jstavel, khowell, mshimura, myamazak, redakkan, rjerrido, sjayapra, skallesh, toneata, yozone
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: subscription-manager-1.19.22-1 Doc Type: Bug Fix
Doc Text:
Previously, when the system locale was set to a non-ASCII translation, the rhsmcertd daemon worker failed due to errors in logs. This update provides rhsmcertd support for non-ASCII locales, and the described problem no longer occurs.
Story Points: ---
Clone Of: 1480395 Environment:
Last Closed: 2017-10-19 14:59:30 UTC Type: ---
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: 1480395    
Bug Blocks:    

Description Oneata Mircea Teodor 2017-08-23 07:21:03 UTC
This bug has been copied from bug #1480395 and has been proposed to be backported to 7.4 z-stream (EUS).

Comment 3 John Sefler 2017-09-01 18:13:33 UTC
Demonstrating the failure against all supported LANGs on version...

[root@jsefler-rhel7 ~]# rpm -qf /usr/libexec/rhsmcertd-worker
subscription-manager-1.19.21-1.el7.x86_64

[root@jsefler-rhel7 ~]# for L in en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR pt_BR ru_RU zh_CN zh_TW; do echo ""; echo "# LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker | head -1"; LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker | head -1; done;

# LANG=en_US.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Updating entitlement certificates & repositories

# LANG=de_DE.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 467, in format
    s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 12818: ordinal not in range(128)
Logged from file repolib.py, line 328
Berechtigungszertifikate & Repositorys aktualisieren

# LANG=es_ES.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 467, in format
    s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 12816: ordinal not in range(128)
Logged from file repolib.py, line 328
Actualizando certificados de derechos y repositorios

# LANG=fr_FR.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Traceback (most recent call last):
  File "/usr/libexec/rhsmcertd-worker", line 140, in <module>
    print _('Unable to update entitlement certificates and repositories')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 5: ordinal not in range(128)

# LANG=it_IT.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Aggiornamento certificati per l'entitlement & repositori in corso

# LANG=ja_JP.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Traceback (most recent call last):
  File "/usr/libexec/rhsmcertd-worker", line 140, in <module>
    print _('Unable to update entitlement certificates and repositories')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-26: ordinal not in range(128)

# LANG=ko_KR.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Traceback (most recent call last):
  File "/usr/libexec/rhsmcertd-worker", line 140, in <module>
    print _('Unable to update entitlement certificates and repositories')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)

# LANG=pt_BR.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Traceback (most recent call last):
  File "/usr/libexec/rhsmcertd-worker", line 140, in <module>
    print _('Unable to update entitlement certificates and repositories')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 46: ordinal not in range(128)

# LANG=ru_RU.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Traceback (most recent call last):
  File "/usr/libexec/rhsmcertd-worker", line 140, in <module>
    print _('Unable to update entitlement certificates and repositories')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

# LANG=zh_CN.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Traceback (most recent call last):
  File "/usr/libexec/rhsmcertd-worker", line 140, in <module>
    print _('Unable to update entitlement certificates and repositories')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-11: ordinal not in range(128)

# LANG=zh_TW.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Traceback (most recent call last):
  File "/usr/libexec/rhsmcertd-worker", line 140, in <module>
    print _('Unable to update entitlement certificates and repositories')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-11: ordinal not in range(128)
You have new mail in /var/spool/mail/root
[root@jsefler-rhel7 ~]#

Comment 4 John Sefler 2017-09-01 18:18:09 UTC
Demonstrating the fix against all supported LANGs on version...

[root@jsefler-rhel7 ~]# rpm -qf /usr/libexec/rhsmcertd-worker
subscription-manager-1.19.23-1.el7_4.x86_64

[root@jsefler-rhel7 ~]# for L in en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR pt_BR ru_RU zh_CN zh_TW; do echo ""; echo "# LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker | head -1"; LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker | head -1; done;

# LANG=en_US.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Updating entitlement certificates & repositories

# LANG=de_DE.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Berechtigungszertifikate & Repositorys aktualisieren

# LANG=es_ES.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Actualizando certificados de derechos y repositorios

# LANG=fr_FR.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Mise à jour des certificats de droits d'accès et des référentiels

# LANG=it_IT.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Aggiornamento certificati per l'entitlement & repositori in corso

# LANG=ja_JP.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
エンタイトルメント証明書とリポジトリーを更新中

# LANG=ko_KR.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
인타이틀먼트 인증서 & 리포지터리 업데이트하기

# LANG=pt_BR.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Atualizando certificados & repositórios de direitos à serviços

# LANG=ru_RU.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
Обновление сертификатов и репозиториев...

# LANG=zh_CN.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
更新授权证书和存储库

# LANG=zh_TW.UTF-8 /usr/libexec/rhsmcertd-worker | head -1
更新權利憑證與軟體庫
[root@jsefler-rhel7 ~]# 


VERIFIED: /usr/libexec/rhsmcertd-worker no longer throws a UnicodeEncodeError when executed in the supported LANGs.

Comment 6 errata-xmlrpc 2017-10-19 14:59:30 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, 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-2017:2920