Comments (13)
As asked in the instructions, did you run:
ovs-vsctl set Open_vSwitch . external_ids:ovn-remote="tcp:$CENTRAL_IP:6642" \
external_ids:ovn-nb="tcp:$CENTRAL_IP:6641" \
external_ids:ovn-encap-ip=$LOCAL_IP \
external_ids:ovn-encap-type="$ENCAP_TYPE"
If so, what does the following command give you:
ovs-vsctl get open_vswitch . external-ids:ovn-nb
from ovn-kubernetes.
@shettyg
Thanks for the reply
Yes, I have run the command you mentioned.
For this command :
ovs-vsctl get open_vswitch . external-ids:ovn-nb
the output is :
"tcp:35.185.55.145:6641"
from ovn-kubernetes.
What is the platform? i.e Ubuntu 14.04 etc.
What is the Python version? I suppose this not a problem with "sudo"?
from ovn-kubernetes.
Platform is Ubuntu 16.04
I have not installed anything over the system python (i.e. 2.7)
I am running the above command with "sudo", since if I don't, it gives Permission Denied error. Could that be the issue?
from ovn-kubernetes.
Looks like python3 is being invoked instead of python2.7
Put this code in a file and run it in both python2.7 and python3 and run it with sudo
e.g: sudo python3 1.py
sudo python2.7 1.py
import subprocess
def call_popen(cmd):
child = subprocess.Popen(cmd, stdout=subprocess.PIPE)
output = child.communicate()
if child.returncode:
raise RuntimeError("Fatal error executing %s" % (cmd))
if len(output) == 0 or output[0] is None:
output = ""
else:
output = output[0].strip()
return output
def call_prog(prog, args_list):
cmd = [prog, "--timeout=5", "-vconsole:off"] + args_list
return call_popen(cmd)
def ovs_vsctl(*args):
return call_prog("ovs-vsctl", list(args))
def fetch_ovn_nb():
OVN_NB = ovs_vsctl("--if-exists", "get", "Open_vSwitch", ".",
"external_ids:ovn-nb").strip('"')
print(OVN_NB)
fetch_ovn_nb()
from ovn-kubernetes.
@shettyg
I executed the above with both python2.7 and python3 with sudo as you asked.
You were right, python3 is being invoked, and its giving errors when I run the above code with python3. With python2.7 instead, its prints out the ovn-nb info.
What should I do to fix this? Also, a bit confused as to how python3 is being invoked
from ovn-kubernetes.
What does the following say?
/usr/bin/python --version
from ovn-kubernetes.
output :
Python 2.7.12
from ovn-kubernetes.
@shettyg
So i noticed something off, in the original code, the scripts such as ovn-k8s-overlay have shebang line
#!/usr/bin/python
but after installing (i.e after running pip install .
), the file /usr/bin/ovn-k8s-overlay has
#!/usr/bin/python3
Don't know why that is happening though
from ovn-kubernetes.
@AakashKT
Thanks for tracking it down. Does 'pip2 install .' solve the problem? (After doing a pip uinstall ovn-kubernetes)
from ovn-kubernetes.
@shettyg
Thanks for the help, that did solve the problem. I guess this was not an issue after all?
Again, thank you :-)
from ovn-kubernetes.
I will spend some time to get it to work for python3 too.
from ovn-kubernetes.
Oh okay, that would be great.
from ovn-kubernetes.
Related Issues (20)
- Cleanup DNS name resolver docs HOT 3
- Add proper docs for observability, grafana dashboards, metrics HOT 2
- Fix the PR labeler action
- FLAKE: External Gateway With Admin Policy Based External Route CRs e2e multiple external gateway validation Should validate ICMP connectivity to multiple external gateways for an ECMP scenario IPV4 HOT 4
- Flake: should work on secondary node interfaces for ETP=local and ETP=cluster when backend pods are also served by EgressIP HOT 2
- ovn-kube-f and ovn-kube-u image renaming was incomplete HOT 1
- Support EgressIP for user defined networks
- Flake: [FAIL] External Gateway With Admin Policy Based External Route CRs e2e non-vxlan external gateway through a gateway pod Should validate ICMP connectivity to an external gateway's loopback address via a gateway pod [It] ipv4 HOT 9
- [FAIL] e2e egress firewall policy validation with external containers [It] Should validate the egress firewall policy functionality for allowed IP HOT 9
- Upgrades tests operation cancelled
- e2e EgressQoS validation -- account for single stack cluster
- Transit switch subnet overlap check is missing HOT 1
- UDN, non-IC: network isolation e2e tests fail on non-IC deployments HOT 1
- kind helm no longer works when deployed with NAD listener HOT 2
- ovn-kubernetes in a vm-s with undrecloud scenario HOT 5
- Node IP Handler event tests panics HOT 1
- [Race] Delete SNAT per pod on gateway route
- Routes created by hybrid-overlay in Windows are incompatible with AWS EC2LaunchV2 agent
- DATA RACE during egress firewall unit tests with config.PrepareTestConfig() HOT 3
- DATA RACE while running network attach def controller tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ovn-kubernetes.