Connecting to Manager

PicOS OVS supports connection to Manager. 

Command to set manager as below,

admin@PicOS-OVS$ovs-vsctl set-manager ptcp:6640:10.10.51.49
or
admin@PicOS-OVS$ovs-vsctl set-manager tcp:10.10.51.49:6640

 

Before PicOS 2.6.5, manager is not supported by default. If user wants to connect manager, ovsdb-server must be restarted.

Kill following ovsdb-server:
ovsdb-server /ovs/ovs-vswitchd.conf.db /ovs/inventory.conf.db --pidfile --remote=ptcp:6640:10.10.51.138 --remote=punix:/ovs/var/run/openvswitch/db.sock
 
Then run ovsdb-server with --remote=db:Open_vSwitch,Manager,target:
ovsdb-server /ovs/ovs-vswitchd.conf.db /ovs/inventory.conf.db --pidfile --remote=ptcp:6640:10.10.51.138 --remote=punix:/ovs/var/run/openvswitch/db.sock  --remote=db:Open_vSwitch,Manager,target

 

From PicOS 2.6.5, manager supported in ovsdb-server. Once user configures  “ovs-vsctl set-manager tcp:10.10.51.49:6640”, user can connect manager by remote.

root@PicOS-OVS$ps aux | grep ovsdb-server
root      9598  0.1  0.1   7256  2816 pts/0    S    18:00   0:00 ovsdb-server /ovs/ovs-vswitchd.conf.db /tmp/inventory.conf.db /ovs/function.conf.db --pidfile --remote=ptcp:6640:127.0.0.1 --remote=punix:/ovs/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Manager,target

 

Before PicOS 2.7.1, when using command “ovs-vsctl set-manager tcp:10.10.51.49:6640” to connect manager, the manager’s “is_connected” is false, such like:

root@PicOS-OVS$ovs-vsctl list manager
_uuid               : 3cd2a235-6921-4580-a093-a3dd96431cc4
connection_mode     : []
external_ids        : {}
inactivity_probe    : []
is_connected        : false
max_backoff         : []
other_config        : {}
status              : {}
target              : "tcp:10.10.51.49:6640"

The behavior depends on the “remote” configuration.

If the “remote” is “db: Open_vSwitch,Manager, target”, the manager status will not be refreshed.

root@PicOS-OVS$ps aux | grep ovsdb-server
root      9598  0.1  0.1   7256  2816 pts/0    S    18:00   0:00 ovsdb-server /ovs/ovs-vswitchd.conf.db /tmp/inventory.conf.db /ovs/function.conf.db --pidfile --remote=ptcp:6640:127.0.0.1 --remote=punix:/ovs/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Manager,target

If the “remote” is “db: Open_vSwitch, Open_vSwitch, manager_options”, the manager status will be displayed right.

We can change the boot argument:

ovsdb-server /ovs/ovs-vswitchd.conf.db /tmp/inventory.conf.db /ovs/function.conf.db --pidfile --remote=ptcp:6640:127.0.0.1 --remote=punix:/ovs/var/run/openvswitch/db.sock --remote= db:Open_vSwitch,Open_vSwitch,manager_options

Or we can use command to add this “remote”:

root@PicOS-OVS$ovs-appctl -t ovsdb-server ovsdb-server/add-remote db:Open_vSwitch,Open_vSwitch,manager_options
root@PicOS-OVS$ovs-vsctl list manager
_uuid               : 3cd2a235-6921-4580-a093-a3dd96431cc4
connection_mode     : []
external_ids        : {}
inactivity_probe    : []
is_connected        : true
max_backoff         : []
other_config        : {}
status              : {sec_since_connect="6", state=ACTIVE}
target              : "tcp:10.10.51.49:6640"

We can delete manager using command:

admin@PicOS-OVS$ovs-vsctl del-manager

From PicOS 2.7.1, user can list manager status correctly without re-configure ovsdb-server.

Copyright © 2024 Pica8 Inc. All Rights Reserved.