where you have installed and started Open vSwitch, you will need to start some
central components.
-Begin by making ovsdb-server listen on a TCP port by running:
-
-```
-ovs-appctl -t ovsdb-server ovsdb-server/add-remote ptcp:6640
-```
-
Start ovn-northd daemon. This daemon translates networking intent from Docker
stored in the OVN_Northbound database to logical flows in OVN_Southbound
database.
kernel by doing a "lsmod | grep $ENCAP_TYPE".)
```
-ovs-vsctl set Open_vSwitch . external_ids:ovn-remote="tcp:$CENTRAL_IP:6640" \
- external_ids:ovn-encap-ip=$LOCAL_IP external_ids:ovn-encap-type="$ENCAP_TYPE"
+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"
```
And finally, start the ovn-controller. (You need to run the below command
vlog = ovs.vlog.Vlog("ovn-docker-overlay-driver")
OVN_BRIDGE = "br-int"
-OVN_REMOTE = ""
+OVN_NB = ""
PLUGIN_DIR = "/etc/docker/plugins"
PLUGIN_FILE = "/etc/docker/plugins/openvswitch.spec"
def ovn_nbctl(*args):
args_list = list(args)
- database_option = "%s=%s" % ("--db", OVN_REMOTE)
+ database_option = "%s=%s" % ("--db", OVN_NB)
args_list.insert(0, database_option)
return call_prog("ovn-nbctl", args_list)
"external_ids:bridge-id=" + OVN_BRIDGE,
"other-config:disable-in-band=true", "fail-mode=secure")
- global OVN_REMOTE
- OVN_REMOTE = ovs_vsctl("get", "Open_vSwitch", ".",
- "external_ids:ovn-remote").strip('"')
- if not OVN_REMOTE:
+ global OVN_NB
+ OVN_NB = ovs_vsctl("get", "Open_vSwitch", ".",
+ "external_ids:ovn-nb").strip('"')
+ if not OVN_NB:
sys.exit("OVN central database's ip address not set")
ovs_vsctl("set", "open_vswitch", ".",