[ovn-octavia-provider] Return DELETED on member_delete for non-existing members

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

Bug Description

When a member_delete request is received on a member non-existing in any pool, exception msg is shown and provisioning status returned as ERROR for the member, keeping the rest of the LB entienes status as it is. That ERROR status for the non-existing-MEMBER keep it in the Octavia DB, allowing the client to continue trying operations UPDATE/DELETE over it.

2024-05-12 09:05:29.611 11191 INFO octavia.api.v2.controllers.member [req-21afbd2f-00b8-475e-b554-09e4af546bef - 9a4cb0af8dd1407aaf9a9fba84c52779 - a2ba132329ec41d9905865c5f884d5d5 default] Sending delete Member b0cd9728-6460-4105-8d10-a80c8fb04176 to provider ovn
2024-05-12 09:05:29.612 11191 DEBUG ovn_octavia_provider.helper [-] Handling request member_delete with info {'id': 'b0cd9728-6460-4105-8d10-a80c8fb04176', 'address': '10.128.217.128', 'protocol_port': 8080, 'pool_id': '02330f72-8429-4fb4-9f31-cca5980c0f5e', 'subnet_id': 'a
d9bde6f-4715-4d9d-bce6-cb66fece8749'} request_handler /usr/lib/python3.9/site-packages/ovn_octavia_provider/helper.py:405
2024-05-12 09:05:29.671 11191 ERROR ovn_octavia_provider.helper [-] Exception occurred during deletion of member: octavia_lib.api.drivers.exceptions.DriverError: Member b0cd9728-6460-4105-8d10-a80c8fb04176 not found in the pool
2024-05-12 09:05:29.671 11191 ERROR ovn_octavia_provider.helper Traceback (most recent call last):
2024-05-12 09:05:29.671 11191 ERROR ovn_octavia_provider.helper File "/usr/lib/python3.9/site-packages/ovn_octavia_provider/helper.py", line 2019, in member_delete
2024-05-12 09:05:29.671 11191 ERROR ovn_octavia_provider.helper pool_status = self._remove_member(member, ovn_lb, pool_key)
2024-05-12 09:05:29.671 11191 ERROR ovn_octavia_provider.helper File "/usr/lib/python3.9/site-packages/ovn_octavia_provider/helper.py", line 2009, in _remove_member
2024-05-12 09:05:29.671 11191 ERROR ovn_octavia_provider.helper raise driver_exceptions.DriverError(
2024-05-12 09:05:29.671 11191 ERROR ovn_octavia_provider.helper octavia_lib.api.drivers.exceptions.DriverError: Member b0cd9728-6460-4105-8d10-a80c8fb04176 not found in the pool
2024-05-12 09:05:29.671 11191 ERROR ovn_octavia_provider.helper
2024-05-12 09:05:29.673 11191 DEBUG ovn_octavia_provider.helper [-] no member status on external_ids: None _update_external_ids_member_status /usr/lib/python3.9/site-packages/ovn_octavia_provider/helper.py:1854
2024-05-12 09:05:29.673 11191 DEBUG ovsdbapp.backend.ovs_idl.vlog [-] [POLLIN] on fd 14 __log_wakeup /usr/lib64/python3.9/site-packages/ovs/poller.py:263
2024-05-12 09:05:29.673 11191 DEBUG ovsdbapp.backend.ovs_idl.transaction [-] Running txn n=1 command(idx=0): DbRemoveCommand(table=Load_Balancer, record=6664aef1-22ad-44c6-9b6c-54808f0656d5, column=external_ids, values=('neutron:member_status',), keyvalues={}, if_exists=False) do_commit /usr/lib/python3.9/site-packages/ovsdbapp/backend/ovs_idl/transaction.py:89
2024-05-12 09:05:29.674 11191 DEBUG ovsdbapp.backend.ovs_idl.vlog [-] [POLLIN] on fd 6 __log_wakeup /usr/lib64/python3.9/site-packages/ovs/poller.py:263
2024-05-12 09:05:29.674 11191 DEBUG ovsdbapp.backend.ovs_idl.vlog [-] 0-ms timeout __log_wakeup /usr/lib64/python3.9/site-packages/ovs/poller.py:248
2024-05-12 09:05:29.675 11191 DEBUG ovn_octavia_provider.helper [-] no member status on external_ids: None _get_current_operating_statuses /usr/lib/python3.9/site-packages/ovn_octavia_provider/helper.py:2908
2024-05-12 09:05:30.190 11191 DEBUG ovn_octavia_provider.helper [-] Updating status to octavia: {'loadbalancers': [{'id': '9e911d87-cd48-4c1e-95a6-1f3135610a2c', 'provisioning_status': 'ACTIVE', 'operating_status': 'ONLINE'}], 'listeners': [{'id': '2c18f4d2-9e57-4c61-811e-31ba61131b5a', 'provisioning_status': 'ACTIVE', 'operating_status': 'ONLINE'}], 'pools': [{'id': '02330f72-8429-4fb4-9f31-cca5980c0f5e', 'provisioning_status': 'ACTIVE', 'operating_status': 'OFFLINE'}], 'members': [{'id': 'b0cd9728-6460-4105-8d10-a80c8fb04176', 'provisioning_status': 'ERROR'}]} _update_status_to_octavia /usr/lib/python3.9/site-packages/ovn_octavia_provider/helper.py:432

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (master)
Changed in neutron:
status: New → In Progress
Miguel Lavalle (minsel)
Changed in neutron:
importance: Undecided → High
assignee: nobody → Fernando Royo (froyoredhat)
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/+/919482
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/aeac73a0663650efcab96828452753e2db42a7b1
Submitter: "Zuul (22348)"
Branch: master

commit aeac73a0663650efcab96828452753e2db42a7b1
Author: Fernando Royo <email address hidden>
Date: Mon May 13 10:35:11 2024 +0200

    Return DELETED status when deleting a nonexistent member

    This patch changes the provisioning_status returned to octavia-api
    for the deletion operation of a member that doesn't exist associated
    with a pool. Instead of returning ERROR for not having located it,
    we will return DELETED to sync OVN DB with Octavia DB. This way,
    the user won't be able to perform unnecessary UPDATE/DELETE
    operations on this member in the future.

    Closes-Bug: #2065566
    Change-Id: Id355fcb0ad5b66bf646be2e4ccbdacf1b40c1d7c

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/2024.1)

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

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

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

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

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

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

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/920026
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/4df7858fced0c34cb431f194a31c21eb8ff2fdf3
Submitter: "Zuul (22348)"
Branch: stable/2024.1

commit 4df7858fced0c34cb431f194a31c21eb8ff2fdf3
Author: Fernando Royo <email address hidden>
Date: Mon May 13 10:35:11 2024 +0200

    Return DELETED status when deleting a nonexistent member

    This patch changes the provisioning_status returned to octavia-api
    for the deletion operation of a member that doesn't exist associated
    with a pool. Instead of returning ERROR for not having located it,
    we will return DELETED to sync OVN DB with Octavia DB. This way,
    the user won't be able to perform unnecessary UPDATE/DELETE
    operations on this member in the future.

    Closes-Bug: #2065566
    Change-Id: Id355fcb0ad5b66bf646be2e4ccbdacf1b40c1d7c
    (cherry picked from commit aeac73a0663650efcab96828452753e2db42a7b1)

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

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

commit df6210c0469557602137e4b107f60da00491d8b7
Author: Fernando Royo <email address hidden>
Date: Mon May 13 10:35:11 2024 +0200

    Return DELETED status when deleting a nonexistent member

    This patch changes the provisioning_status returned to octavia-api
    for the deletion operation of a member that doesn't exist associated
    with a pool. Instead of returning ERROR for not having located it,
    we will return DELETED to sync OVN DB with Octavia DB. This way,
    the user won't be able to perform unnecessary UPDATE/DELETE
    operations on this member in the future.

    Closes-Bug: #2065566
    Change-Id: Id355fcb0ad5b66bf646be2e4ccbdacf1b40c1d7c
    (cherry picked from commit aeac73a0663650efcab96828452753e2db42a7b1)

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

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/920028
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/9f2f9085977fcda3cbed6812a99072136be39541
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 9f2f9085977fcda3cbed6812a99072136be39541
Author: Fernando Royo <email address hidden>
Date: Mon May 13 10:35:11 2024 +0200

    Return DELETED status when deleting a nonexistent member

    This patch changes the provisioning_status returned to octavia-api
    for the deletion operation of a member that doesn't exist associated
    with a pool. Instead of returning ERROR for not having located it,
    we will return DELETED to sync OVN DB with Octavia DB. This way,
    the user won't be able to perform unnecessary UPDATE/DELETE
    operations on this member in the future.

    Closes-Bug: #2065566
    Change-Id: Id355fcb0ad5b66bf646be2e4ccbdacf1b40c1d7c
    (cherry picked from commit aeac73a0663650efcab96828452753e2db42a7b1)

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.