From b7f52a8248cfa26b96d2151301f546085509dfef Mon Sep 17 00:00:00 2001 From: drngsl Date: Mon, 17 Oct 2016 08:08:39 -0400 Subject: [PATCH] _human_id_cache or _uuid_cache error about completion_cache cinderclient raises _human_id_cache or _uuid_cache exception in method completion_cache. Error happend when launching many api request with creating and list volumes on the client host. Change-Id: I5c7de6fbb0a2d5106fca180ae6f940d6b738de93 Closes-Bug: #1634112 --- cinderclient/base.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cinderclient/base.py b/cinderclient/base.py index fd783f0d0..13f1f186c 100644 --- a/cinderclient/base.py +++ b/cinderclient/base.py @@ -297,7 +297,12 @@ class Manager(common_base.HookableMixin): cache = getattr(self, cache_attr, None) if cache: cache.close() - delattr(self, cache_attr) + try: + delattr(self, cache_attr) + except AttributeError: + # NOTE(kiall): If this attr is deleted by another + # operation, don't fail any way. + pass def write_to_completion_cache(self, cache_type, val): cache = getattr(self, "_%s_cache" % cache_type, None)