Cinder backup-restore failed if using --volume

Bug #1811002 reported by mhg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Invalid
Medium
mhg

Bug Description

Brief Description
-----------------
Attempt to restore Cinder Volumes using CLI cinder-backup restore --volume failed with error message:

ERROR: No volume with a name or ID of '7bfa5f38-5fb2-4d58-8f56-2a4e9c57eb9a' exists.

Severity
--------
Major

Steps to Reproduce
------------------
1 install a storage lab
2 make sure no cinder volumes existing (delete them if any)
3 backup system
4 backup cinder volumes
5 delete cinder volumes
6 reinstall all nodes except storage nodes2
7 restore system/images
8 restore controller-1
9 restore compute nodes
10 backup-import :
    cinder backup-import cinder.backup.drivers.posix <url_from_backup-export>
11 create an empty rbd image for the volume with the same size
   rbd create --pool cinder-volumes --image volume-e01f570e-4893-41db-aa4b-11ae0d90ba4b --size 2G
12 restore the VOLUME from 'cinder backup'
    [wrsroot@controller-0 ~(keystone_admin)]$ cinder backup-restore --volume e01f570e-4893-41db-aa4b-11ae0d90ba4b 3609b2fa-5b0f-4b49-9377-3056d71e94a3

Expected Behavior
------------------
The CLI passed without errors and the Cinder Volume was restored to 'available' status

Actual Behavior
----------------
The CLI errored:
ERROR: No volume with a name or ID of 'e01f570e-4893-41db-aa4b-11ae0d90ba4b' exists.

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Dedicated storage

Branch/Pull Time/Commit
-----------------------
master as of build-date-time
StarlingX_Upstream as of 2019-01-02_20-18-00

Timestamp/Logs
--------------
Tue Jan 8 19:44:39 UTC 2019

mhg (marvinhg)
description: updated
description: updated
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marking as release gating; related to the cinder B&R feature test

Changed in starlingx:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Wei Zhou (wzhou007)
tags: added: stx.2019.03 stx.distro.openstack
Ken Young (kenyis)
tags: added: stx.2019.05
removed: stx.2019.03
Frank Miller (sensfan22)
Changed in starlingx:
status: Triaged → Invalid
Revision history for this message
Frank Miller (sensfan22) wrote :

Analysis from Wei indicates an incorrect procedure was used. Description of issue and proper procedure is listed below:

This is the test case that the reporter was trying to do:

1 install a storage lab
2 make sure no cinder volumes existing (delete them if any)
3 backup system
4 create a cinder volume vol_1
5 backup cinder volume vol_1 (cinder backup-create xxx) and export the backup metadata (cinder backup-export xxx)
6 transfer and store cinder volume backup somewhere
7 delete cinder volume vol_1 and its backup metadata from the lab
8 reinstall all nodes except storage nodes
9 restore system/images
10 restore controller-1
11 restore compute nodes
12 Import cinder volume vol_1 backup metadata (cinder backup-import xxx)
    cinder backup-import cinder.backup.drivers.posix eyJzdGF0dXMiOiAiYXZhaWxhYmxlIiwgInRlbXBfc25hcHNob3RfaWQiOiBudWxsLCAiZGlzcGxheV9uYW1lIjogImZyZWVfdm9sX2JhY2t1cF9lMF8wYmE0YiIsICJhdmFpbGFiaWxpdHl
13 create an empty rbd image for the volume with the same size
   rbd create --pool cinder-volumes --image volume-e01f570e-4893-41db-aa4b-11ae0d90ba4b --size 2G
14 restore the VOLUME from 'cinder backup'
    [wrsroot@controller-0 ~(keystone_admin)]$ cinder backup-restore --volume e01f570e-4893-41db-aa4b-11ae0d90ba4b 3609b2fa-5b0f-4b49-9377-3056d71e94a3

At this point the following error was reported:

ERROR: No volume with a name or ID of 'e01f570e-4893-41db-aa4b-11ae0d90ba4b' exists.

Because the cinder volume was not in the cinder DB at system backup time (step 3) and it was not in the ceph pool at restore time (step 7), this volume can only be restored to a new volume that will have a different UUID. This means step 13 is not needed and step 14 should be modified as:

step 14: restore the cinder volume vol_1 to a new volume:
    [wrsroot@controller-0 ~(keystone_admin)]$ cinder backup-restore --name vol_1 3609b2fa-5b0f-4b49-9377-3056d71e94a3

The new volume vol_1 has the same content as the original volume vol_1 but with a different uuid. The error reported is expected behavior and not a software bug.

Changed in starlingx:
assignee: Wei Zhou (wzhou007) → mhg (marvinhg)
Ken Young (kenyis)
tags: added: stx.2.0
removed: stx.2019.05
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.