Magnum - No module named kubernetes

Bug #1710621 reported by Bruno Grazioli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Invalid
Undecided
Unassigned

Bug Description

Hi,

I deployed Openstack with kolla-ansible and in one of our checks we noticed that magnum is unable to create a cluster.

The error we get in magnum-api.log in fluentd is:

"""
File "/usr/lib/python2.7/site-packages/magnum/conductor/k8s_api.py", line 17, in <module>
  from kubernetes import client as k8s_config

ImportError: No module named kubernetes
"""

It seems that the modules kubernetes is not present in this container. We tried adding it manually but it seems to bring more dependency issues (kubernetes requires certifi).

We used kolla-ansible in the stable/ocata release version. I would like also to take this chance and ask if there is a way to install these modules directly in the containers - pip fails asking for sudo privilege.

Revision history for this message
Eduardo Gonzalez (egonzalez90) wrote :

Hi,

this bug was an issue in magnum code requirements. Was fixed in magnum upstream early ocata, kolla images 4.0.0 does not have the bug fix but 4.0.1 and later have kubernetes package.

A workaround to install packages in containers (Not recommended as may change other requirements/dependencies and containers are not meant to do this) is:

``docker exec -ti -u root <container_name> pip install <package>``

Marking this bug as invalid.
Regards

Changed in kolla-ansible:
status: New → Invalid
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.