A list comprehension in volume manager can raise IndexError due
to unsafe assumption of input. This change fix it by not assuming
list comprehension always return none empty list. This also fixes
a snapshot DB call by using OVO.
Change-Id: I83e8ac8dcf9e84b37847d6eb09065d55e843f82e
Closes-bug: #1628340
(cherry picked from commit d96fb9a10135df062732279bac2d7eb6073872b0)
Reviewed: https:/ /review. openstack. org/379775 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=6079b7b0b90 98e96b903d39e5d 27803c9c97a5a0
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 6079b7b0b9098e9 6b903d39e5d2780 3c9c97a5a0
Author: Zhiteng Huang <email address hidden>
Date: Tue Sep 27 19:31:59 2016 -0700
Fix IndexError in volume manager
A list comprehension in volume manager can raise IndexError due
to unsafe assumption of input. This change fix it by not assuming
list comprehension always return none empty list. This also fixes
a snapshot DB call by using OVO.
Change-Id: I83e8ac8dcf9e84 b37847d6eb09065 d55e843f82e 62732279bac2d7e b6073872b0)
Closes-bug: #1628340
(cherry picked from commit d96fb9a10135df0