]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Check enabled backup service before rpc request
authorxiaoxi_chen <xiaoxi.chen@intel.com>
Thu, 11 Jul 2013 07:22:04 +0000 (15:22 +0800)
committerxiaoxi_chen <xiaoxi.chen@intel.com>
Thu, 11 Jul 2013 22:06:04 +0000 (06:06 +0800)
commitdbb854635fdb988e28acf87d221fa278e6cb8c0c
tree6b838d6fc7eb7fb29019714d3f9849d1e9f04dd4
parentbc4af720e21f334c8d536031efcde12026e56cfc
Check enabled backup service before rpc request

In previous code we didn't check whether we have an enabled
backup service there before we send out the rpc request,
results that if no enabled backup service there,the volume will
stays in "backing-up" state and the backup will stays in "creating".

This patch fixed this issue, we exam whether at least an appropriate
(same host,az as the volume and is_alive) backup service available
before we do the rpc request.

Fixes: bug #1200040
Change-Id: I77154528f489ed20f7b784e6fcefccf15dc81d1d
cinder/api/contrib/backups.py
cinder/backup/api.py
cinder/tests/api/contrib/test_backups.py