Magnum - No module named kubernetes
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/
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.
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