Bug 1650923

Summary: subscription-manager crashes in rhel8-beta/rhel:8.0-760
Product: Red Hat Enterprise Linux 8 Reporter: Eugene Ivantsov <yivantso>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WONTFIX QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: csnyder, jsefler, mkogan
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-10 15:26:15 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 Eugene Ivantsov 2018-11-17 16:25:02 UTC
Description of problem:


When invoking subscription manager command in an official Beta docker container, the following stacktrace is observed:

eugene@ivantsoft ~/projects/crew/codeready-workspaces-stacks-java (codeready-1.0-rhel-8) $ docker run -ti registry.access.redhat.com/rhel8-beta/rhel:8.0-760 bash
bash-4.4# subscription-manager --help
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.23.8', 'console_scripts', 'subscription-manager')()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 57, in <module>
    configure_i18n()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/i18n.py", line 51, in configure_i18n
    Locale.set(os.environ.get("LANG"))
  File "/usr/lib64/python3.6/site-packages/subscription_manager/i18n.py", line 147, in set
    lang = gettext.translation(APP, DIR, languages=[language])
  File "/usr/lib64/python3.6/gettext.py", line 510, in translation
    mofiles = find(domain, localedir, languages, all=True)
  File "/usr/lib64/python3.6/gettext.py", line 482, in find
    for nelang in _expand_lang(lang):
  File "/usr/lib64/python3.6/gettext.py", line 206, in _expand_lang
    loc = locale.normalize(loc)
  File "/usr/lib64/python3.6/locale.py", line 396, in normalize
    code = localename.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

Comment 1 Mark Kogan 2018-11-19 10:21:09 UTC
Mitigated by running inside the container:

echo -e "\nexport LC_ALL=C\nexport LANG=C\n" >> .bashrc
bash
subscription-manager register --auto-attach
. . .

Comment 3 Chris Snyder 2018-12-10 15:26:15 UTC
This bug has been fixed for RHEL 8, but will not be fixed in the beta container. Please use a newer container