Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/

Bug 1139907

Summary: Fail to backup-restore across storage-availability-zone
Product: [Community] RDO Reporter: Etsuji Nakai <enakai>
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED CURRENTRELEASE QA Contact: nlevinki <nlevinki>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: eharney, yeylon
Target Milestone: RC   
Target Release: Juno   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-28 23:26:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Setting host argument as volume['host'] none

Description Etsuji Nakai 2014-09-10 01:15:01 UTC
Created attachment 935956 [details]
Setting host argument as volume['host']

Description of problem:

Under multile storage-availavility-zone configuration (for example, az1, az2),
volume backup from az1 cannot restored to an existing volume on az2.

Version-Release number of selected component (if applicable):

Havana release

# rpm -qa | grep cinder
python-cinderclient-1.0.7-2.fc20.noarch
openstack-cinder-2013.2.3-1.fc20.noarch
python-cinder-2013.2.3-1.fc20.noarch

How reproducible:

# cinder create --display-name az1-vol --availability-zone az1 1
# cinder backup-create --display-name az1-vol-backup az1-vol
# cinder create --display-name az2-vol --availability-zone az2 1
# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 51c9c0e3-916f-438b-87de-91e223afc51f | available |   az1-vol    |  1   |     None    |  false   |             |
| a7270da5-8c03-4d2d-afae-53590702691e | available |   az2-vol    |  1   |     None    |  false   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
# cinder backup-list
+--------------------------------------+--------------------------------------+-----------+----------------+------+--------------+----------------+
|                  ID                  |              Volume ID               |   Status  |      Name      | Size | Object Count |   Container    |
+--------------------------------------+--------------------------------------+-----------+----------------+------+--------------+----------------+
| d960c5d0-ea19-4c5f-a00e-6ba2c04cbaa1 | 51c9c0e3-916f-438b-87de-91e223afc51f | available | az1-vol-backup |  1   |      22      | volumes_backup |
+--------------------------------------+--------------------------------------+-----------+----------------+------+--------------+----------------+

# cinder backup-restore --volume-id a7270da5-8c03-4d2d-afae-53590702691e d960c5d0-ea19-4c5f-a00e-6ba2c04cbaa1


Actual results:
# cinder list
+--------------------------------------+-----------------+--------------+------+-------------+----------+-------------+
|                  ID                  |      Status     | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------------+--------------+------+-------------+----------+-------------+
| 51c9c0e3-916f-438b-87de-91e223afc51f | error_restoring |   az1-vol    |  1   |     None    |  false   |             |
| a7270da5-8c03-4d2d-afae-53590702691e |    available    |   az2-vol    |  1   |     None    |  false   |             |
+--------------------------------------+-----------------+--------------+------+-------------+----------+-------------+

Expected results:
backup-restore should be succeed without error.

Additional info:
I found the root cause of this problem. See the attached for a patch.

The logic is as below:
The current code calls the restore_backup method with the host argument as backup['host'].
This means the cinder-volume on the host of the original volume (az1) tries to restore the backup to the specified volume.
But the specified volume is under the different host (az2).
Instead of setting host argument as backup['host'], it should be volume['host'].

Comment 1 Eric Harney 2014-09-10 13:21:06 UTC
This same fix just landed upstream independently, queued for Juno rc1.