neutron-openvswitch-agent-network pip Key Error

Bug #1757140 reported by Stamatis Katsaounis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-kubernetes
New
Undecided
Unassigned

Bug Description

Good evening,

When I am installing neutron chart through helm (helm install --debug kolla-kubernetes/helm/service/neutron --namespace kolla --name neutron --values ./cloud.yaml) I am facing the following error, based on neutron-openvswitch-agent pod:

Running command: 'neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini'
Guru meditation now registers SIGUSR1 and SIGUSR2 by default for backward compatibility. SIGUSR1 will no longer be registered in a future release, so please use SIGUSR2 to generate reports.
Traceback (most recent call last):
  File "/var/lib/kolla/venv/bin/neutron-openvswitch-agent", line 10, in <module>
    sys.exit(main())
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/neutron/cmd/eventlet/plugins/ovs_neutron_agent.py", line 20, in main
    agent_main.main()
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/main.py", line 45, in main
    mod = importutils.import_module(mod_name)
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module
    __import__(import_str)
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/main.py", line 18, in <module>
    from ryu.base import app_manager
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/ryu/base/app_manager.py", line 34, in <module>
    from ryu import utils
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/ryu/utils.py", line 23, in <module>
    from pip import req as pip_req
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/pip/__init__.py", line 45, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar # noqa
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/pip/vcs/mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/pip/download.py", line 40, in <module>
    from pip._vendor import requests, six
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py", line 98, in <module>
    from . import packages
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages.py", line 12, in <module>
    sys.modules['pip._vendor.requests.packages.' + mod] = sys.modules["pip._vendor." + mod]
KeyError: 'pip._vendor.urllib3.contrib'

I am using image kolla/ubuntu-source-neutron-openvswitch-agent:pike and basic neutron configuration, as https://docs.openstack.org/kolla-kubernetes/latest/deployment-guide.html suggests. Please notice that I downloaded the latest image, uploaded ~6hours ago.

kolla-kubernetes: latest master (commit 1f5c3b1bca7b7c3afe4fe1d09a15e5afc9607956)
kolla-ansible: stable/pike
ansible== (pip) 2.2.2.0
docker.io= (deb) 1.10.3-0ubuntu6
kubelet= (deb) 1.7.0-00
kubeadm= (deb) 1.7.0-00
kubectl= (deb) 1.7.0-00
kubernetes-cni= (deb) 0.5.1-00

After investigation, I found out that pip 9.0.2 inserts this code (https://github.com/pypa/pip/blob/9.0.2/pip/_vendor/requests/packages.py), which was released ~4 days ago.

Maybe something is broken with the latest update of pip from 9.0.1 to 9.0.2.

Any help will be deeply appreciated.

Revision history for this message
Stamatis Katsaounis (skatsaounis) wrote :

Update:
I proceeded with further investigation and found the root of the problem. You can find more information to the issue I opened to pip https://github.com/pypa/pip/issues/5099

Proposed solution:
Should the container be built with pip==9.0.1 explicitly?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.