_translate_from_glance() can cause an unnecessary HTTP request
After returning from a get() call to python-glanceclient, cinder runs a
translation function on the returned Image to get the data it wants. Part of
this process is checking for an expected set of attributes, one of which is
the deletion time ('deleted_at'). However, if the image has not been deleted,
deleted_at key will not exist. This forces another call to glance to occur for
the same image. A similar problem exists for the checksum attribute, which does
not exist before an image is active. The fix here is to only consider
deleted_at and checksum if they are expected to be present.
This change was made in nova as change I67b7dd16
Change-Id: Iedc16cb9316f9610fdb8ac03f448bc375a4e6bfa
Closes-Bug: #1275173
(cherry picked from commit da13c6285bb0aee55cfbc93f55ce2e2b7d6a28f2)
Reviewed: https:/ /review. openstack. org/85374 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=01e5eac3f25 1164096051d43d7 63df72a65d31d3
Committed: https:/
Submitter: Jenkins
Branch: milestone-proposed
commit 01e5eac3f251164 096051d43d763df 72a65d31d3
Author: Chris Buccella <email address hidden>
Date: Thu Apr 3 04:02:45 2014 +0000
_translate_ from_glance( ) can cause an unnecessary HTTP request
After returning from a get() call to python- glanceclient, cinder runs a
translation function on the returned Image to get the data it wants. Part of
this process is checking for an expected set of attributes, one of which is
the deletion time ('deleted_at'). However, if the image has not been deleted,
deleted_at key will not exist. This forces another call to glance to occur for
the same image. A similar problem exists for the checksum attribute, which does
not exist before an image is active. The fix here is to only consider
deleted_at and checksum if they are expected to be present.
This change was made in nova as change I67b7dd16
Change-Id: Iedc16cb9316f96 10fdb8ac03f448b c375a4e6bfa 55cfbc93f55ce2e 2b7d6a28f2)
Closes-Bug: #1275173
(cherry picked from commit da13c6285bb0aee