ImportError: cannot import name <package> in pods while restarting pod fixes

4/1/2017

Note that this is not specific to below import as I have observed for different pods. Pod throws import error although the package is shown successfully installed with required version. If if delete and recreate the pod, the error goes away. This has happened with couple of pods with different packages and goes away on restarting the pod. Any pointers why we may see this issue?

Example: Although netmiko package was successfully installed, I saw below import error.

from netmiko import ConnectHandler
File "/opt/aruba/central/apps/configuration/ENV/local/lib/python2.7/site-packages/netmiko/__init__.py", line 1, in <module>
from netmiko.ssh_dispatcher import ConnectHandler
File "/opt/aruba/central/apps/configuration/ENV/local/lib/python2.7/site-packages/netmiko/ssh_dispatcher.py", line 21, in <module>
from netmiko.ovs import OvsLinuxSSH
ImportError: cannot import name OvsLinuxSSH
-- Kiran Hodlur
containers
docker
kubernetes
python

0 Answers