[Rdo-list] cinder retype and QoS
Arne Wiebalck
Arne.Wiebalck at cern.ch
Wed Nov 19 14:20:05 UTC 2014
On 19 Nov 2014, at 13:51, Kashyap Chamarthy <kchamart at redhat.com> wrote:
[snip]
>> Thanks. I saw that change. This and packstack tells me it does not
>> work, at least for a Ceph based backend :)
>
> Hmm, let's see if any Packstack/Cinder developers will weigh in here.
>
>> Also the Cinder code (retype being empty in driver.py and not being
>> overwritten rbd.py points) in that direction.
>>
>> http://redhatstackblog.redhat.com/2014/04/15/whats-new-in-icehouse-storage/
>> gives a slightly different impression IMHO.
>
> I cannot speak for the author of that post, but probably it's talking
> about what's in the upstream. :-)
>From what I understand, retype needs to be implemented on a per driver
level, and that’s simply not the case for the rbd driver yet.
Below is a small patch to the rbd driver that “implements” the retype function
and subsequently allows for QoS changes of Cinder volumes on Ceph.
(Not sure at all if that breaks things elsewhere :)
—>
# diff -u /usr/lib/python2.6/site-packages/cinder/volume/drivers/rbd.py.orig /usr/lib/python2.6/site-packages/cinder/volume/drivers/rbd.py
--- /usr/lib/python2.6/site-packages/cinder/volume/drivers/rbd.py.orig 2014-11-19 11:44:43.739979396 +0100
+++ /usr/lib/python2.6/site-packages/cinder/volume/drivers/rbd.py 2014-11-19 14:28:27.853345650 +0100
@@ -651,6 +651,29 @@
new_name = "%s.deleted" % (volume_name)
self.rbd.RBD().rename(client.ioctx, volume_name, new_name)
+ def retype(self, ctxt, volume, new_type, diff, host):
+ """Retype a volume, QoS change only."""
+ LOG.info('Retype volume request %(vol)s to be %(type)s '
+ '(host: %(host)s), diff %(diff)s.' %
+ {'vol': volume['name'],
+ 'type': new_type,
+ 'host': host,
+ 'diff': diff})
+
+ if volume['host'] != host['host']:
+ LOG.error('Retype with host migration not supported')
+ return False
+
+ if diff['encryption']:
+ LOG.error('Retype of encryption type not supported')
+ return False
+
+ if diff['extra_specs']:
+ LOG.error('Retype of extra_specs not supported')
+ return False
+
+ return True
+
<--
Cheers,
Arne
--
Arne Wiebalck
CERN IT
More information about the dev
mailing list