]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix allocated_capacity tracking when rescheduling
authorMichal Dulko <michal.dulko@intel.com>
Thu, 12 Feb 2015 08:39:08 +0000 (09:39 +0100)
committerMichal Dulko <michal.dulko@intel.com>
Fri, 6 Mar 2015 09:36:15 +0000 (10:36 +0100)
commitad02f8208b76b27513ca8a8c21b255d98080d8b3
tree064e0c999f6b156ab5923f64ade7712fc0768171
parent35b1a03a4539d2e7c61d261ce800a241e603d65c
Fix allocated_capacity tracking when rescheduling

This aims to fix capacity tracking in the manager in case of
rescheduling. Idea is to inject information if volume was rescheduled
into the exception passed up so manager can decide if incrementing
allocated_capacity is needed. Then in the manager finally block is used
to make sure that allocated_capacity is incremented in case of failure
that haven't triggered rescheduling. Also adding two unit tests checking
if tracking is correct.

Closes-Bug: 1408763

Change-Id: Icd6b04ac60c17cbda225d3be8bcc4435ea0cd7a8
cinder/tests/test_volume.py
cinder/volume/flows/manager/create_volume.py
cinder/volume/manager.py