From: Gurucharan Shetty Date: Mon, 18 Jul 2016 06:56:38 +0000 (-0700) Subject: ovn.at: A "peer" is only for interconnected routers. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=bf44c2cd9536be18e1b34a22c925e1bd75f81c63 ovn.at: A "peer" is only for interconnected routers. We should not use "peer" while connecting a router to a switch. (Doing so, will cause ovn-northd to constantly create and destroy logical_flow records which causes CPU utilization of ovn-controller to spike up.) Fixes: 31114af758c7e6 ("ovn-nbctl: Update logical router port commands.") Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff Acked-by: Flavio Fernandes --- diff --git a/tests/ovn.at b/tests/ovn.at index 452c148d3..95aa822c4 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -1513,8 +1513,7 @@ done ovn-nbctl lr-add lr0 for i in 1 2 3; do for j in 1 2 3; do - ovn-nbctl lrp-add lr0 lrp$i$j 00:00:00:00:ff:$i$j 192.168.$i$j.254/24 \ - peer=lrp$i$j-attachment + ovn-nbctl lrp-add lr0 lrp$i$j 00:00:00:00:ff:$i$j 192.168.$i$j.254/24 ovn-nbctl \ -- lsp-add ls$i lrp$i$j-attachment \ -- set Logical_Switch_Port lrp$i$j-attachment type=router \ @@ -2310,13 +2309,13 @@ ovn-nbctl ls-add ls1 ovn-nbctl ls-add ls2 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 peer=rp-ls1 +ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ options:router-port=ls1 addresses=\"00:00:00:01:02:03\" # Connect ls2 to R2 -ovn-nbctl lrp-add R2 ls2 00:00:00:01:02:04 172.16.1.1/24 peer=rp-ls2 +ovn-nbctl lrp-add R2 ls2 00:00:00:01:02:04 172.16.1.1/24 ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 type=router \ options:router-port=ls2 addresses=\"00:00:00:01:02:04\" @@ -2435,8 +2434,7 @@ ovn-nbctl lr-add R1 ovn-nbctl ls-add ls1 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 172.16.1.1/24 \ - peer=rp-ls1 +ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 172.16.1.1/24 ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ options:router-port=ls1 addresses=\"00:00:00:01:02:03\" @@ -2567,12 +2565,12 @@ ovn-nbctl ls-add ls1 ovn-nbctl ls-add ls2 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 peer=rp-ls1 +ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ options:router-port=ls1 addresses=\"00:00:00:01:02:03\" # Connect ls2 to R1 -ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:04 172.16.1.1/24 peer=rp-ls2 +ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:04 172.16.1.1/24 ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 type=router \ options:router-port=ls2 addresses=\"00:00:00:01:02:04\" @@ -2693,17 +2691,17 @@ ovn-nbctl ls-add alice ovn-nbctl ls-add bob # Connect foo to R1 -ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 peer=rp-foo +ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ options:router-port=foo addresses=\"00:00:00:01:02:03\" # Connect alice to R2 -ovn-nbctl lrp-add R2 alice 00:00:00:01:02:04 172.16.1.1/24 peer=rp-alice +ovn-nbctl lrp-add R2 alice 00:00:00:01:02:04 172.16.1.1/24 ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ type=router options:router-port=alice addresses=\"00:00:00:01:02:04\" # Connect bob to R2 -ovn-nbctl lrp-add R2 bob 00:00:00:01:02:05 172.16.2.1/24 peer=rp-bob +ovn-nbctl lrp-add R2 bob 00:00:00:01:02:05 172.16.2.1/24 ovn-nbctl lsp-add bob rp-bob -- set Logical_Switch_Port rp-bob type=router \ options:router-port=bob addresses=\"00:00:00:01:02:05\"