logical port for gw on router getting lost when subnet is added

Bug #1843485 reported by Flavio Fernandes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Released
Medium
Flavio Fernandes

Bug Description

When router has a port set as external gateway, a logical port is created on the logical_router
in the nortbound database, as expected.

However, if we attach a subnet to that external network afterwards, the northbound
database loses that logical port, together with the row in the gateway_chassis table.

Steps to reproduce:

PRJ=$(openstack project show demo -f value -c id)

openstack router create --project $PRJ router2 >/dev/null
RTR=$(openstack router show router2 -f value -c id)

openstack network create public --external --default --provider-network-type flat --provider-physical-network public >/dev/null
EXT_NET_ID=$(openstack network show public -f value -c id)

openstack router set --external-gateway $EXT_NET_ID $RTR ; # this creates the logical port that connect router to gateway_chassis

sudo ovn-nbctl show | grep router2 -A 8 ; # the logical port is present...

# BUG: The simple act of adding a subnet to $EXT_NET_ID will cause router to lose the logical port as part of the update
# This is true if this is the very first or any subsequent subnet attachment to the network
openstack subnet create --ip-version 4 --network $EXT_NET_ID --subnet-range 172.24.4.0/24 --no-dhcp public-subnet >/dev/null

sudo ovn-nbctl show | grep router2 -A 8 ; # sad panda... logical port on the router is GONE

Reference code:
https://github.com/openstack/networking-ovn/blob/1119a10fe42801ffc3696d27b8e8136e15bb6bdf/networking_ovn/common/ovn_client.py#L1053-L1065

Revision history for this message
Flavio Fernandes (ffernand) wrote :

[vagrant@ovntutorial2 ~]$ PRJ=$(openstack project show demo -f value -c id)
[vagrant@ovntutorial2 ~]$
[vagrant@ovntutorial2 ~]$ openstack router create --project $PRJ router2 >/dev/null
[vagrant@ovntutorial2 ~]$ RTR=$(openstack router show router2 -f value -c id)
[vagrant@ovntutorial2 ~]$
[vagrant@ovntutorial2 ~]$ openstack network create public --external --default --provider-network-type flat --provider-physical-network public >/dev/null
[vagrant@ovntutorial2 ~]$ EXT_NET_ID=$(openstack network show public -f value -c id)
[vagrant@ovntutorial2 ~]$
[vagrant@ovntutorial2 ~]$ openstack router set --external-gateway $EXT_NET_ID $RTR ; # this creates the logical port that connect router to gateway_chassis
[vagrant@ovntutorial2 ~]$
[vagrant@ovntutorial2 ~]$ sudo ovn-nbctl show | grep router2 -A 8 ; # the logical port is present...
router 06374a0c-d675-478c-b281-072239b5f867 (neutron-c64a10fa-a6db-4a46-8439-a62243360fce) (aka router2)
    port lrp-9a4b6dfb-fbed-4f8f-b5ab-275bf8cf0c72
        mac: "fa:16:3e:0f:ee:ff"
        networks: [""]
        gateway chassis: [97abb05b-3a0d-4830-a1b5-07ab678709ff]
[vagrant@ovntutorial2 ~]$
[vagrant@ovntutorial2 ~]$ CHASSIS=$(ovn-nbctl --bare --columns="_uuid" find Gateway_Chassis)
[vagrant@ovntutorial2 ~]$ PORT_NAME=$(ovn-nbctl --bare --columns=name find logical_router_port gateway_chassis="${CHASSIS}")
[vagrant@ovntutorial2 ~]$ echo logical port \"${PORT_NAME}\" in chassis \"${CHASSIS}\"
logical port "lrp-9a4b6dfb-fbed-4f8f-b5ab-275bf8cf0c72" in chassis "b95773d3-767c-4cef-8267-2b40ba3e28f6"
[vagrant@ovntutorial2 ~]$
[vagrant@ovntutorial2 ~]$
[vagrant@ovntutorial2 ~]$ openstack subnet create --ip-version 4 --network $EXT_NET_ID --subnet-range 172.24.4.0/24 --no-dhcp public-subnet >/dev/null
[vagrant@ovntutorial2 ~]$
[vagrant@ovntutorial2 ~]$
[vagrant@ovntutorial2 ~]$ ovn-nbctl --bare --columns="_uuid" find Gateway_Chassis
[vagrant@ovntutorial2 ~]$ ovn-nbctl --bare --columns=name find logical_router_port
[vagrant@ovntutorial2 ~]$
[vagrant@ovntutorial2 ~]$ sudo journalctl -u devstack@q-svc > ~vagrant/neutron_log.txt

Changed in networking-ovn:
assignee: nobody → Flavio Fernandes (ffernand)
status: New → In Progress
Revision history for this message
Flavio Fernandes (ffernand) wrote :

After some further digging, I can see that this is likely related to a
logic located in AddLRouterPortCommand :

https://github.com/openstack/networking-ovn/blob/5e2f1a5ad0b70d36e728e7a64d0652d6ae8facf4/networking_ovn/ovsdb/commands.py#L334

Since logical router port deleted has the same name as the logical router port being added,
the code is incorrectly assuming that the port already exists. And because of that the code
flow returns in line 334 instead of hitting the "idlutils.RowNotFound" exception.

This also causes the call to _add_gateway_chassis to be missed.

(Pdb) self.name
u'lrp-195beff8-09e9-42b4-abfd-0fc72a726cab'

So... DelLRouterPortCommand and AddLRouterPortCommand cannot use a port with same name!

The transaction object looks like this:

CheckRevisionNumberCommand(if_exists=True, resource={'status': u'ACTIVE', 'description': u'', 'tags': [], 'updated_at': '2019-09-10T20:48:55Z', 'revision_number': 3, \
'id': u'74ff4a1f-ff0a-4bd1-8e68-547dee654f5e', 'external_gateway_info': {'network_id': u'f7277974-cf8c-46ca-a00d-9da566e42ae9', 'enable_snat': True, 'external_fixed_i\
ps': [{'subnet_id': u'1637c183-a5e9-4e73-8b2c-b152c41ec6ae', 'ip_address': u'172.24.4.164'}]}, 'name': u'router2', 'gw_port_id': u'195beff8-09e9-42b4-abfd-0fc72a726ca\
b', 'admin_state_up': True, 'tenant_id': u'01f82375ae45484ead81d3af98613ca0', 'created_at': '2019-09-10T20:42:19Z', 'routes': [], 'project_id': u'01f82375ae45484ead81\
d3af98613ca0'}, name=neutron-74ff4a1f-ff0a-4bd1-8e68-547dee654f5e, resource_type=routers),

DeleteLRouterExtGwCommand(if_exists=True, lrouter=neutron-74ff4a1f-ff0a-4bd1-8e68-547dee654f5e),

DelLRouterPortCommand(if_exists=True, lrouter=neutron-74ff4a1f-ff0a-4bd1-8e68-547dee654f5e, name=lrp-195beff8-09e9-42b4-abfd-0fc72a726cab),

AddLRouterPortCommand(name=lrp-195beff8-09e9-42b4-abfd-0fc72a726cab, may_exist=True, lrouter=neutron-74ff4a1f-ff0a-4bd1-8e68-547dee654f5e, columns={'mac': 'fa:16:3e:9\
4:fc:a1', 'gateway_chassis': [u'84b16b41-103e-4d9f-a8f1-56159c1007dc'], 'external_ids': {'neutron:network_name': u'neutron-f7277974-cf8c-46ca-a00d-9da566e42ae9', 'neu\
tron:subnet_ids': u'1637c183-a5e9-4e73-8b2c-b152c41ec6ae', 'neutron:revision_number': '6', 'neutron:router_name': u'74ff4a1f-ff0a-4bd1-8e68-547dee654f5e'}, 'networks'\
: ['172.24.4.164/24']}),

SetLRouterPortInLSwitchPortCommand(if_exists=True, lswitch_port=195beff8-09e9-42b4-abfd-0fc72a726cab, lrouter_port=lrp-195beff8-09e9-42b4-abfd-0fc72a726cab, is_gw_por\
t=True, lsp_address=router),

AddStaticRouteCommand(lrouter=neutron-74ff4a1f-ff0a-4bd1-8e68-547dee654f5e, columns={'ip_prefix': '0.0.0.0/0', 'external_ids': {'neutron:subnet_id': u'1637c183-a5e9-4\
e73-8b2c-b152c41ec6ae', 'neutron:is_ext_gw': 'true'}, 'nexthop': '172.24.4.1'}),

UpdateLRouterCommand(if_exists=True, columns={'external_ids': {'neutron:gw_port_id': u'195beff8-09e9-42b4-abfd-0fc72a726cab', 'neutron:router_name': u'router2', 'neut\
ron:revision_number': '3'}, 'enabled': True}, name=neutron-74ff4a1f-ff0a-4bd1-8e68-547dee654f5e)

Changed in networking-ovn:
importance: Undecided → Medium
Revision history for this message
Daniel Alvarez (dalvarezs) wrote :

I reproduced it following your steps using openstack queens.

   56 openstack network create public --external --default --provider-network-type vlan --provider-physical-network tenant --provider-segment 1099
   57 openstack router create myrouter
   58 EXT_NET_ID=$(openstack network show public -f value -c id)
   59 openstack router set --external-gateway $EXT_NET_ID myrouter

()[root@controller-0 /]# ovn-nbctl show | grep myrouter -A8
router e1354b7b-2586-4cb9-87cf-01a6156a0aa4 (neutron-1053bd90-790e-4da4-afd5-618f193f5d7a) (aka myrouter)
    port lrp-80df6417-832b-4b06-be43-141a380729f1
        mac: "fa:16:3e:97:fb:0d"
        networks: [""]
        gateway chassis: [702381bd-00e8-4c98-89b1-75e559e5c1e5]

 60 openstack subnet create --ip-version 4 --network $EXT_NET_ID --subnet-range 172.24.4.0/24 --no-dhcp mypublicsubnet

()[root@controller-0 /]# ovn-nbctl show | grep myrouter -A8
router e1354b7b-2586-4cb9-87cf-01a6156a0aa4 (neutron-1053bd90-790e-4da4-afd5-618f193f5d7a) (aka myrouter)

Thanks Flavio, good catch :) I think that we need to update the LRP instead of deleting and readding it.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (master)

Fix proposed to branch: master
Review: https://review.opendev.org/681945

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to networking-ovn (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/683237

Revision history for this message
Flavio Fernandes (ffernand) wrote :

After looking a the transaction created (see comment #2 above) and also looking at the
ovsdb command used for deleting the logical router port, we can now see that the bug
is actually caused by DelLRouterPortCommand using a lazy approach for deleting the logical port.
That approach does not work since removal and re-adding of the port with same name were in the
same transaction.

That is, since the router logical port is not a root object [OVN_A] in the ovsdb schema, the actual
removal of it was happening indirectly by removing the reference [OVN_B] to it from the logical router. See line 409 in [1].

All in all, a much less disruptive approach for addressing this will be used in the latest
Gerrit patch-set [2]. It will explicitly do for the port deletion,
which will then allow the code flow in AddLRouterPortCommand [3] to hit the idlutils.RowNotFound
exception -- as it should -- and proceed to create the replacement logical router port.

[OVN_A]: https://github.com/ovn-org/ovn/blob/8016aa60b66bda1bb4b729b1c2b14bd49dafec28/ovn-nb.ovsschema#L310

[OVN_B]: https://github.com/ovn-org/ovn/blob/8016aa60b66bda1bb4b729b1c2b14bd49dafec28/ovn-nb.ovsschema#L242

[1]: https://github.com/openstack/networking-ovn/blob/5e2f1a5ad0b70d36e728e7a64d0652d6ae8facf4/networking_ovn/ovsdb/commands.py#L409

[2]: https://review.opendev.org/681945

[3]: https://github.com/openstack/networking-ovn/blob/5e2f1a5ad0b70d36e728e7a64d0652d6ae8facf4/networking_ovn/ovsdb/commands.py#L334

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.opendev.org/681945
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=92142f3165806527e33a4544162ad4eb301e8436
Submitter: Zuul
Branch: master

commit 92142f3165806527e33a4544162ad4eb301e8436
Author: Flavio Fernandes <email address hidden>
Date: Thu Sep 12 18:32:34 2019 -0400

    Do not lose router logical port upon subnet add on the external net

    Prior to this patch, logical port used by the router to the external
    network was lost if subnet was added to that network. That was
    caused by missing explicit delete call in DelLRouterPortCommand.

    Also added functional test to exercise this particular code path:
      test_router::test_gateway_chassis_with_subnet_changes()

    Closes-Bug: #1843485
    Co-authored-by: Daniel Alvarez <email address hidden>
    Co-authored-by: Terry Wilson <email address hidden>
    Signed-off-by: Flavio Fernandes <email address hidden>

    Change-Id: I3e9d62ffc5eab396e983c0769e53d2d1f35644f6

Changed in networking-ovn:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to networking-ovn (master)

Reviewed: https://review.opendev.org/683237
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=5cffa92daa822116c1862dcd11ad156be444df75
Submitter: Zuul
Branch: master

commit 5cffa92daa822116c1862dcd11ad156be444df75
Author: Flavio Fernandes <email address hidden>
Date: Thu Sep 19 14:58:05 2019 -0400

    test_router: Verify the creation and removal of a lrp

    Add test to ensure that logical router port associated
    with an external network is created and removed as
    needed: test_logical_router_port_creation. With that,
    the test exercises the code-path where a gateway is
    removed before a new one is set. In terms of OpenStack
    workflow, that would look like:

      openstack router set --external-gateway $EXT_NET_ID $RTR
      openstack router unset --external-gateway $RTR
      openstack router set --external-gateway $EXT_NET_ID2 $RTR

    Also changed test_gateway_chassis_with_bridge_mappings
    to include docstring and have a lower bound count to the
    mocked objects it uses.

    Change-Id: Ib3edc101e9ee0fb53386fac0ae7f272ab3b3646b
    Signed-off-by: Flavio Fernandes <email address hidden>
    Related-Bug: #1843485
    Closes-Bug: #1844652

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/688000

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/688001

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/688002

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/688003

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/stein)

Reviewed: https://review.opendev.org/688001
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=f7ee5a5e05f4da2bef07c574f1a72fb9c8ab0b1a
Submitter: Zuul
Branch: stable/stein

commit f7ee5a5e05f4da2bef07c574f1a72fb9c8ab0b1a
Author: Flavio Fernandes <email address hidden>
Date: Thu Sep 12 18:32:34 2019 -0400

    Do not lose router logical port upon subnet add on the external net

    Prior to this patch, logical port used by the router to the external
    network was lost if subnet was added to that network. That was
    caused by missing explicit delete call in DelLRouterPortCommand.

    Also added functional test to exercise this particular code path:
      test_router::test_gateway_chassis_with_subnet_changes()

    Closes-Bug: #1843485
    Co-authored-by: Daniel Alvarez <email address hidden>
    Co-authored-by: Terry Wilson <email address hidden>
    Signed-off-by: Flavio Fernandes <email address hidden>

    Change-Id: I3e9d62ffc5eab396e983c0769e53d2d1f35644f6
    (cherry picked from commit 92142f3165806527e33a4544162ad4eb301e8436)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/train)

Reviewed: https://review.opendev.org/688000
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=92fc4dd62f813caea94d2f7635794e600981fc7e
Submitter: Zuul
Branch: stable/train

commit 92fc4dd62f813caea94d2f7635794e600981fc7e
Author: Flavio Fernandes <email address hidden>
Date: Thu Sep 12 18:32:34 2019 -0400

    Do not lose router logical port upon subnet add on the external net

    Prior to this patch, logical port used by the router to the external
    network was lost if subnet was added to that network. That was
    caused by missing explicit delete call in DelLRouterPortCommand.

    Also added functional test to exercise this particular code path:
      test_router::test_gateway_chassis_with_subnet_changes()

    Closes-Bug: #1843485
    Co-authored-by: Daniel Alvarez <email address hidden>
    Co-authored-by: Terry Wilson <email address hidden>
    Signed-off-by: Flavio Fernandes <email address hidden>

    Change-Id: I3e9d62ffc5eab396e983c0769e53d2d1f35644f6
    (cherry picked from commit 92142f3165806527e33a4544162ad4eb301e8436)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/rocky)

Reviewed: https://review.opendev.org/688002
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=bac75284f4600ebcc81e3a8decf9d21e35fa78f3
Submitter: Zuul
Branch: stable/rocky

commit bac75284f4600ebcc81e3a8decf9d21e35fa78f3
Author: Flavio Fernandes <email address hidden>
Date: Thu Sep 12 18:32:34 2019 -0400

    Do not lose router logical port upon subnet add on the external net

    Prior to this patch, logical port used by the router to the external
    network was lost if subnet was added to that network. That was
    caused by missing explicit delete call in DelLRouterPortCommand.

    Also added functional test to exercise this particular code path:
      test_router::test_gateway_chassis_with_subnet_changes()

    Closes-Bug: #1843485
    Co-authored-by: Daniel Alvarez <email address hidden>
    Co-authored-by: Terry Wilson <email address hidden>
    Signed-off-by: Flavio Fernandes <email address hidden>

    Change-Id: I3e9d62ffc5eab396e983c0769e53d2d1f35644f6
    (cherry picked from commit 92142f3165806527e33a4544162ad4eb301e8436)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/queens)

Reviewed: https://review.opendev.org/688003
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=919eaabd5d94ed4838ba9c471b5a2e31fd5f08e1
Submitter: Zuul
Branch: stable/queens

commit 919eaabd5d94ed4838ba9c471b5a2e31fd5f08e1
Author: Flavio Fernandes <email address hidden>
Date: Thu Sep 12 18:32:34 2019 -0400

    Do not lose router logical port upon subnet add on the external net

    Prior to this patch, logical port used by the router to the external
    network was lost if subnet was added to that network. That was
    caused by missing explicit delete call in DelLRouterPortCommand.

    Also added functional test to exercise this particular code path:
      test_router::test_gateway_chassis_with_subnet_changes()

    Closes-Bug: #1843485
    Co-authored-by: Daniel Alvarez <email address hidden>
    Co-authored-by: Terry Wilson <email address hidden>
    Signed-off-by: Flavio Fernandes <email address hidden>

    Change-Id: I3e9d62ffc5eab396e983c0769e53d2d1f35644f6
    (cherry picked from commit 92142f3165806527e33a4544162ad4eb301e8436)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 4.0.4

This issue was fixed in the openstack/networking-ovn 4.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 7.1.0

This issue was fixed in the openstack/networking-ovn 7.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 6.0.1

This issue was fixed in the openstack/networking-ovn 6.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 5.1.0

This issue was fixed in the openstack/networking-ovn 5.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to networking-ovn (stable/train)

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/728559

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to networking-ovn (stable/stein)

Related fix proposed to branch: stable/stein
Review: https://review.opendev.org/728562

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to networking-ovn (stable/rocky)

Related fix proposed to branch: stable/rocky
Review: https://review.opendev.org/728563

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to networking-ovn (stable/queens)

Related fix proposed to branch: stable/queens
Review: https://review.opendev.org/728565

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to networking-ovn (stable/train)

Reviewed: https://review.opendev.org/728559
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=b9ab95036b3bbaf1a87b1c4beeed11f80036e8a0
Submitter: Zuul
Branch: stable/train

commit b9ab95036b3bbaf1a87b1c4beeed11f80036e8a0
Author: Flavio Fernandes <email address hidden>
Date: Thu Sep 19 14:58:05 2019 -0400

    test_router: Verify the creation and removal of a lrp

    Add test to ensure that logical router port associated
    with an external network is created and removed as
    needed: test_logical_router_port_creation. With that,
    the test exercises the code-path where a gateway is
    removed before a new one is set. In terms of OpenStack
    workflow, that would look like:

      openstack router set --external-gateway $EXT_NET_ID $RTR
      openstack router unset --external-gateway $RTR
      openstack router set --external-gateway $EXT_NET_ID2 $RTR

    Also changed test_gateway_chassis_with_bridge_mappings
    to include docstring and have a lower bound count to the
    mocked objects it uses.

    Change-Id: Ib3edc101e9ee0fb53386fac0ae7f272ab3b3646b
    Signed-off-by: Flavio Fernandes <email address hidden>
    Related-Bug: #1843485
    Closes-Bug: #1844652
    (cherry picked from commit 5cffa92daa822116c1862dcd11ad156be444df75)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to networking-ovn (stable/rocky)

Reviewed: https://review.opendev.org/728563
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=f3577c72f154bcce882a4ff28d51dca53ae4f4cc
Submitter: Zuul
Branch: stable/rocky

commit f3577c72f154bcce882a4ff28d51dca53ae4f4cc
Author: Flavio Fernandes <email address hidden>
Date: Thu Sep 19 14:58:05 2019 -0400

    test_router: Verify the creation and removal of a lrp

    Add test to ensure that logical router port associated
    with an external network is created and removed as
    needed: test_logical_router_port_creation. With that,
    the test exercises the code-path where a gateway is
    removed before a new one is set. In terms of OpenStack
    workflow, that would look like:

      openstack router set --external-gateway $EXT_NET_ID $RTR
      openstack router unset --external-gateway $RTR
      openstack router set --external-gateway $EXT_NET_ID2 $RTR

    Also changed test_gateway_chassis_with_bridge_mappings
    to include docstring and have a lower bound count to the
    mocked objects it uses.

    Change-Id: Ib3edc101e9ee0fb53386fac0ae7f272ab3b3646b
    Signed-off-by: Flavio Fernandes <email address hidden>
    Related-Bug: #1843485
    Closes-Bug: #1844652
    (cherry picked from commit 5cffa92daa822116c1862dcd11ad156be444df75)
    (cherry picked from commit b9ab95036b3bbaf1a87b1c4beeed11f80036e8a0)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to networking-ovn (stable/queens)

Reviewed: https://review.opendev.org/728565
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=5d9dacf52265c2de00dbd568190e05354f84703a
Submitter: Zuul
Branch: stable/queens

commit 5d9dacf52265c2de00dbd568190e05354f84703a
Author: Flavio Fernandes <email address hidden>
Date: Thu Sep 19 14:58:05 2019 -0400

    test_router: Verify the creation and removal of a lrp

    Add test to ensure that logical router port associated
    with an external network is created and removed as
    needed: test_logical_router_port_creation. With that,
    the test exercises the code-path where a gateway is
    removed before a new one is set. In terms of OpenStack
    workflow, that would look like:

      openstack router set --external-gateway $EXT_NET_ID $RTR
      openstack router unset --external-gateway $RTR
      openstack router set --external-gateway $EXT_NET_ID2 $RTR

    Also changed test_gateway_chassis_with_bridge_mappings
    to include docstring and have a lower bound count to the
    mocked objects it uses.

    Change-Id: Ib3edc101e9ee0fb53386fac0ae7f272ab3b3646b
    Signed-off-by: Flavio Fernandes <email address hidden>
    Related-Bug: #1843485
    Closes-Bug: #1844652
    (cherry picked from commit 5cffa92daa822116c1862dcd11ad156be444df75)
    (cherry picked from commit b9ab95036b3bbaf1a87b1c4beeed11f80036e8a0)
    (cherry picked from commit f3577c72f154bcce882a4ff28d51dca53ae4f4cc)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to networking-ovn (stable/stein)

Reviewed: https://review.opendev.org/728562
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=23a0316193be494c8fba7f223ad40624698c05dc
Submitter: Zuul
Branch: stable/stein

commit 23a0316193be494c8fba7f223ad40624698c05dc
Author: Flavio Fernandes <email address hidden>
Date: Thu Sep 19 14:58:05 2019 -0400

    test_router: Verify the creation and removal of a lrp

    Add test to ensure that logical router port associated
    with an external network is created and removed as
    needed: test_logical_router_port_creation. With that,
    the test exercises the code-path where a gateway is
    removed before a new one is set. In terms of OpenStack
    workflow, that would look like:

      openstack router set --external-gateway $EXT_NET_ID $RTR
      openstack router unset --external-gateway $RTR
      openstack router set --external-gateway $EXT_NET_ID2 $RTR

    Also changed test_gateway_chassis_with_bridge_mappings
    to include docstring and have a lower bound count to the
    mocked objects it uses.

    Change-Id: Ib3edc101e9ee0fb53386fac0ae7f272ab3b3646b
    Signed-off-by: Flavio Fernandes <email address hidden>
    Related-Bug: #1843485
    Closes-Bug: #1844652
    (cherry picked from commit 5cffa92daa822116c1862dcd11ad156be444df75)
    (cherry picked from commit b9ab95036b3bbaf1a87b1c4beeed11f80036e8a0)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.