[ovn-octavia-provider] Avoid LB in ERROR status on delete due to LR/LS not found

Bug #1990129 reported by Fernando Royo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Fernando Royo

Bug Description

The LB delete operation a single transaccion will delete the LB reference from all LS and LR, and also the deletion of the LB itself.

As it is in an atomic transaction, if any operation fails, the whole operation will report a LB ERROR status.

Changed in neutron:
assignee: nobody → Fernando Royo (froyoredhat)
tags: added: ovn-octavia-provider
Changed in neutron:
status: New → In Progress
Revision history for this message
Bence Romsics (bence-romsics) wrote :

It sounds like the deletion still completes in this case (when some logical router/switch was not found) in the backend and only the API record goes to the ERROR state instead of getting deleted. Correct me please if I misunderstood it.

Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Fernando Royo (froyoredhat) wrote :

Mainly you are right, but sometimes the deletion is not completed on the backend, if commands on lines [1] or [2] fails, the atomic transaction will not delete the LB on backend. These are corner cases totally agree.

[1] https://opendev.org/openstack/ovn-octavia-provider/src/branch/master/ovn_octavia_provider/helper.py#L1147
[2] https://opendev.org/openstack/ovn-octavia-provider/src/branch/master/ovn_octavia_provider/helper.py#L1161

Revision history for this message
Fernando Royo (froyoredhat) wrote :

In any case a patch is already submited but not referenced here.

https://review.opendev.org/c/openstack/ovn-octavia-provider/+/857716

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

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/857716
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/f9ccb4c48627a200ef27dde60b01bccdccac4e45
Submitter: "Zuul (22348)"
Branch: master

commit f9ccb4c48627a200ef27dde60b01bccdccac4e45
Author: Fernando Royo <email address hidden>
Date: Wed Sep 14 15:52:43 2022 +0200

    Avoid LB ERROR status on delete when LS/LR are already deleted

    The delete operation of an LB lists all references to it (LS and
    LR) and in a single transaction deletes them together with the
    LB itself. If any of those deletions raise a RowNotFound exception,
    the execution will report ERROR status.

    This patch will reduce those situations, rechecking the command
    that triggers the RowNotFound exception and passing in case a LS
    or a LR was the culprit, deleting finally the LB and reporting as
    a DELETED status. In other case, the exception is raised and
    finally the LB will be reported as ERROR status.

    Closes-Bug:#1990129

    Change-Id: I91b29add2a5d2ca3d4eff4b8d6a88be16c42be51

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (stable/zed)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (stable/yoga)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (stable/xena)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/859531

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

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/859532

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

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/859534

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

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/859532
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/c406f7db5457d81e0f864ce82f232c21420fec5d
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit c406f7db5457d81e0f864ce82f232c21420fec5d
Author: Fernando Royo <email address hidden>
Date: Wed Sep 14 15:52:43 2022 +0200

    Avoid LB ERROR status on delete when LS/LR are already deleted

    The delete operation of an LB lists all references to it (LS and
    LR) and in a single transaction deletes them together with the
    LB itself. If any of those deletions raise a RowNotFound exception,
    the execution will report ERROR status.

    This patch will reduce those situations, rechecking the command
    that triggers the RowNotFound exception and passing in case a LS
    or a LR was the culprit, deleting finally the LB and reporting as
    a DELETED status. In other case, the exception is raised and
    finally the LB will be reported as ERROR status.

    Closes-Bug:#1990129

    Change-Id: I91b29add2a5d2ca3d4eff4b8d6a88be16c42be51
    (cherry picked from commit f9ccb4c48627a200ef27dde60b01bccdccac4e45)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovn-octavia-provider (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/859531
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/b76f35dbfcbecb4869ac0d8f8d1465627265567c
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit b76f35dbfcbecb4869ac0d8f8d1465627265567c
Author: Fernando Royo <email address hidden>
Date: Wed Sep 14 15:52:43 2022 +0200

    Avoid LB ERROR status on delete when LS/LR are already deleted

    The delete operation of an LB lists all references to it (LS and
    LR) and in a single transaction deletes them together with the
    LB itself. If any of those deletions raise a RowNotFound exception,
    the execution will report ERROR status.

    This patch will reduce those situations, rechecking the command
    that triggers the RowNotFound exception and passing in case a LS
    or a LR was the culprit, deleting finally the LB and reporting as
    a DELETED status. In other case, the exception is raised and
    finally the LB will be reported as ERROR status.

    Closes-Bug:#1990129

    Change-Id: I91b29add2a5d2ca3d4eff4b8d6a88be16c42be51
    (cherry picked from commit f9ccb4c48627a200ef27dde60b01bccdccac4e45)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovn-octavia-provider (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/859528
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/c8467d4ea11ef01892c103962b2fceaa056a62ab
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit c8467d4ea11ef01892c103962b2fceaa056a62ab
Author: Fernando Royo <email address hidden>
Date: Wed Sep 14 15:52:43 2022 +0200

    Avoid LB ERROR status on delete when LS/LR are already deleted

    The delete operation of an LB lists all references to it (LS and
    LR) and in a single transaction deletes them together with the
    LB itself. If any of those deletions raise a RowNotFound exception,
    the execution will report ERROR status.

    This patch will reduce those situations, rechecking the command
    that triggers the RowNotFound exception and passing in case a LS
    or a LR was the culprit, deleting finally the LB and reporting as
    a DELETED status. In other case, the exception is raised and
    finally the LB will be reported as ERROR status.

    Closes-Bug:#1990129

    Change-Id: I91b29add2a5d2ca3d4eff4b8d6a88be16c42be51
    (cherry picked from commit f9ccb4c48627a200ef27dde60b01bccdccac4e45)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovn-octavia-provider (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/859530
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/99fcea157d961e11a2af9a3570b35ab0c3383b39
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 99fcea157d961e11a2af9a3570b35ab0c3383b39
Author: Fernando Royo <email address hidden>
Date: Wed Sep 14 15:52:43 2022 +0200

    Avoid LB ERROR status on delete when LS/LR are already deleted

    The delete operation of an LB lists all references to it (LS and
    LR) and in a single transaction deletes them together with the
    LB itself. If any of those deletions raise a RowNotFound exception,
    the execution will report ERROR status.

    This patch will reduce those situations, rechecking the command
    that triggers the RowNotFound exception and passing in case a LS
    or a LR was the culprit, deleting finally the LB and reporting as
    a DELETED status. In other case, the exception is raised and
    finally the LB will be reported as ERROR status.

    Closes-Bug:#1990129

    Change-Id: I91b29add2a5d2ca3d4eff4b8d6a88be16c42be51
    (cherry picked from commit f9ccb4c48627a200ef27dde60b01bccdccac4e45)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovn-octavia-provider (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/859527
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/465a895f0da9b42a6edb0ac2836941049751e2d9
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 465a895f0da9b42a6edb0ac2836941049751e2d9
Author: Fernando Royo <email address hidden>
Date: Wed Sep 14 15:52:43 2022 +0200

    Avoid LB ERROR status on delete when LS/LR are already deleted

    The delete operation of an LB lists all references to it (LS and
    LR) and in a single transaction deletes them together with the
    LB itself. If any of those deletions raise a RowNotFound exception,
    the execution will report ERROR status.

    This patch will reduce those situations, rechecking the command
    that triggers the RowNotFound exception and passing in case a LS
    or a LR was the culprit, deleting finally the LB and reporting as
    a DELETED status. In other case, the exception is raised and
    finally the LB will be reported as ERROR status.

    Closes-Bug:#1990129

    Change-Id: I91b29add2a5d2ca3d4eff4b8d6a88be16c42be51
    (cherry picked from commit f9ccb4c48627a200ef27dde60b01bccdccac4e45)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovn-octavia-provider (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/859534
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/c1976cf761a25a3e28ed28b22422ad8b80055a18
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit c1976cf761a25a3e28ed28b22422ad8b80055a18
Author: Fernando Royo <email address hidden>
Date: Wed Sep 14 15:52:43 2022 +0200

    Avoid LB ERROR status on delete when LS/LR are already deleted

    The delete operation of an LB lists all references to it (LS and
    LR) and in a single transaction deletes them together with the
    LB itself. If any of those deletions raise a RowNotFound exception,
    the execution will report ERROR status.

    This patch will reduce those situations, rechecking the command
    that triggers the RowNotFound exception and passing in case a LS
    or a LR was the culprit, deleting finally the LB and reporting as
    a DELETED status. In other case, the exception is raised and
    finally the LB will be reported as ERROR status.

    Closes-Bug:#1990129

    (manually cherry picked from commit f9ccb4c48627a200ef27dde60b01bccdccac4e45)

    Depends-On: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/859625

    Change-Id: I91b29add2a5d2ca3d4eff4b8d6a88be16c42be51
    (cherry picked from commit f9ccb4c48627a200ef27dde60b01bccdccac4e45)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider 1.0.2

This issue was fixed in the openstack/ovn-octavia-provider 1.0.2 release.

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider 1.2.0

This issue was fixed in the openstack/ovn-octavia-provider 1.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider 4.0.0.0rc1

This issue was fixed in the openstack/ovn-octavia-provider 4.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider 2.1.0

This issue was fixed in the openstack/ovn-octavia-provider 2.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider 3.1.0

This issue was fixed in the openstack/ovn-octavia-provider 3.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider ussuri-eol

This issue was fixed in the openstack/ovn-octavia-provider ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider victoria-eom

This issue was fixed in the openstack/ovn-octavia-provider victoria-eom release.

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

Other bug subscribers

Remote bug watches

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