Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1083643

Summary: packstack failing on keystone.pp with "ImportError: cannot import name urllib"
Product: Red Hat OpenStack Reporter: Giulio Fidente <gfidente>
Component: openstack-keystoneAssignee: RHOS Maint <rhos-maint>
Status: CLOSED DUPLICATE QA Contact: Udi Kalifon <ukalifon>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.0CC: apevec, ayoung, yeylon
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: 2014-04-09 11:14:05 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:
Attachments:
Description Flags
keystone-startup.log
none
192.168.1.5_keystone.pp.log
none
192.168.1.5_keystone.pp none

Description Giulio Fidente 2014-04-02 15:50:42 UTC
Created attachment 881878 [details]
keystone-startup.log

Description of problem:
I seem to be facing intermittently the error in subject. Import of urllib from six.moves seems to fail.

Attached is the keystone-startup.log file as well as the packstack 192.168.1.5_keystone.pp.log file


Version-Release number of selected component (if applicable):
openstack-packstack-2013.2.1-0.28.dev989.el6ost.noarch
openstack-keystone-2013.2.2-1.el6ost.noarch

Comment 1 Giulio Fidente 2014-04-02 15:51:16 UTC
Created attachment 881879 [details]
192.168.1.5_keystone.pp.log

Comment 2 Giulio Fidente 2014-04-02 15:52:24 UTC
Created attachment 881881 [details]
192.168.1.5_keystone.pp

Comment 4 Adam Young 2014-04-02 16:45:42 UTC
The root cause is this error:

from six.moves import urllib
2014-04-02 11:39:29.688 5184 TRACE keystone ImportError: cannot import name urllib

Sixis the library that is used to to get python 2 code to work with python 3.  Is there a possibility that we are missing dependency that is causing this to sometimes not get installed?  Could it be an ordering issue on the times when the job passes successfully, where some other OpenStack service has imported that package already?

Comment 5 Giulio Fidente 2014-04-03 10:03:34 UTC
hi Adam, by checking the system manually it seems that both python-urllib3 and python-six are installed. 

Yet when I try to use "from six.moves import urllib" in a py2 interactive conole it fails with the same error. Are there other packages needed for that to work?

Comment 7 Giulio Fidente 2014-04-07 15:37:51 UTC
Further investigation with apevec reveals this being caused by an old version of python-six already installed:

python-six-1.1.0-2.1.el6.noarch

A newer version was available in the RHOS repo:

python-six-1.4.1-1.el6.noarch

This was not installed though, dependency check should probably be enforced with >=

Version of keystoneclient affected:

python-keystoneclient-0.6.0-1.el6ost.noarch

Comment 9 Giulio Fidente 2014-04-09 11:14:05 UTC
this was fixed by bz 1083755 with python-keystoneclient-0.7.1-2.el6ost.noarch

Comment 10 Giulio Fidente 2014-04-09 11:15:17 UTC

*** This bug has been marked as a duplicate of bug 1083755 ***