Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies should specify required package versions #131

Closed
geo-turcsanyi opened this issue Jul 19, 2017 · 3 comments
Closed

Dependencies should specify required package versions #131

geo-turcsanyi opened this issue Jul 19, 2017 · 3 comments

Comments

@geo-turcsanyi
Copy link

Environment:
Centos7
Python 2.7, pip 8.1.2

Action:
Trying to create the following pod: https://github.com/Boostport/kubernetes-vault/blob/master/deployments/quick-start/vault.yaml

Kubectl gives a plain "FailedSync Error syncing pod", kubelet is more specific though.

Traceback (most recent call last):
File "/opt/cni/bin/ovn_cni", line 28, in
from ovn_k8s.common import kubernetes
File "/usr/lib/python2.7/site-packages/ovn_k8s/common/kubernetes.py", line 16, in
import requests
File "/usr/lib/python2.7/site-packages/requests/init.py", line 58, in
from . import utils
File "/usr/lib/python2.7/site-packages/requests/utils.py", line 32, in
from .exceptions import InvalidURL
File "/usr/lib/python2.7/site-packages/requests/exceptions.py", line 10, in
from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
File "/usr/lib/python2.7/site-packages/requests/packages/init.py", line 95, in load_module
raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'requests.packages.urllib3'
E0719 15:49:56.378117 12558 cni.go:312] Error deleting network: netplugin failed but error parsing its diagnostic message "": unexpected end of JSON input

A simple yum install -y python-requests will solve this, but it is quite annoying to see and look into the root cause and the ovn specific logs do not give any info on the root cause.

@shettyg
Copy link
Collaborator

shettyg commented Jul 19, 2017

@geo-turcsanyi

The file here has the "requests" as a requirement.
https://github.com/openvswitch/ovn-kubernetes/blob/master/requirements.txt#L3

"pip install ." should have installed requests. The question is why it did not in your case. Or if it did, may be it installed a version that does not have the urllib3.

Now CNI plugin of OVN itself is tied to kubelet as that is the only one that calls it (it is not a daemon for OVN to log). Any error is returned back to kubelet. So it is fair that the error message is seen in kubelet.

@geo-turcsanyi
Copy link
Author

@shettyg Thanks for the quick overview on how the components work, it makes a bit more sense now.

In regards to the dependencies, it did install requests, only an earlier version, and yes, it did seem the case where it didn't have urllib3. And a correction, not yum install -y python-requests fixed this, but pip install requests --upgrade.

@shettyg
Copy link
Collaborator

shettyg commented Jul 20, 2017

Frankly, I don't understand pip enough to point out why it did not install the latest "requests" package. One possibility is that your pip itself was a older version which had a bug wherein it installs local copies instead of grabbing things from the internet.

@shettyg shettyg closed this as completed Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants