diff mbox

[ovs-dev,v5,1/3] ovn: Fix options:router-port in Gratuitous ARP tests

Message ID 1490664845-20719-1-git-send-email-mickeys.dev@gmail.com
State Accepted
Headers show

Commit Message

Mickey Spiegel March 28, 2017, 1:34 a.m. UTC
In two of the Gratuitous ARP tests, "options:router-port"
is not set correctly.  This does not currently affect
validity of the tests since the next line resets
"options:router-port" to the correct value.

Reported-by: Guruchuran Shetty <guru@ovn.org>
Signed-off-by: Mickey Spiegel <mickeys.dev@gmail.com>
---
 tests/ovn.at | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Gurucharan Shetty March 28, 2017, 6:12 p.m. UTC | #1
On 27 March 2017 at 18:34, Mickey Spiegel <mickeys.dev@gmail.com> wrote:

> In two of the Gratuitous ARP tests, "options:router-port"
> is not set correctly.  This does not currently affect
> validity of the tests since the next line resets
> "options:router-port" to the correct value.
>
> Reported-by: Guruchuran Shetty <guru@ovn.org>
> Signed-off-by: Mickey Spiegel <mickeys.dev@gmail.com>
> ---
>  tests/ovn.at | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/ovn.at b/tests/ovn.at
> index bbbec90..8b7ba12 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -5266,7 +5266,7 @@ ovn-nbctl create Logical_Router name=lr0
> options:chassis=hv1
>  # Add router port to gateway router
>  ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24
>  ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \
> -    type=router options:router-port=lrp0-rp addresses='"f0:00:00:00:00:01"
> '
> +    type=router options:router-port=lrp0 addresses='"f0:00:00:00:00:01"'
>  # Add nat-address option
>  ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0
> nat-addresses="f0:00:00:00:00:01 192.168.0.2"
>

Looks like lsp-set-options expects all the options for that port.
Otherwise, it deletes the ones not specified. This is very
counter-intuitive. But, I wonder whether changing lsp-set-options now would
constitute a API change. Nevertheless, it is independent of this patch. So
I will apply this.

>
> @@ -5314,7 +5314,7 @@ ovn-nbctl create Logical_Router name=lr0
> options:chassis=hv1
>  # Add router port to gateway router
>  ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24
>  ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \
> -    type=router options:router-port=lrp0-rp addresses='"f0:00:00:00:00:01"
> '
> +    type=router options:router-port=lrp0 addresses='"f0:00:00:00:00:01"'
>  # Add nat-address option
>  ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router"
>  # Add NAT rules
> --
> 1.9.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index bbbec90..8b7ba12 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -5266,7 +5266,7 @@  ovn-nbctl create Logical_Router name=lr0 options:chassis=hv1
 # Add router port to gateway router
 ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24
 ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \
-    type=router options:router-port=lrp0-rp addresses='"f0:00:00:00:00:01"'
+    type=router options:router-port=lrp0 addresses='"f0:00:00:00:00:01"'
 # Add nat-address option
 ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="f0:00:00:00:00:01 192.168.0.2"
 
@@ -5314,7 +5314,7 @@  ovn-nbctl create Logical_Router name=lr0 options:chassis=hv1
 # Add router port to gateway router
 ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24
 ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \
-    type=router options:router-port=lrp0-rp addresses='"f0:00:00:00:00:01"'
+    type=router options:router-port=lrp0 addresses='"f0:00:00:00:00:01"'
 # Add nat-address option
 ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router"
 # Add NAT rules