yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #15888
[Bug 1275173] Re: _translate_from_glance() can cause an unnecessary HTTP request
** Changed in: nova
Status: Fix Committed => Fix Released
** Changed in: nova
Milestone: None => juno-1
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1275173
Title:
_translate_from_glance() can cause an unnecessary HTTP request
Status in Cinder:
Fix Released
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
I noticed when performing a "nova image-show" on a current (not
deleted) image, two HTTP requests were issued. Why isn't the Image
retrieved on the first GET request?
In fact, it is. The problem lies in _extract_attributes(), called by
_translate_from_glance(). This function loops through a list of
expected attributes, and extracts them from the passed-in Image. The
problem is that if the attribute 'deleted' is False, there won't be a
'deleted_at' attribute in the Image. Not finding the attribute results
in getattr() making another GET request (to try to find the "missing"
attribute?). This is unnecessary of course, since it makes sense for
the Image to not have that attribute set.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1275173/+subscriptions
References