[ovs-dev] [PATCH ovn] ovn-ctl: Create etcdir when starting ovsdb servers

nusiddiq at redhat.com nusiddiq at redhat.com
Sat Oct 12 20:03:40 UTC 2019

From: Numan Siddique <nusiddiq at redhat.com>

'ovn-ctl promote_ovnnb/promote_ovnsb' stores the address of the
active server in /etc/ovn/ovn(nb/sb)-active.conf and this fails as
ovn-ctl doesn't create /etc/ovn dir.

This patch fixes it.

Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
 utilities/ovn-ctl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl
index 433ee4f50..481e28fc9 100755
--- a/utilities/ovn-ctl
+++ b/utilities/ovn-ctl
@@ -153,6 +153,7 @@ start_ovsdb__() {
     ovn_install_dir "$OVN_RUNDIR"
     ovn_install_dir "$ovn_logdir"
     ovn_install_dir "$ovn_dbdir"
+    ovn_install_dir "$ovn_etcdir"
     # Check and eventually start ovsdb-server for DB
     if pidfile_is_running $db_pid_file; then
@@ -194,6 +195,7 @@ $cluster_remote_port
     chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_dbdir
     chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_logdir
+    chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_etcdir
     set ovsdb-server
     set "$@" $log --log-file=$logfile

More information about the dev mailing list