VMware: restore backup should work for volumes with snapshots

Bug #1376208 reported by satyadev svn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Medium
Vipin Balachandran

Bug Description

volume status is not coming back to 'available' from 'restoring_backup' for restore operation for volumes with snapshot.

test setps :
1) Create volume say vol1
2) Attach & detach above volume to instance
3) now take a snapshot volume- vol1
4) now try to restore any back to above volume

expected : restore should fail and volume status also in available after restore failure.

actual : Target volume status is NOT coming back to 'aviliable' from 'error_restoring' for 'backup-restore' operation for voulmes with snapshot

ssatya@pr-devstack:~/devstack$ cinder create 1
+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2014-09-30T08:02:47.000000 |
| description | None |
| encrypted | False |
| id | 7bccf85f-e14b-4230-9917-183d5edf6e1c |
| metadata | {} |
| name | None |
| os-vol-host-attr:host | None |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 74562aa6231841869274ad9c0b3f3abb |
| os-volume-replication:driver_data | None |
| os-volume-replication:extended_status | None |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| user_id | da7ab4f87b994c2a9837c93765bddb4e |
| volume_type | None |
+---------------------------------------+--------------------------------------+
ssatya@pr-devstack:~/devstack$ nova list
nova +--------------------------------------+---------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+---------+--------+------------+-------------+------------------+
| f68e43bd-8490-4c2f-bf13-7f1f1fff2e23 | testvm1 | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+---------+--------+------------+-------------+------------------+
ssatya@pr-devstack:~/devstack$ nova volume-attach f68e43bd-8490-4c2f-bf13-7f1f1fff2e23 7bccf85f-e14b-4230-9917-183d5edf6e1c
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/sdb |
| id | 7bccf85f-e14b-4230-9917-183d5edf6e1c |
| serverId | f68e43bd-8490-4c2f-bf13-7f1f1fff2e23 |
| volumeId | 7bccf85f-e14b-4230-9917-183d5edf6e1c |
+----------+--------------------------------------+
ssatya@pr-devstack:~/devstack$ nova volume-de
volume-delete volume-detach
ssatya@pr-devstack:~/devstack$ nova volume-detach f68e43bd-8490-4c2f-bf13-7f1f1fff2e23 7bccf85f-e14b-4230-9917-183d5edf6e1c
ssatya@pr-devstack:~/devstack$ cinder snapshot-create 7bccf85f-e14b-4230-9917-183d5edf6e1c --name vol_snap
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| created_at | 2014-09-30T08:04:15.241641 |
| description | None |
| id | 864d2090-5ede-4b55-a5e9-624be4775c2d |
| metadata | {} |
| name | vol_snap |
| size | 1 |
| status | creating |
| volume_id | 7bccf85f-e14b-4230-9917-183d5edf6e1c |
+-------------+--------------------------------------+
ssatya@pr-devstack:~/devstack$ cinder snapshot-list
+--------------------------------------+--------------------------------------+----------------+---------------------+------+
| ID | Volume ID | Status | Name | Size |
+--------------------------------------+--------------------------------------+----------------+---------------------+------+
| 4d344293-c633-4cb7-9b9b-79a1f7461369 | 2fae328e-c824-47d6-9bc5-94172f4fd66f | error_deleting | def_vol_image_snap1 | 1 |
| 864d2090-5ede-4b55-a5e9-624be4775c2d | 7bccf85f-e14b-4230-9917-183d5edf6e1c | available | vol_snap | 1 |
+--------------------------------------+--------------------------------------+----------------+---------------------+------+
ssatya@pr-devstack:~/devstack$ cinder backup-list
+--------------------------------------+--------------------------------------+-----------+------------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+------------------+------+--------------+---------------+
| 4200b860-739d-4a8c-8541-c0eda1df5cf2 | 44a9106f-e432-449e-a5fb-f76888f0fad8 | available | image_vol_backup | 1 | 2 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+------------------+------+--------------+---------------+
ssatya@pr-devstack:~/devstack$ cinder backup-restore 4200b860-739d-4a8c-8541-c0eda1df5cf2 --volume 864d2090-5ede-4b55-a5e9-624be4775c2d
ERROR: Not Found (HTTP 404) (Request-ID: req-16f1d46a-de7b-4bcd-b202-058cf3794144)
ssatya@pr-devstack:~/devstack$ cinder backup-restore 4200b860-739d-4a8c-8541-c0eda1df5cf2 --volume 7bccf85f-e14b-4230-9917-183d5edf6e1c
ssatya@pr-devstack:~/devstack$ cinder list
+--------------------------------------+-----------------+---------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------------+---------------+------+-------------+----------+-------------+
| 2fae328e-c824-47d6-9bc5-94172f4fd66f | available | def_vol_image | 1 | def | true | |
| 7bccf85f-e14b-4230-9917-183d5edf6e1c | error_restoring | None | 1 | None | false | |
+--------------------------------------+-----------------+---------------+------+-------------+----------+-------------+

Tags: drivers vmware
Revision history for this message
satyadev svn (svnsatya) wrote :
Revision history for this message
John Griffith (john-griffith) wrote :

Snapshot shouldn't impact backup or restore of a volume. What driver are you using here?

Revision history for this message
Duncan Thomas (duncan-thomas) wrote :

> test setps :
> 1) Create volume say vol1
> 2) Attach & detach above volume to instance
> 3) now take a snapshot volume- vol1
> 4) now try to restore any back to above volume
>
> expected : restore should fail and volume status also in available after restore failure.

That is *not* the expected behaviour - the expected behaviour is that the restore should work just fine, and does with LVM. What driver are you using?

Revision history for this message
Mike Perez (thingee) wrote : Re: Volume is not available after restoring from snapshot

Waiting to hear back from reporter with more information.

summary: - status of volume is not in 'aviliable' after restore operation for
- volume with snapshot
+ Volume is not available after restoring from snapshot
Changed in cinder:
status: New → Incomplete
Revision history for this message
satyadev svn (svnsatya) wrote : Re: Volumes [having snapshots] is not in 'available' state after restoring from snapshot

local.conf :

volume_driver = cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver

summary: - Volume is not available after restoring from snapshot
+ Volumes [having snapshots] is not in 'available' state after restoring
+ from snapshot
Revision history for this message
Duncan Thomas (duncan-thomas) wrote :

"error_restoring" can only be set by the backup manager. Please provide the cinder-backup logs for further debugging.

Revision history for this message
Vipin Balachandran (vbala) wrote :

In the case of VMDK driver, a volume snapshot means virtual disk snapshot-- each snapshot creates a link (redo log disk) in the virtual disk chain. With current vCenter API, it is not possible to replace the contents of a virtual disk without losing the snapshot information. Therefore, we disallow restore operations to a volume with snapshots.

Revision history for this message
satyadev svn (svnsatya) wrote :
Changed in cinder:
status: Incomplete → New
Revision history for this message
satyadev svn (svnsatya) wrote :

updated news logs and move status to new

Revision history for this message
Vincent Hou (houshengbo) wrote :

If this is a unique issue for VMDK driver and it is not possible to fix in an easy way, I suggest add documentation about this limitation of restoring backup. Otherwise, it will lead to more confusion.

Mike Perez (thingee)
tags: added: drivers vmware
Revision history for this message
Vipin Balachandran (vbala) wrote :

Vincent, this limitation is already documented.

Duncan:
Changing the summary and using this bug to track the limitation.

summary: - Volumes [having snapshots] is not in 'available' state after restoring
- from snapshot
+ VMware: restore backup should work for volumes with snapshots
Changed in cinder:
importance: Undecided → Medium
assignee: nobody → Vipin Balachandran (vbala)
status: New → Confirmed
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Cleanup

Closing stale bug. If this is still an issue please reopen.

Changed in cinder:
status: Confirmed → Invalid
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.