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)
Reviewed: https:/ /review. opendev. org/c/openstack /glance/ +/848994 /opendev. org/openstack/ glance/ commit/ fc9a53d257babf0 ef7f0bec12ffff4 6fc570910b
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit fc9a53d257babf0 ef7f0bec12ffff4 6fc570910b
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 type_associatio ns list. The latter re-queries
namespace list operation, we will fail the list with NotFound if we
try to pull the resource_
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 507d2aec44c5b38 2a72f232571 96f45ada9271e53 2068557b8a) 72b59b2d18b7869 4ce0879aa0)
Change-Id: I09fc9164a08f42
(cherry picked from commit 35e6c57bc903657
(cherry picked from commit cc98dbef31be303