]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Check cinder-backup service before "backing-up"
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Thu, 5 Sep 2013 04:12:38 +0000 (13:12 +0900)
committerKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Sun, 8 Sep 2013 23:16:17 +0000 (08:16 +0900)
commitd6dc5cdfa40c3a3aff9bca601968e1fb717c8b2b
treeb5c542a1cc85c97c6607f2daceb9b2650a35089f
parent24cbfb3539c91764f92baa801f7ae1f82dc221d4
Check cinder-backup service before "backing-up"

If cinder-backup service is not enabled, "cinder backup-create"
command fails like the following. As the result, the volume status
has been changed to "backing-up" in spite of not backing-up.

$ cinder backup-create f48aa6ae-4c35-4a6a-a393-5a5cf610945a
ERROR: Service cinder-backup could not be found.
$ cinder list
+--+------------+--------------+------+-------------+----------+-------------+
|ID|   Status   | Display Name | Size | Volume Type | Bootable | Attached to |
+--+------------+--------------+------+-------------+----------+-------------+
|..| backing-up |   vol-test   |  1   |     None    |  False   |             |
+--+------------+--------------+------+-------------+----------+-------------+
$

To avoid this situation, this patch moves the cinder-backup check
before changing a volume status to "backing-up".

Fixes bug #1221012

Change-Id: I42ad41e1cfb6fdb7feebe39a9a5f0356a41d7838
cinder/backup/api.py
cinder/tests/api/contrib/test_backups.py