Skip to content

Commit

Permalink
rhel: start ovn-controller-vtep with ovn-ctl
Browse files Browse the repository at this point in the history
Use ovn-ctl to start ovn-controller-vtep from the corresponding systemd
unit file.

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
jcaamano authored and blp committed Jun 10, 2019
1 parent ea8519f commit dd9b0ed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
10 changes: 9 additions & 1 deletion ovn/utilities/ovn-ctl
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ start_controller () {
}

start_controller_vtep () {
set ovn-controller-vtep "unix:$DB_SOCK"
set ovn-controller-vtep
set "$@" -vconsole:emer -vsyslog:err -vfile:info
if test X"$OVN_CONTROLLER_SSL_KEY" != X; then
set "$@" --private-key=$OVN_CONTROLLER_SSL_KEY
Expand All @@ -368,6 +368,12 @@ start_controller_vtep () {
if test X"$OVN_CONTROLLER_SSL_BOOTSTRAP_CA_CERT" != X; then
set "$@" --bootstrap-ca-cert=$OVN_CONTROLLER_SSL_BOOTSTRAP_CA_CERT
fi
if test X"$DB_SOCK" != X; then
set "$@" --vtep-db=$DB_SOCK
fi
if test X"$DB_SB_SOCK" != X; then
set "$@" --ovnsb-db=$DB_SB_SOCK
fi

[ "$OVN_USER" != "" ] && set "$@" --user "$OVN_USER"

Expand Down Expand Up @@ -606,6 +612,8 @@ Options:
File location options:
--db-sock=SOCKET JSON-RPC socket name (default: $DB_SOCK)
--db-nb-sock=SOCKET OVN_Northbound db socket (default: $DB_NB_SOCK)
--db-sb-scok=SOCKET OVN_Southbound db socket (default: $DB_SB_SOCK)
--db-nb-file=FILE OVN_Northbound db file (default: $DB_NB_FILE)
--db-sb-file=FILE OVN_Southbound db file (default: $DB_SB_FILE)
--db-nb-schema=FILE OVN_Northbound db file (default: $DB_NB_SCHEMA)
Expand Down
12 changes: 6 additions & 6 deletions rhel/usr_lib_systemd_system_ovn-controller-vtep.service
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ Requires=openvswitch.service
After=openvswitch.service

[Service]
Type=simple
Type=forking
PIDFile=/var/run/openvswitch/ovn-controller-vtep.pid
Restart=on-failure
Environment=OVS_RUNDIR=%t/openvswitch
Environment=OVN_DB=unix:%t/openvswitch/ovnsb_db.sock
Environment=VTEP_DB=unix:%t/openvswitch/db.sock
EnvironmentFile=-/etc/sysconfig/ovn-controller-vtep
ExecStart=/usr/bin/ovn-controller-vtep -vconsole:emer -vsyslog:err -vfile:info \
--log-file=/var/log/openvswitch/ovn-controller-vtep.log \
--no-chdir --pidfile=${OVS_RUNDIR}/ovn-controller-vtep.pid \
--ovnsb-db=${OVN_DB} --vtep-db=${VTEP_DB}
ExecStart=/usr/share/openvswitch/scripts/ovn-ctl \
--db-sb-sock=${OVN_DB} --db-sock=${VTEP_DB} \
start_controller_vtep
ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_controller_vtep

[Install]
WantedBy=multi-user.target

0 comments on commit dd9b0ed

Please sign in to comment.