Metadata not cleared when restore from a backup that no metadata .

Bug #1686321 reported by wanghongxu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Incomplete
Undecided
Sean McGinnis

Bug Description

[stack@devstack devstack]$ cinder create --name test-restore 1
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2017-04-26T05:57:24.000000 |
| description | None |
| encrypted | False |
| id | 332523cc-6fc8-4fa2-a6e1-226617ca9442 |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | test-restore |
| 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 | f0e2390172e64c30b25e42ebfa338393 |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| updated_at | None |
| user_id | 2d5976483df14734b0d22d43841535cb |
| volume_type | lvmdriver-1 |
+--------------------------------+--------------------------------------+

[stack@devstack devstack]$ cinder backup-create --name test-restore 332523cc-6fc8-4fa2-a6e1-226617ca9442
+-----------+--------------------------------------+
| Property | Value |
+-----------+--------------------------------------+
| id | 926ccb79-1583-47a9-95e0-e057b31f562f |
| name | test-restore |
| volume_id | 332523cc-6fc8-4fa2-a6e1-226617ca9442 |
+-----------+--------------------------------------+

[stack@devstack devstack]$ cinder metadata 332523cc-6fc8-4fa2-a6e1-226617ca9442 set something=true

[stack@devstack devstack]$ cinder backup-restore 926ccb79-1583-47a9-95e0-e057b31f562f --volume 332523cc-6fc8-4fa2-a6e1-226617ca9442
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| backup_id | 926ccb79-1583-47a9-95e0-e057b31f562f |
| volume_id | 332523cc-6fc8-4fa2-a6e1-226617ca9442 |
| volume_name | test-restore |
+-------------+--------------------------------------+

[stack@devstack devstack]$ cinder show 332523cc-6fc8-4fa2-a6e1-226617ca9442
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2017-04-26T05:57:24.000000 |
| description | None |
| encrypted | False |
| id | 332523cc-6fc8-4fa2-a6e1-226617ca9442 |
| metadata | {'something': 'true'} |
| migration_status | None |
| multiattach | False |
| name | test-restore |
| os-vol-host-attr:host | devstack@lvmdriver-1#lvmdriver-1 |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | f0e2390172e64c30b25e42ebfa338393 |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2017-04-26T05:59:40.000000 |
| user_id | 2d5976483df14734b0d22d43841535cb |
| volume_type | lvmdriver-1 |
+--------------------------------+--------------------------------------+

Changed in cinder:
assignee: nobody → wanghongxu (wang19930902)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/460072

Changed in cinder:
status: New → In Progress
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Assignee Expired

Unassigning due to no activity for > 6 months.

Changed in cinder:
assignee: wanghongxu (wang19930902) → nobody
status: In Progress → Triaged
Changed in cinder:
assignee: nobody → Sean McGinnis (sean-mcginnis)
status: Triaged → In Progress
Revision history for this message
Eric Harney (eharney) wrote :

Neither this patch nor the bug make the case that this is the right thing to do.

If metadata is for user tagging of volumes, and a user creates a volume with a particular tag (metadata), why would we wipe it unnecessarily when restoring a backup that has no conflicting metadata?

I think this needs more design thought before assuming the current behavior is wrong.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/460072

Changed in cinder:
status: In Progress → Incomplete
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.