diff mbox series

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

Message ID 20191012200340.25602-1-nusiddiq@redhat.com
State Accepted
Headers show
Series [ovs-dev,ovn] ovn-ctl: Create etcdir when starting ovsdb servers | expand

Commit Message

Numan Siddique Oct. 12, 2019, 8:03 p.m. UTC
From: Numan Siddique <nusiddiq@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@redhat.com>
---
 utilities/ovn-ctl | 2 ++
 1 file changed, 2 insertions(+)

Comments

aginwala Oct. 12, 2019, 11:01 p.m. UTC | #1
Acked-by: Aliasgar Ginwala <aginwala@ebay.com <gvrose8192@gmail.com>>

On Sat, Oct 12, 2019 at 1:16 PM <nusiddiq@redhat.com> wrote:

> From: Numan Siddique <nusiddiq@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@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_RUNDIR
>      chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_logdir
> +    chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_etcdir
>
>      set ovsdb-server
>      set "$@" $log --log-file=$logfile
> --
> 2.21.0
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Numan Siddique Oct. 13, 2019, 6:26 a.m. UTC | #2
On Sun, Oct 13, 2019 at 4:31 AM aginwala <aginwala@asu.edu> wrote:

> Acked-by: Aliasgar Ginwala <aginwala@ebay.com <gvrose8192@gmail.com>>
>

Thanks for the review. I applied this to master.

Numan


>
> On Sat, Oct 12, 2019 at 1:16 PM <nusiddiq@redhat.com> wrote:
>
>> From: Numan Siddique <nusiddiq@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@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_RUNDIR
>>      chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_logdir
>> +    chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_etcdir
>>
>>      set ovsdb-server
>>      set "$@" $log --log-file=$logfile
>> --
>> 2.21.0
>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>
>
diff mbox series

Patch

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_RUNDIR
     chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_logdir
+    chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_etcdir
 
     set ovsdb-server
     set "$@" $log --log-file=$logfile