diff mbox series

[ovs-dev] sandbox: Fix env for clustered OVN DBs.

Message ID 1547675110-107566-1-git-send-email-hzhou8@ebay.com
State Accepted
Headers show
Series [ovs-dev] sandbox: Fix env for clustered OVN DBs. | expand

Commit Message

Han Zhou Jan. 16, 2019, 9:45 p.m. UTC
From: Han Zhou <hzhou8@ebay.com>

When ovn clustered mode is specified, the environment veriables
OVN_NB_DB/OVN_SB_DB are wrong. It should be something like
unix:nb1,unix:nb2,unix:nb3 but it turns out to be unix:nb1,unix:nb1,unix:nb2.
So when nb3 becomes leader, the connection will always fail.

It is caused by using an undefined variable $n resulting in the
unexpected result of `seq 2 $n`. This patch fixed it by using the
correct variable $servers.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
---
 tutorial/ovs-sandbox | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ben Pfaff Jan. 16, 2019, 11:25 p.m. UTC | #1
On Wed, Jan 16, 2019 at 01:45:10PM -0800, Han Zhou wrote:
> From: Han Zhou <hzhou8@ebay.com>
> 
> When ovn clustered mode is specified, the environment veriables
> OVN_NB_DB/OVN_SB_DB are wrong. It should be something like
> unix:nb1,unix:nb2,unix:nb3 but it turns out to be unix:nb1,unix:nb1,unix:nb2.
> So when nb3 becomes leader, the connection will always fail.
> 
> It is caused by using an undefined variable $n resulting in the
> unexpected result of `seq 2 $n`. This patch fixed it by using the
> correct variable $servers.
> 
> Signed-off-by: Han Zhou <hzhou8@ebay.com>

Thanks, applied to master.
diff mbox series

Patch

diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox
index 7a5ab5f..601d038 100755
--- a/tutorial/ovs-sandbox
+++ b/tutorial/ovs-sandbox
@@ -468,7 +468,7 @@  The backup database file is sandbox/${db}2.db
                     ovn_start_ovsdb_server $i
                 done
                 remote=unix:${db}1.ovsdb
-                for i in `seq 2 $n`; do
+                for i in `seq 2 $servers`; do
                     remote=$remote,unix:$db$i.ovsdb
                 done
                 for i in $(seq $servers); do