Bug 1562733 - ovn-nbctl command showing the gateway chassis not accounting for priority
Summary: ovn-nbctl command showing the gateway chassis not accounting for priority
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openvswitch
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: lorenzo bianconi
QA Contact: Ofer Blaut
URL:
Whiteboard:
Depends On:
Blocks: 1576725
TreeView+ depends on / blocked
 
Reported: 2018-04-02 09:42 UTC by Eran Kuris
Modified: 2019-09-09 15:59 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1576725 (view as bug list)
Environment:
Last Closed: 2018-05-10 15:43:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eran Kuris 2018-04-02 09:42:51 UTC
Description of problem:
When typing ovn-nbctl command the output of gateway chassis is not correct.
It doesn't take in account priority details.

(overcloud) [root@controller-0 ~]# ovn-nbctl --db=tcp:172.17.1.15:6641 show  
switch 31990f00-c41e-466e-9070-bf3760b58926 (neutron-7b8f0751-6907-408a-8997-89747009fd09) (aka net-64-2)
    port 6a9c85b2-8a8e-470b-b50f-7ae7c3380b03
        type: localport
        addresses: ["fa:16:3e:85:ae:47 10.0.2.2"]
    port a0cc0b12-70d5-46c9-8e00-e76e970c711f
        addresses: ["fa:16:3e:42:d6:89 10.0.2.8"]
    port 580a8d2c-eaa0-48f0-a7e8-8c379abb8b29
        type: router
        router-port: lrp-580a8d2c-eaa0-48f0-a7e8-8c379abb8b29
switch 7bb30649-71dc-405f-9220-37f7f80f855f (neutron-88236779-29ef-46aa-bc6b-80d8f0f15b45) (aka nova)
    port 2ae28cbb-8ced-4158-ac3a-7f43cf520ee7
        type: localport
        addresses: ["fa:16:3e:18:b4:cd"]
    port 6042c7e2-79b3-4925-b606-b86c6dc1e824
        type: router
        router-port: lrp-6042c7e2-79b3-4925-b606-b86c6dc1e824
    port 284190ed-ff6a-438b-b9ee-a843f13edbd6
        type: router
        router-port: lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6
    port provnet-88236779-29ef-46aa-bc6b-80d8f0f15b45
        type: localnet
        addresses: ["unknown"]
switch 26f1fe62-b330-47a6-8527-0d098a2239ac (neutron-6484b473-5e68-440e-9d90-a53e42fe9dc2) (aka net-64-3)
    port 783de96f-ed69-4d3f-83a3-afa2560a7e02
        type: router
        router-port: lrp-783de96f-ed69-4d3f-83a3-afa2560a7e02
    port d12c0cd5-b818-484a-ac0f-70222b15b0cd
        addresses: ["fa:16:3e:cb:69:c1 10.0.3.9"]
    port 53afc813-7488-47fe-ba2d-9047577e9ce3
        addresses: ["fa:16:3e:33:c2:e6 10.0.3.10"]
    port accbd0cb-be25-4f96-8e5b-59e3f473871d
        type: localport
        addresses: ["fa:16:3e:04:03:20 10.0.3.2"]
router ed8829a4-4206-4410-983d-df2e88790121 (neutron-9b83b3ff-e802-4e2a-8c36-1918b6355c7a) (aka Router_eNet_2)
    port lrp-6042c7e2-79b3-4925-b606-b86c6dc1e824
        mac: "fa:16:3e:0a:22:a5"
        networks: ["10.0.0.220/24"]
        gateway chassis: [113644ed-b3c6-47f2-9488-984d37936c97 a34f57de-09d3-4c1f-b56b-270eb850537a 942750fc-cec5-4a9f-aeb5-6dfddf9be3be]
router 0769eb6f-60ed-451a-af57-8ea56c257fda (neutron-cb989bd4-f821-46b4-b556-b499dd64d5c7) (aka Router_eNet)
    port lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6
        mac: "fa:16:3e:53:26:19"
        networks: ["10.0.0.214/24"]
        gateway chassis: [a34f57de-09d3-4c1f-b56b-270eb850537a 113644ed-b3c6-47f2-9488-984d37936c97 942750fc-cec5-4a9f-aeb5-6dfddf9be3be]
    port lrp-783de96f-ed69-4d3f-83a3-afa2560a7e02
        mac: "fa:16:3e:0c:8e:28"
        networks: ["10.0.3.1/24"]
    port lrp-580a8d2c-eaa0-48f0-a7e8-8c379abb8b29
        mac: "fa:16:3e:c3:0a:b0"
        networks: ["10.0.2.1/24"]
    nat 1801d558-fe18-4015-96c7-6998160c64f5
        external ip: "10.0.0.218"
        logical ip: "10.0.3.9"
        type: "dnat_and_snat"
    nat 46c19fad-c450-490f-8255-66bb3c1f715f
        external ip: "10.0.0.214"
        logical ip: "10.0.2.0/24"
        type: "snat"
    nat b81c0ac9-6e19-4beb-88aa-3c1e120fe680
        external ip: "10.0.0.215"
        logical ip: "10.0.2.8"
        type: "dnat_and_snat"
    nat dce146ff-354b-4340-9607-49ee78d33be9
        external ip: "10.0.0.214"
        logical ip: "10.0.3.0/24"
        type: "snat"
(overcloud) [root@controller-0 ~]# ovn-nbctl --db=tcp:172.17.1.15:6641 list Gateway_Chassis
_uuid               : 66ea18a4-17b6-4de8-8b8d-f8b9c0bede71
chassis_name        : "a34f57de-09d3-4c1f-b56b-270eb850537a"
external_ids        : {}
name                : "lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_a34f57de-09d3-4c1f-b56b-270eb850537a"
options             : {}
priority            : 1

_uuid               : 940b9bb5-49bf-4e22-b120-172771e3d6c8
chassis_name        : "942750fc-cec5-4a9f-aeb5-6dfddf9be3be"
external_ids        : {}
name                : "lrp-6042c7e2-79b3-4925-b606-b86c6dc1e824_942750fc-cec5-4a9f-aeb5-6dfddf9be3be"
options             : {}
priority            : 3

_uuid               : e1023fca-ee08-4e88-ad93-4b5df16091ae
chassis_name        : "942750fc-cec5-4a9f-aeb5-6dfddf9be3be"
external_ids        : {}
name                : "lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_942750fc-cec5-4a9f-aeb5-6dfddf9be3be"
options             : {}
priority            : 3

_uuid               : dbb6d0ef-12f1-45e8-9604-69783b5b1cfe
chassis_name        : "113644ed-b3c6-47f2-9488-984d37936c97"
external_ids        : {}
name                : "lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_113644ed-b3c6-47f2-9488-984d37936c97"
options             : {}
priority            : 2

_uuid               : 89ccfd2f-d920-4e23-b45b-94e700fabe45
chassis_name        : "a34f57de-09d3-4c1f-b56b-270eb850537a"
external_ids        : {}
name                : "lrp-6042c7e2-79b3-4925-b606-b86c6dc1e824_a34f57de-09d3-4c1f-b56b-270eb850537a"
options             : {}
priority            : 1

_uuid               : 099acf53-616a-4f6b-8bbe-3f2c0a9ab6af
chassis_name        : "113644ed-b3c6-47f2-9488-984d37936c97"
external_ids        : {}
name                : "lrp-6042c7e2-79b3-4925-b606-b86c6dc1e824_113644ed-b3c6-47f2-9488-984d37936c97"
options             : {}
priority            : 2


(overcloud) [root@controller-0 ~]#  ovn-nbctl --db=tcp:172.17.1.15:6641 lrp-get-gateway-chassis lrp-6042c7e2-79b3-4925-b606-b86c6dc1e824
lrp-6042c7e2-79b3-4925-b606-b86c6dc1e824_942750fc-cec5-4a9f-aeb5-6dfddf9be3be     3
lrp-6042c7e2-79b3-4925-b606-b86c6dc1e824_113644ed-b3c6-47f2-9488-984d37936c97     2
lrp-6042c7e2-79b3-4925-b606-b86c6dc1e824_a34f57de-09d3-4c1f-b56b-270eb850537a     1
(overcloud) [root@controller-0 ~]#  ovn-nbctl --db=tcp:172.17.1.15:6641 lrp-get-gateway-chassis lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6
lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_942750fc-cec5-4a9f-aeb5-6dfddf9be3be     3
lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_113644ed-b3c6-47f2-9488-984d37936c97     2
lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_a34f57de-09d3-4c1f-b56b-270eb850537a     1



Version-Release number of selected component (if applicable):
(overcloud) [root@controller-0 ~]# rpm -qa | grep ovn
puppet-ovn-12.3.1-0.20180221062110.4b16f7c.el7ost.noarch
openvswitch-ovn-central-2.9.0-3.el7fdp.x86_64
novnc-0.6.1-1.el7ost.noarch
openvswitch-ovn-common-2.9.0-3.el7fdp.x86_64
openvswitch-ovn-host-2.9.0-3.el7fdp.x86_64
python-networking-ovn-metadata-agent-4.0.0-0.20180220131809.329d6d8.el7ost.noarch
python-networking-ovn-4.0.0-0.20180220131809.329d6d8.el7ost.noarch
^[[Aopenstack-nova-novncproxy-17.0.1-0.20180302144923.9ace6ed.el7ost.noarch
(overcloud) [root@controller-0 ~]# cat /etc/yum.repos.d/latest-installed 
13   -p 2018-03-20.2


How reproducible:
always

Steps to Reproduce:
1. create 2 network 
2.create 2 router 
3. check with OVN command where the routers scheduled

Actual results:


Expected results:


Additional info:

Comment 1 Daniel Alvarez Sanchez 2018-04-17 07:39:25 UTC
I don't think there's an issue here.

Let's focus on the following port:

    port lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6
        mac: "fa:16:3e:53:26:19"
        networks: ["10.0.0.214/24"]
        gateway chassis: [a34f57de-09d3-4c1f-b56b-270eb850537a 113644ed-b3c6-47f2-9488-984d37936c97 942750fc-cec5-4a9f-aeb5-6dfddf9be3be]


This port (lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6) has been scheduled on 3 chassis (it has 3 gateway chassis entries), each should have different priority:


(overcloud) [root@controller-0 ~]#  ovn-nbctl --db=tcp:172.17.1.15:6641 lrp-get-gateway-chassis lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6
lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_942750fc-cec5-4a9f-aeb5-6dfddf9be3be     3
lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_113644ed-b3c6-47f2-9488-984d37936c97     2
lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_a34f57de-09d3-4c1f-b56b-270eb850537a     1


In the output command above you can see that each of those have different priority (3, 2, 1). Everything looks good to me.

Feel free to reopen this if I missed something.
Best,
Daniel

Comment 2 Eran Kuris 2018-04-17 07:57:20 UTC
(In reply to Daniel Alvarez Sanchez from comment #1)
> I don't think there's an issue here.
> 
> Let's focus on the following port:
> 
>     port lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6
>         mac: "fa:16:3e:53:26:19"
>         networks: ["10.0.0.214/24"]
>         gateway chassis: [a34f57de-09d3-4c1f-b56b-270eb850537a
> 113644ed-b3c6-47f2-9488-984d37936c97 942750fc-cec5-4a9f-aeb5-6dfddf9be3be]
> 
> 
> This port (lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6) has been scheduled on 3
> chassis (it has 3 gateway chassis entries), each should have different
> priority:
> 
> 
> (overcloud) [root@controller-0 ~]#  ovn-nbctl --db=tcp:172.17.1.15:6641
> lrp-get-gateway-chassis lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6
> lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_942750fc-cec5-4a9f-aeb5-
> 6dfddf9be3be     3
> lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_113644ed-b3c6-47f2-9488-
> 984d37936c97     2
> lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6_a34f57de-09d3-4c1f-b56b-
> 270eb850537a     1
> 
> 
> In the output command above you can see that each of those have different
> priority (3, 2, 1). Everything looks good to me.
> 
> Feel free to reopen this if I missed something.
> Best,
> Daniel

Daniel, the prioritization refers to which machine/controller node traffic will pass through. for example, This port (lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6) has been scheduled on 3 chassis and traffic should pass through chassis with priority 3  if it goes down it should go through chassis with priority 2 ...

In this output we should see the order of the chassis priority and also the functionaly does not work.
according to this example I expected that traffix will go through chassis with priority 3 but it does not work like that.
     port lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6
         mac: "fa:16:3e:53:26:19"
         networks: ["10.0.0.214/24"]
         gateway chassis: [a34f57de-09d3-4c1f-b56b-270eb850537a
 113644ed-b3c6-47f2-9488-984d37936c97 942750fc-cec5-4a9f-aeb5-6dfddf9be3be]

expected:
port lrp-284190ed-ff6a-438b-b9ee-a843f13edbd6
         mac: "fa:16:3e:53:26:19"
         networks: ["10.0.0.214/24"]
         gateway chassis: [942750fc-cec5-4a9f-aeb5-6dfddf9be3be ,
 113644ed-b3c6-47f2-9488-984d37936c97 , a34f57de-09d3-4c1f-b56b-270eb850537a]

Comment 3 Miguel Angel Ajo 2018-04-17 07:57:41 UTC
He means ovn-nbctl show, 


It's confusing that the gateway chassis list is out of order (and not showing any priority).

    port lrp-6042c7e2-79b3-4925-b606-b86c6dc1e824
        mac: "fa:16:3e:0a:22:a5"
        networks: ["10.0.0.220/24"]
        gateway chassis: [113644ed-b3c6-47f2-9488-984d37936c97 a34f57de-09d3-4c1f-b56b-270eb850537a 942750fc-cec5-4a9f-aeb5-6dfddf9be3be]

I'm retargetting this for OSP14, as it's just a UI thing with not super high prio. As daniel explained, we can se the priorities with the lrp-get-gateway-chassis  command.

Comment 5 Daniel Alvarez Sanchez 2018-04-17 08:01:41 UTC
Got it, thanks for the explanation. it's most of a usability improvement request than a bug itself. I understand that it can be confusing but still we can get the correct prios through the lrp-get-gateway-chassis command.

Comment 6 lorenzo bianconi 2018-05-10 08:38:01 UTC
Upstream related patch:
https://github.com/openvswitch/ovs/commit/d45d99646c37bbfdb504aeb7a0f1f9a5a584506c


Note You need to log in before you can comment on or make changes to this bug.