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/379776 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=5b22d174d6f eed70c92556af48 546b22aec1e86d
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit 5b22d174d6feed7 0c92556af48546b 22aec1e86d
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