member subnet handling bug in amphorav1

Bug #2027967 reported by Gregory Thiemonge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
octavia
Confirmed
Medium
Gregory Thiemonge

Bug Description

While working on
815313: Add member test with multiple subnets on same network |
https://review.opendev.org/c/openstack/octavia-tempest-plugin/+/815313

it appears that the new test fails on stable/wallaby
After some investigations, it fails only in amphorav1, but not in amphorav2.

The cause of the failure is that a subnet is not unplugged from the amphora when a member is deleted.
It happens because the provisioning_status of the member is not correct in the octavia objects:

https://opendev.org/openstack/octavia/src/branch/stable/wallaby/octavia/controller/worker/v2/tasks/network_tasks.py#L87-L95

The member object is pulled from the loadbalancer DB object that is injected by taskflow.
The provisioning_status of the member is updated by a previous task but the loadbalancer still contains the old object.

https://opendev.org/openstack/octavia/src/branch/stable/wallaby/octavia/controller/worker/v2/flows/member_flows.py#L77-L81

We need to reload the loadbalancer object in CalculateAmphoraDelta in amphorav1

Changed in octavia:
assignee: nobody → Gregory Thiemonge (gthiemonge)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Gregory Thiemonge (gthiemonge) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to octavia (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/octavia/+/888986
Committed: https://opendev.org/openstack/octavia/commit/68a3379cda266fac649ef984404090d9cfa246ac
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 68a3379cda266fac649ef984404090d9cfa246ac
Author: Gregory Thiemonge <email address hidden>
Date: Mon Jul 17 11:02:08 2023 +0200

    Fix amphorav1 member deletion bug

    When the worker calculates the delta for plugging/unplugging subnets,
    it need to check the provisioning_status of the members. But in
    amphorav1, this status comes from the LB DB object that is passed to
    taskflow. If the provisioning_status is modified by another task
    (MarkMemberPendingDeleteInDb), the LB object is not updated.
    We need to reload it from the DB to get the current status of the
    members.

    Note: this patch is for stable branches only as the amphorav1 driver was
          removed during the Bobcat cycle
    Closes-Bug: #2027967
    Change-Id: Iea0ffee1a7307b0852c5a9faf31739c96e76a7ee
    (cherry picked from commit 8b196bb3bb05c9d87dae688750457dbb944d4d1b)

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

Reviewed: https://review.opendev.org/c/openstack/octavia/+/888987
Committed: https://opendev.org/openstack/octavia/commit/c8bd99e384a5400635285c5bf47a03aba105fc20
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit c8bd99e384a5400635285c5bf47a03aba105fc20
Author: Gregory Thiemonge <email address hidden>
Date: Mon Jul 17 11:02:08 2023 +0200

    Fix amphorav1 member deletion bug

    When the worker calculates the delta for plugging/unplugging subnets,
    it need to check the provisioning_status of the members. But in
    amphorav1, this status comes from the LB DB object that is passed to
    taskflow. If the provisioning_status is modified by another task
    (MarkMemberPendingDeleteInDb), the LB object is not updated.
    We need to reload it from the DB to get the current status of the
    members.

    Note: this patch is for stable branches only as the amphorav1 driver was
          removed during the Bobcat cycle
    Closes-Bug: #2027967
    Change-Id: Iea0ffee1a7307b0852c5a9faf31739c96e76a7ee
    (cherry picked from commit 8b196bb3bb05c9d87dae688750457dbb944d4d1b)
    (cherry picked from commit 68a3379cda266fac649ef984404090d9cfa246ac)

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

Reviewed: https://review.opendev.org/c/openstack/octavia/+/888988
Committed: https://opendev.org/openstack/octavia/commit/48acc66c73d19837aeb1a44dc7949c0390406076
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 48acc66c73d19837aeb1a44dc7949c0390406076
Author: Gregory Thiemonge <email address hidden>
Date: Mon Jul 17 11:02:08 2023 +0200

    Fix amphorav1 member deletion bug

    When the worker calculates the delta for plugging/unplugging subnets,
    it need to check the provisioning_status of the members. But in
    amphorav1, this status comes from the LB DB object that is passed to
    taskflow. If the provisioning_status is modified by another task
    (MarkMemberPendingDeleteInDb), the LB object is not updated.
    We need to reload it from the DB to get the current status of the
    members.

    Note: this patch is for stable branches only as the amphorav1 driver was
          removed during the Bobcat cycle
    Closes-Bug: #2027967
    Change-Id: Iea0ffee1a7307b0852c5a9faf31739c96e76a7ee
    (cherry picked from commit 8b196bb3bb05c9d87dae688750457dbb944d4d1b)
    (cherry picked from commit 68a3379cda266fac649ef984404090d9cfa246ac)
    (cherry picked from commit 13070bd173138189c421c92078bf34ccff7697ab)

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

Reviewed: https://review.opendev.org/c/openstack/octavia/+/888989
Committed: https://opendev.org/openstack/octavia/commit/8447d91b6582d8216e75896121d176ce312c35a8
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 8447d91b6582d8216e75896121d176ce312c35a8
Author: Gregory Thiemonge <email address hidden>
Date: Mon Jul 17 11:02:08 2023 +0200

    Fix amphorav1 member deletion bug

    When the worker calculates the delta for plugging/unplugging subnets,
    it need to check the provisioning_status of the members. But in
    amphorav1, this status comes from the LB DB object that is passed to
    taskflow. If the provisioning_status is modified by another task
    (MarkMemberPendingDeleteInDb), the LB object is not updated.
    We need to reload it from the DB to get the current status of the
    members.

    Note: this patch is for stable branches only as the amphorav1 driver was
          removed during the Bobcat cycle
    Closes-Bug: #2027967
    Change-Id: Iea0ffee1a7307b0852c5a9faf31739c96e76a7ee
    (cherry picked from commit 8b196bb3bb05c9d87dae688750457dbb944d4d1b)
    (cherry picked from commit 68a3379cda266fac649ef984404090d9cfa246ac)
    (cherry picked from commit 13070bd173138189c421c92078bf34ccff7697ab)
    (cherry picked from commit 0b07b39816c5fa0fd2bfe88a3541372918722385)

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.