List call for metadef namespaces returns 404 not found while fetching resource_types

Bug #1973631 reported by Abhishek Kekane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Unassigned

Bug Description

We encountered this issue in our glance-tempest-plugin 'test_list_namespace' test, where while running in parallel mode it tries to fetch resource_type for a namespace which is actually deleted and fails with 404 Not Found error.

Actually while fetching the resource_types associated with namespace if namespace is not exist then it should return empty list rather than raising 404 not found from that point.

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.opendev.org/c/openstack/glance/+/841970
Committed: https://opendev.org/openstack/glance/commit/35e6c57bc90365796f45ada9271e532068557b8a
Submitter: "Zuul (22348)"
Branch: master

commit 35e6c57bc90365796f45ada9271e532068557b8a
Author: Dan Smith <email address hidden>
Date: Mon May 16 11:58:05 2022 -0700

    Fix failing namespace list delete race

    If a namespace is deleted by another client while we are doing a
    namespace list operation, we will fail the list with NotFound if we
    try to pull the resource_type_associations list. The latter re-queries
    the DB for the namespace and will raise NotFound to us. This is
    especially bad because the namespace being deleted need not even
    belong to the caller of the list, as is the case in a tempest run.

    This makes us catch the failure and continue the operation, reporting
    no associations so that the client gets a consistent view and no
    error.

    Closes-Bug: #1973631
    Change-Id: I09fc9164a08f42507d2aec44c5b382a72f232571

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/glance/+/841935

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/glance/+/841935
Committed: https://opendev.org/openstack/glance/commit/cc98dbef31be30372b59b2d18b78694ce0879aa0
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit cc98dbef31be30372b59b2d18b78694ce0879aa0
Author: Dan Smith <email address hidden>
Date: Mon May 16 11:58:05 2022 -0700

    Fix failing namespace list delete race

    If a namespace is deleted by another client while we are doing a
    namespace list operation, we will fail the list with NotFound if we
    try to pull the resource_type_associations list. The latter re-queries
    the DB for the namespace and will raise NotFound to us. This is
    especially bad because the namespace being deleted need not even
    belong to the caller of the list, as is the case in a tempest run.

    This makes us catch the failure and continue the operation, reporting
    no associations so that the client gets a consistent view and no
    error.

    Closes-Bug: #1973631
    Change-Id: I09fc9164a08f42507d2aec44c5b382a72f232571
    (cherry picked from commit 35e6c57bc90365796f45ada9271e532068557b8a)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 24.1.0

This issue was fixed in the openstack/glance 24.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/glance/+/848994

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

Reviewed: https://review.opendev.org/c/openstack/glance/+/848994
Committed: https://opendev.org/openstack/glance/commit/fc9a53d257babf0ef7f0bec12ffff46fc570910b
Submitter: "Zuul (22348)"
Branch: stable/xena

commit fc9a53d257babf0ef7f0bec12ffff46fc570910b
Author: Dan Smith <email address hidden>
Date: Mon May 16 11:58:05 2022 -0700

    Fix failing namespace list delete race

    If a namespace is deleted by another client while we are doing a
    namespace list operation, we will fail the list with NotFound if we
    try to pull the resource_type_associations list. The latter re-queries
    the DB for the namespace and will raise NotFound to us. This is
    especially bad because the namespace being deleted need not even
    belong to the caller of the list, as is the case in a tempest run.

    This makes us catch the failure and continue the operation, reporting
    no associations so that the client gets a consistent view and no
    error.

    Closes-Bug: #1973631
    Change-Id: I09fc9164a08f42507d2aec44c5b382a72f232571
    (cherry picked from commit 35e6c57bc90365796f45ada9271e532068557b8a)
    (cherry picked from commit cc98dbef31be30372b59b2d18b78694ce0879aa0)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 25.0.0.0b2

This issue was fixed in the openstack/glance 25.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 23.1.0

This issue was fixed in the openstack/glance 23.1.0 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.