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

Bug 1135032

Summary: upgrade: after upgrade swift client is issuing a warning: Module backports was already imported from /usr/lib64/python2.6/site-packages/backports/__init__.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path import pkg_resources
Product: Red Hat OpenStack Reporter: Dafna Ron <dron>
Component: python-swiftclientAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED WONTFIX QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.0 (RHEL 6)CC: dcadzow, derekh, dron, jruzicka, scohen, sgotliv, tshefi, yeylon, zaitcev
Target Milestone: ---Keywords: FeatureBackport, ZStream
Target Release: 5.0 (RHEL 6)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-02 10:46:04 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
sort.txt
none
pythonOutput.txt none

Description Dafna Ron 2014-08-28 17:07:49 UTC
Description of problem:

after upgrade from RHOS 4.0 to RHOS 5.0 I was running swift simple commands and client issues the following warning on all commands: 

Module backports was already imported from /usr/lib64/python2.6/site-packages/backports/__init__.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path
  import pkg_resources

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

[root@gizmo ~(keystone_admin)]# rpm -qa |grep swift 
python-swiftclient-2.1.0-2.el6ost.noarch
openstack-swift-container-1.13.1-2.el6ost.noarch
openstack-swift-plugin-swift3-1.7-3.el6ost.noarch
openstack-swift-object-1.13.1-2.el6ost.noarch
openstack-swift-proxy-1.13.1-2.el6ost.noarch
openstack-swift-account-1.13.1-2.el6ost.noarch
openstack-swift-1.13.1-2.el6ost.noarch


How reproducible:

100%

Steps to Reproduce:
1. install openstack RHOS 4.0 GA from puddle: 2014-01-16.1
2. yum upgrade to RHOS 4.0 A4 2014-04-15.5
3. upgrade to RHOS 5.0 
4. run swift client commands

Actual results:

we are getting warning from the client: 

/usr/lib/python2.6/site-packages/swiftclient/version.py:15: UserWarning: Module backports was already imported from /usr/lib64/python2.6/site-packages/backports/__init__.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path
  import pkg_resources 

Expected results:

we should not be getting any warnings

Additional info:

[root@gizmo ~(keystone_admin)]# swift list
/usr/lib/python2.6/site-packages/swiftclient/version.py:15: UserWarning: Module backports was already imported from /usr/lib64/python2.6/site-packages/backports/__init__.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path
  import pkg_resources
dafna

[root@gizmo ~(keystone_admin)]# swift --help
/usr/lib/python2.6/site-packages/swiftclient/version.py:15: UserWarning: Module backports was already imported from /usr/lib64/python2.6/site-packages/backports/__init__.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path
  import pkg_resources

[root@gizmo ~(keystone_admin)]# swift upload dafna /root/packstack-answers-20140716-124004.txt
/usr/lib/python2.6/site-packages/swiftclient/version.py:15: UserWarning: Module backports was already imported from /usr/lib64/python2.6/site-packages/backports/__init__.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path
  import pkg_resources
root/packstack-answers-20140716-124004.txt
[root@gizmo ~(keystone_admin)]#

Comment 2 Pete Zaitcev 2014-09-08 20:49:57 UTC
Dafna, please run this:

0. rpm -qf /usr/lib64/python2.6/site-packages/backports/__init__.py

(The python-backports that I was able to find installs into /usr/lib.)

1. Run "rpm -qa| sort" and save the result, attach to the bug.

2.
 2a. curl -O http://people.redhat.com/zaitcev/tmp/xattr_load.py
 2b. run "python xattr_load.py" and save, attach result in same way.

Comment 4 Tzach Shefi 2014-09-29 07:21:07 UTC
I've got a system with this same problem. 
RHEL6.5 RHOS 4 AIO with packstack, service by service upgrade to RHOS 5. 
Same problem when issuing swift commands.

[root@cougar01 ~(keystone_admin)]# swift list --lh
/usr/lib/python2.6/site-packages/swiftclient/version.py:15: UserWarning: Module backports was already imported from /usr/lib64/python2.6/site-packages/backports/__init__.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path
  import pkg_resources
    0    0

Pete here are your answers:

[root@cougar01 ~(keystone_admin)]# rpm -qf /usr/lib64/python2.6/site-packages/backports/__init__.py
python-backports-1.0-3.el6.x86_64

"rpm -qa| sort" -> Attached sort.txt 

python xattr_load.py -> Attached pythonOutput.txt

Let me know if you need access or anything else.

Comment 5 Tzach Shefi 2014-09-29 07:21:29 UTC
Created attachment 942200 [details]
sort.txt

Comment 6 Tzach Shefi 2014-09-29 07:21:51 UTC
Created attachment 942201 [details]
pythonOutput.txt

Comment 7 Sergey Gotliv 2015-09-02 10:46:04 UTC
Not relevant anymore.