Bug 1394651

Summary: [RFE] Enable Cinder retype with Ceph backend and extra_specs defined
Product: Red Hat OpenStack Reporter: Edu Alcaniz <ealcaniz>
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Tzach Shefi <tshefi>
Severity: high Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: broose, cschwede, eharney, gcharot, jobernar, mburns, molasaga, scohen, srevivo, tshefi, vumrao
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: scohen: needinfo+
scohen: needinfo+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-30 11:58:29 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:
Bug Depends On: 1262068, 1640385    
Bug Blocks:    

Description Edu Alcaniz 2016-11-14 07:10:22 UTC
Description of problem:
we have three cinder volume types:

# cinder extra-specs-list
+--------------------------------------+----------+---------------------------------------+
|                  ID                  |   Name   |              extra_specs              |
+--------------------------------------+----------+---------------------------------------+
| 5647cd57-83b9-4aac-87e0-169674908d5f |   ssd    |    {u'volume_backend_name': u'SSD'}   |
| 96fc9eb7-3be3-40b0-8252-11afb0935e10 | standard | {u'volume_backend_name': u'STANDARD'} |
| e05d9746-8652-4001-8846-21da0d98da35 |  hiperf  | {u'volume_backend_name': u'STANDARD'} |
+--------------------------------------+----------+---------------------------------------+
# cinder qos-list
+--------------------------------------+----------+-----------+----------------------------------------------------------------------------------------------------------------------------+
|                  ID                  |   Name   |  Consumer |                                                           specs                                                            |
+--------------------------------------+----------+-----------+----------------------------------------------------------------------------------------------------------------------------+
| 7eed580f-a639-461b-acb6-07c9144ffe68 |  hiperf  | front-end | {u'read_bytes_sec': u'104857600', u'write_iops_sec': u'2000', u'write_bytes_sec': u'104857600', u'read_iops_sec': u'2000'} |
| e8c1da99-566c-4511-b417-6c6d8424a44c | standard | front-end |   {u'read_bytes_sec': u'52428800', u'write_iops_sec': u'100', u'write_bytes_sec': u'52428800', u'read_iops_sec': u'100'}   |
+--------------------------------------+----------+-----------+----------------------------------------------------------------------------------------------------------------------------+

We would like to be able to retype/migrate cinder volumes along different cinder volume types. When we try to retype a volume, we can see the following error in cinder-volume logs:

2016-11-10 13:37:11.834 28297 ERROR cinder.volume.drivers.rbd [req-f2164a95-6dbd-4382-98fd-dd36492c2401 - - - - -] Retype of extra_specs not supported
.
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher [req-f2164a95-6dbd-4382-98fd-dd36492c2401 - - - - -] Exception during message handli
ng: Volume migration failed: Retype requires migration but is not allowed.
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142
, in _dispatch_and_reply
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher     executor_callback))
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186
, in _dispatch
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher     executor_callback)
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129
, in _do_dispatch
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapp
er
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher     return f(*args, **kwargs)
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 2131, in re
type
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher     raise exception.VolumeMigrationFailed(reason=msg)
2016-11-10 13:37:12.017 28297 ERROR oslo_messaging.rpc.dispatcher VolumeMigrationFailed: Volume migration failed: Retype requires migration but is not
 allowed.

When we retype volumes from standard cinder type to hiperf cinder type, we are only changing the volume qos. When we retype volumes from standard to ssd, we are also changing the backend type so we would need the cinder migration command to work properly.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Edu Alcaniz 2017-01-25 12:29:33 UTC
could we update the target of this RFE please

Comment 5 Red Hat Bugzilla Rules Engine 2017-02-08 14:36:15 UTC
This bugzilla has been removed from the release and needs to be reviewed and Triaged for another Target Release.

Comment 6 Jon Bernard 2017-03-28 15:17:20 UTC
From the output above, it looks like a retype is being executed without setting the on-demand migration policy.  Since the retype will require a migration to satisfy the request, without on-demand the retype operation will fail.  Can we try adding '--migration-policy on-demand' to the retype command (or the API equivalent depending on your entry point).

Comment 7 Edu Alcaniz 2017-05-08 08:29:13 UTC
(In reply to Jon Bernard from comment #6)
> From the output above, it looks like a retype is being executed without
> setting the on-demand migration policy.  Since the retype will require a
> migration to satisfy the request, without on-demand the retype operation
> will fail.  Can we try adding '--migration-policy on-demand' to the retype
> command (or the API equivalent depending on your entry point).

Thanks Jon. how we could continue to resolve this BZ?

Comment 10 Jon Bernard 2020-04-09 21:02:19 UTC
(In reply to Edu Alcaniz from comment #7)
> (In reply to Jon Bernard from comment #6)
> > From the output above, it looks like a retype is being executed without
> > setting the on-demand migration policy.  Since the retype will require a
> > migration to satisfy the request, without on-demand the retype operation
> > will fail.  Can we try adding '--migration-policy on-demand' to the retype
> > command (or the API equivalent depending on your entry point).
> 
> Thanks Jon. how we could continue to resolve this BZ?

It would be helpful to know exactly how the retype was requested, exactly what options or parameters were supplied.  If it was done on the command line, that command in its entirety would help.  I don't see logs attached to the case, do you have more from the paste included in the description?  It looks from what is available that a migration is required to satisfy the retype request, but the request did not specify that migration should be allowed - so it was rejected.  This may not be a bug, it's hard to tell without the command that started it and the resulting logs.

(Sorry for the delay, things have been a bit crazy lately)

Comment 11 Gregory Charot 2021-07-30 11:58:29 UTC
closing this BZ, retype with migration is supported, we don't have enough data to fulfill the request.

If you believe this has been closed in error, please re-open and provide a comment telling us why this bug is important to you and provide a link to your active support case.