[Rdo-list] cinder retype and QoS
Kashyap Chamarthy
kchamart at redhat.com
Wed Nov 19 17:36:13 UTC 2014
[. . .]
> 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 :)
If you have time, you might want to submit an upstream review
request and let the CI infrastructure handle that for you.
--
/kashyap
>
> —>
> # 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