Cinder did not update '_name_id' and 'provider_location' for drivers if driver implements update_migrated_volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Peter Wang |
Bug Description
Currently, Cinder will update '_name_id' and 'provider_location' when drivers don't implement update_
when host-assisted migration has done.
when drivers implemented 'update_
Cinder will not copy '_name_id' and 'provider_location' to the migrated volume, fields of _name_id and provider_location in migrated volume are left empty.
Above behavior seems break previous host-assisted migration behavior.
since '_name_id' and 'provider_location' are critical for drivers to locate the underlying LUNs in the back-ends, and for keeping back-port compatiblity, we need to copy theses values anyway, and in this way.
here is the code snippets from cinder/
def update_
"""Finalize migration process on backend device."""
try:
except NotImplementedE
# If update_
# _name_id and provider_location will be set with the values
# from new_volume.
if model_update:
# Swap keys that were changed in the source so we keep their values
# in the temporary volume's DB record.
this behavior is introduced by :
https:/
Another problems of above code snippet is
if driver return 'metadata' or 'admin_metadata' to update meta table
will throw exception in attached log since volume does not have 'metadata' or 'admin_metadata'
I am going to provide a fix for this soon.
Changed in cinder: | |
assignee: | nobody → Peter Wang (peter.wang) |
summary: |
- Cinder did not update '_name_id' and 'provider_location' for drivers + Cinder did not update '_name_id' and 'provider_location' for drivers if + driver implements update_migrated_volume |
Changed in cinder: | |
status: | New → In Progress |
Changed in cinder: | |
milestone: | none → liberty-rc1 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | liberty-rc1 → 7.0.0 |
Reviewed: https:/ /review. openstack. org/217522 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=20ac9cac728 4f009929cfd6e5c e79f34bccffce8
Committed: https:/
Submitter: Jenkins
Branch: master
commit 20ac9cac7284f00 9929cfd6e5ce79f 34bccffce8
Author: peter_wang <email address hidden>
Date: Fri Aug 21 01:33:44 2015 -0400
Fix issue of volume after host-assisted migration
In host-assisted migration, Cinder framework currently doesn't migrated_ volume
update name_id and provider_location when the driver doesn't provide
name_id or provider_location in update_
This changes previous Cinder behavior which will update name_id and location anyway. Any operation against this volume will not
provider_
be successful; for example, volume deletion cannot delete it's
underlying LUN.
This fix will update name_id and provider_location if driver doesn't
return them.
Closes-Bug: #1487952 909c027e6df99cf f9bbeef5e48
Change-Id: Ice72fc792f0ea8