From: Han Zhou <[email protected]>

When ovn-ctl tries to start ovsdb, it didn't ensure the rundir
(e.g. /var/run/openvswitch) exist, because it is not calling
start_daemon(). Usually, if OVS is started by ovs-ctl before
on the same node, the folder is created already. However, for
OVN central node, OVS is usually not needed. If the folder is
not created (it is common case when system restarted because
/var/run is usually tmpfs), ovn-ctl will fail to start ovsdb.
This patch always ensures the OVN_RUNDIR is created.

Signed-off-by: Han Zhou <[email protected]>
---
 ovn/utilities/ovn-ctl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl
index 83f026e..cca5fac 100755
--- a/ovn/utilities/ovn-ctl
+++ b/ovn/utilities/ovn-ctl
@@ -144,6 +144,7 @@ start_ovsdb__() {
     eval ovn_db_ssl_cert=\$OVN_${DB}_DB_SSL_CERT
     eval ovn_db_ssl_cacert=\$OVN_${DB}_DB_SSL_CA_CERT
 
+    install_dir "$OVN_RUNDIR"
     # Check and eventually start ovsdb-server for DB
     if pidfile_is_running $db_pid_file; then
         return
-- 
2.1.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to