ovs自定义启动

用户可以根据自己的需求,使用特定选项分别启动/停止守护进程。

场景一:仅启动ovsdb守护进程,不启动ovs-vswitchd守护进程
$ ovs-ctl --no-ovs-vswitchd start

场景二:仅启动ovs-vswitchd守护进程,不启动ovsdb守护进程
$ ovs-ctl --no-ovsdb-server start

场景三:配置本机OVS使用的ovsdb-server数据库文件,手动启动所有守护进程。
$ mkdir -p /usr/local/etc/openvswitch

$ ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema

$ mkdir -p /usr/local/var/run/openvswitch

$ ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \

--remote=db:Open_vSwitch,Open_vSwitch,manager_options \

--private-key=db:Open_vSwitch,SSL,private_key \

--certificate=db:Open_vSwitch,SSL,certificate \

--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \

--pidfile --detach --log-file

$ ovs-vsctl --no-wait init

$ ovs-vswitchd --pidfile --detach --log-file

 

[root@kunpeng82 ~]# ps -elf | grep ovsdb
1 S root      6448     1  0  70 -10 -   270 do_wai 08:48 ?        00:00:00 ovsdb-server: monitoring pid 6449 (healthy)
1 S root      6449  6448  0  70 -10 -   275 do_sys 08:48 ?        00:00:00 ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/var/run/openvswitch/db.sock --private-key=db:Open_vSwitch,SSL,private_key --certificate=db:Open_vSwitch,SSL,certificate --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --no-chdir --log-file=/var/log/openvswitch/ovsdb-server.log --pidfile=/var/run/openvswitch/ovsdb-server.pid --detach --monitor
0 S root      6716  5082  0  80   0 -  1730 pipe_w 09:33 pts/1    00:00:00 grep --color=auto ovsdb
[root@kunpeng82 ~]# kill -9 6449
[root@kunpeng82 ~]# ps -elf | grep ovsdb
0 S root      6720  5082  0  80   0 -  1729 pipe_w 09:33 pts/1    00:00:00 grep --color=auto ovsdb
[root@kunpeng82 ~]# ps -elf | grep ovsdb
0 S root      6724  5082  0  80   0 -  1729 pipe_w 09:33 pts/1    00:00:00 grep --color=auto ovsdb
[root@kunpeng82 ~]# ps -elf | grep ovsdb

 

posted on 2020-07-02 17:29  tycoon3  阅读(841)  评论(0编辑  收藏  举报

导航