This situation also appears in other methods of cinder.
Is it right?
发件人: Zhangyanzi [mailto:[email protected]]
发送时间: 2013年10月31日 10:20
收件人: [email protected]
抄送: [email protected]
主题: [Openstack] cinder reserve unreserve volume dispose different fot the same
situation
In reserve volume:
def reserve_volume(self, context, volume):
…………
if volume['status'] == 'available':
self.update(context, volume, {"status": "attaching"})
else:
msg = _("Volume status must be available to reserve")
LOG.error(msg)
raise exception.InvalidVolume(reason=msg)
In unserve volume:
def unreserve_volume(self, context, volume):
if volume['status'] == "attaching":
self.update(context, volume, {"status": "available"})
Why not raise exception in unreserve_volume, when volume['status']!= "attaching"
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : [email protected]
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack