RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1063474 - python-backports: /usr/lib/python2.6/site-packages/babel/__init__.py:33: 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
Summary: python-backports: /usr/lib/python2.6/site-packages/babel/__init__.py:33: Use...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: distribution
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Alan Pevec
QA Contact: Shai Revivo
URL:
Whiteboard:
Depends On: 1061051
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-10 19:52 UTC by wes hayutin
Modified: 2016-05-18 20:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-18 20:41:07 UTC
Embargoed:


Attachments (Terms of Use)
bzip2 tar of etc and var (7.07 MB, application/octet-stream)
2014-02-10 19:54 UTC, wes hayutin
no flags Details

Description wes hayutin 2014-02-10 19:52:27 UTC
Description of problem:

packstack fails to install:

 /usr/lib/python2.6/site-packages/babel/__init__.py:33: 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

using the following config:
2014-02-10 09:33:31::DEBUG::run_setup::543::root:: *** The following params were used as user input:
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: ssh-public-key: /root/.ssh/id_rsa.pub
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-mysql-install: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-glance-install: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-cinder-install: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-nova-install: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-neutron-install: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-horizon-install: n
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-swift-install: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-ceilometer-install: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-heat-install: n
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-client-install: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: ntp-servers: 
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: nagios-install: n
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: exclude-servers: 
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: mysql-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: mysql-user: root
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: mysql-pw: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: qpid-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: qpid-enable-ssl: false
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: qpid-enable-auth: n
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: qpid-nss-certdb-pw: 
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: qpid-ssl-port: 5671
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: qpid-ssl-cert-file: 
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: qpid-ssl-key-file: 
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: qpid-auth-user: guest
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: qpid-auth-password: guest
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: keystone-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: keystone-db-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: keystone-admin-token: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: keystone-admin-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: keystone-demo-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: keystone-token-format: PKI
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: glance-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: glance-db-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: glance-ks-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: cinder-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: cinder-db-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: cinder-ks-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: cinder-backend: lvm
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: cinder-volumes-create: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: cinder-volumes-size: 20G
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: novaapi-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: novacert-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: novavncproxy-hosts: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: novacompute-hosts: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: novaconductor-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: nova-db-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: nova-ks-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: novasched-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: novasched-cpu-allocation-ratio: 16.0
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: novasched-ram-allocation-ratio: 1.5
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-server-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-ks-password: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-db-password: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-l3-hosts: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-l3-ext-bridge: br-ex
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-dhcp-hosts: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-lbaas-hosts: 
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-l2-plugin: openvswitch
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-metadata-hosts: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-metadata-pw: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-ovs-tenant-network-type: local
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-ovs-vlan-ranges: 
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-ovs-bridge-mappings: []
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: neutron-ovs-bridge-interfaces: 
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: osclient-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-horizon-ssl: n
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-swift-proxy: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-swift-ks-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-swift-storage: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-swift-storage-zones: 1
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-swift-storage-replicas: 1
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-swift-storage-fstype: ext4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-swift-hash: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: os-swift-storage-size: 2G
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: provision-demo: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: provision-demo-floatrange: 172.24.4.224/28
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: provision-tempest: true
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: provision-tempest-repo-uri: https://github.com/openstack/tempest.git
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: provision-tempest-repo-revision: master
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: provision-all-in-one-ovs-bridge: true
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: ceilometer-host: 192.168.50.4
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: ceilometer-secret: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: ceilometer-ks-passwd: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: use-epel: y
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: additional-repo: 
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: rh-username: 
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: rh-password: ********
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: rh-beta-repo: n
2014-02-10 09:33:31::DEBUG::run_setup::548::root:: rhn-satellite-server: 

00:13:58.817 ERROR : Error appeared during Puppet run: 192.168.50.4_provision.pp
00:13:58.817 Error: Could not prefetch glance_image provider 'glance': Execution of '/usr/bin/glance -T services -I glance -K redhat -N http://192.168.50.4:35357/v2.0/ show ID' returned 1: /usr/lib/python2.6/site-packages/babel/__init__.py:33: 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
00:13:58.817 You will find full trace in log /var/tmp/packstack/20140210-143733-Izz10o/manifests/192.168.50.4_provision.pp.log
00:13:58.818 Please check log file /var/tmp/packstack/20140210-143733-Izz10o/openstack-setup.log for more information

will attach logs

Comment 1 wes hayutin 2014-02-10 19:54:48 UTC
Created attachment 861522 [details]
bzip2 tar of etc and var

find list of rpms in /var/log/rpm.list

Comment 2 Eric Harney 2014-02-10 20:13:02 UTC
The "Module already imported" message may be harmless.  The actual error seems to be a Glance failure but I'm not sure if this is due to Glance or a Packstack issue.

I can't find an error recorded in the packstack logs mentioned in the output above, so this should probably be looked at by the packstack experts.

Comment 3 Martin Magr 2014-02-12 09:46:12 UTC
This is being fixed on puppet-glance side currently.

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

Comment 4 Pádraig Brady 2014-02-12 09:57:10 UTC
Reopening this to track the awkward python-backports warning messages.

I fixed those up ages ago, albeit with a hacky python-backports-1.0-4.el6.x86_64.rpm rebuild to avoid the warning which was tripping up
other brittle puppet stuff noticed above in glance, but also in keystone.

Now this workaround in both the icehouse and havana el6 repos, and also there
hasn't been an update in epel to trump it either, nor would it anyway
with priorities in place. Also looking at the attached rpm.list above
shows that python-backports-1.0-4.el6.x86_64 is installed.

So I'm confused as to what's changed?

The error message is very specific though, and my modified package
should never emit it so it's worth double checking that the following
file is not present. Could someone on a problematic system please run:

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

If it reports python-backports, then please determine the source
of the rpm with `yum info python-backports` or whatever. thanks

Comment 5 Pádraig Brady 2014-02-12 10:18:55 UTC
BTW Endi, my workaround for this was just to remove the sitearch files from the package. Why do we need those again? Is there anything else we can do to fix this permanently?

Comment 6 wes hayutin 2014-02-12 16:18:50 UTC
If python-backports is installed on the box prior to rdo-release.  This will fail. Everything else looks OK.  Is it possible for a puppet manifest to ensure the package is updated to the latest?


[root@icehouse-neutron-rhel-productionrdopkg ~]# rpm -q python-backports
python-backports-1.0-3.el6.x86_64
[root@icehouse-neutron-rhel-productionrdopkg ~]# yumdownloader python-backports
Loaded plugins: priorities, product-id
116 packages excluded due to repository priority protections
python-backports-1.0-4.el6.x86_64.rpm                                                                                                                                                       | 4.8 kB     00:00     
[root@icehouse-neutron-rhel-productionrdopkg ~]# yum repolist
Loaded plugins: priorities, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
116 packages excluded due to repository priority protections
repo id                                                                                    repo name                                                                                                      status
epel                                                                                       Extra Packages for Enterprise Linux 6 - x86_64                                                                 10,401+70
foreman                                                                                    Foreman stable                                                                                                       215
foreman-plugins                                                                            Foreman stable - plugins                                                                                              42
openstack-icehouse                                                                         OpenStack Icehouse Repository                                                                                     303+91
puppetlabs-deps                                                                            Puppet Labs Dependencies El 6 - x86_64                                                                                56
puppetlabs-products                                                                        Puppet Labs Products El 6 - x86_64                                                                                   337
rhel-6-server-optional-rpms                                                                Extra Packages for Enterprise Linux 6 - x86_64                                                                   2,907+9
rhel-6-server-rpms                                                                         Extra Packages for Enterprise Linux 6 - x86_64                                                                         0
rhel-6-server-updates-rpms                                                                 Extra Packages for Enterprise Linux 6 - x86_64                                                                  3,737+37
repolist: 17,998
[root@icehouse-neutron-rhel-productionrdopkg ~]# cd /usr/lib/python2.6/site-packages/packstack/modules/
[root@icehouse-neutron-rhel-productionrdopkg modules]# egrep -rn python-backports *
[root@icehouse-neutron-rhel-productionrdopkg modules]# egrep -rn python-backport *
[root@icehouse-neutron-rhel-productionrdopkg modules]# pwd
/usr/lib/python2.6/site-packages/packstack/modules
[root@icehouse-neutron-rhel-productionrdopkg modules]# cd ..
[root@icehouse-neutron-rhel-productionrdopkg packstack]# ls
__init__.py  __init__.pyc  __init__.pyo  installer  modules  plugins  puppet  version.py  version.pyc  version.pyo
[root@icehouse-neutron-rhel-productionrdopkg packstack]# egrep -rn python-backports *
[root@icehouse-neutron-rhel-productionrdopkg packstack]# pwd
/usr/lib/python2.6/site-packages/packstack
[root@icehouse-neutron-rhel-productionrdopkg packstack]#

Comment 7 Endi Sukma Dewata 2014-02-14 16:41:29 UTC
Hi Pádraig, I'm going to remove the sitearch files in bug #1061051. I'm not sure why they were added in the first place.

Comment 8 Lars Kellogg-Stedman 2015-03-17 18:09:43 UTC
Pádraig:

It sounds as if this may have been resolved via the fixes for #1061051.  Do we need to keep this bz open?

Comment 9 Pádraig Brady 2015-03-27 17:02:56 UTC
Not resolved yet. bug #1061051 actually broke things and was reverted in bug #1113671

There has been movement though through https://github.com/peterjc/backports.lzma/pull/7

That broke the upstream 0.0.4 release though, so there is a further change required

All that is using namespaces though which seems a bit complicated/fragile?
Perhaps the solution here is to create a stub package that just includes the __init__.py and that would avoid needing to duplicate the module as is done currently.

This issue hits a few places 
https://www.google.ie/search?q=UserWarning:+Module+backports+was+already+imported+from&sitesearch=bugzilla.redhat.com

Comment 13 Ivan Chavero 2016-05-18 20:41:07 UTC
This problem is not appearing in the current version


Note You need to log in before you can comment on or make changes to this bug.