Bug 1246290

Summary: python-oslo-i18n-2.1.0-1.fc24 seems to break openstack command
Product: [Fedora] Fedora Reporter: Kevin Fenzi <kevin>
Component: python-oslo-i18nAssignee: Parag Nemade <pnemade>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: pnemade
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-11 06:54:43 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: 1247177    
Bug Blocks:    

Description Kevin Fenzi 2015-07-23 23:21:33 UTC
This may be a bug in python-openstackclient, but after upgrading to python-oslo-i18n-2.1.0-1.fc24, I get: 

% openstack security group list
Traceback (most recent call last):
  File "/usr/bin/openstack", line 6, in <module>
    from openstackclient.shell import main
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 28, in <module>
    from openstackclient.common import clientmanager
  File "/usr/lib/python2.7/site-packages/openstackclient/common/clientmanager.py", line 22, in <module>
    from keystoneclient import session
  File "/usr/lib/python2.7/site-packages/keystoneclient/__init__.py", line 33, in <module>
    from keystoneclient import access
  File "/usr/lib/python2.7/site-packages/keystoneclient/access.py", line 23, in <module>
    from keystoneclient import service_catalog
  File "/usr/lib/python2.7/site-packages/keystoneclient/service_catalog.py", line 23, in <module>
    from keystoneclient import exceptions
  File "/usr/lib/python2.7/site-packages/keystoneclient/exceptions.py", line 31, in <module>
    from keystoneclient.openstack.common.apiclient.exceptions import *  # noqa
  File "/usr/lib/python2.7/site-packages/keystoneclient/openstack/common/apiclient/exceptions.py", line 28, in <module>
    from keystoneclient.openstack.common._i18n import _
  File "/usr/lib/python2.7/site-packages/keystoneclient/openstack/common/_i18n.py", line 19, in <module>
    import oslo.i18n
ImportError: No module named i18n

Looks like something has changed in the importing and modules?

Comment 1 Parag Nemade 2015-07-24 10:51:24 UTC
we have not updated rawhide since version 1.5.0 and namespace has been changed after 1.7.0 released.

Looks like either all python openstack related client modules need to be fixed or they are already fixed but not imported in rawhide yet.

All should "import oslo_i18n" with new python-oslo-i18n package.

Looking more into this issue.

Comment 2 Parag Nemade 2015-07-24 13:39:47 UTC
I see that most python oslo modules are fixed in upstream but not built in rawhide yet. I am waiting for apevec to check if there is any issues pending otherwise I or someone from rdo team can build other packages in rawhide.

Till then you can downgrade to older version of python-oslo-i18n-1.5.0

Comment 3 Kevin Fenzi 2015-07-24 16:47:17 UTC
Thanks for the quick reply. :)

Comment 4 Parag Nemade 2015-07-26 04:17:44 UTC
I have updated python-keystoneclient and python-novaclient which makes openstack command run successfully now. Please check again if it works for you.

Comment 5 Kevin Fenzi 2015-07-26 15:44:11 UTC
I'm now getting a traceback in python-openstackclient: 

Traceback (most recent call last):
  File "/usr/bin/openstack", line 6, in <module>
    from openstackclient.shell import main
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 28, in <module>
    from openstackclient.common import clientmanager
  File "/usr/lib/python2.7/site-packages/openstackclient/common/clientmanager.py", line 25, in <module>
    from openstackclient.api import auth
  File "/usr/lib/python2.7/site-packages/openstackclient/api/auth.py", line 25, in <module>
    from openstackclient.i18n import _
  File "/usr/lib/python2.7/site-packages/openstackclient/i18n.py", line 16, in <module>
    from oslo import i18n
ImportError: cannot import name i18n

Comment 6 Parag Nemade 2015-07-27 14:02:57 UTC
It took me sometime to gather all the packaging changes and now I am in need of python-appdirs(bug 1219807) and python-os-client-config(bug 1247177) packages to be reviewed and imported in rawhide. 

Then I have also prepared new update for python-openstackclient-1.5.0 which will be built once both packages are in rawhide.

Comment 7 Parag Nemade 2015-08-11 06:54:43 UTC
This bug should have been fixed now with the import of python-os-client-config package.