From: Duncan Thomas Date: Wed, 3 Sep 2014 18:07:14 +0000 (+0100) Subject: During a restore send the restore request to the right host X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=90bbed483618505620346255d0f1f3eeb539fea0;p=openstack-build%2Fcinder-build.git During a restore send the restore request to the right host For restore from LVM volumes to work, the restore must be done on the host that serves the volume, since local_path is used in the restore code. Change-Id: Iad1fb5588b8365a0a165754389340bca3f1830b5 Closes-Bug: #1365065 --- diff --git a/cinder/backup/api.py b/cinder/backup/api.py index 8bc290122..f262ce286 100644 --- a/cinder/backup/api.py +++ b/cinder/backup/api.py @@ -246,8 +246,10 @@ class API(base.Base): self.db.backup_update(context, backup_id, {'status': 'restoring'}) self.db.volume_update(context, volume_id, {'status': 'restoring-backup'}) + + volume_host = volume_utils.extract_host(volume['host'], 'host') self.backup_rpcapi.restore_backup(context, - backup['host'], + volume_host, backup['id'], volume_id)