codehaus


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Change Volume Type, but in use


Hi Goutham,

Thanks for your response.

It is correct that I have volumes that are using the volume type I want to
modify. If I understand correctly, modifying volumes types is not possible as
long as there are volumes using the volume type.

Renaming the volume type and creating a new volume type won't work I guess.
Since the backend name in the cinder configuration will be changed, the volumes
that are using the renamed volume type won't able to find the backend and will
fail, not?

I would have the backend named "ssdvolumes" in the cinder configuration. The new
volume type would have the correct backend name (ssdvolumes) but the renamed
volume type would still have "ssd" as its backend name.

Kind regards,
Sinan

> Op 7 november 2019 om 20:47 schreef Goutham Pacha Ravi
> <gouthampravi at gmail.com>:
> 
>     Hey Sinat,
> 
>     The error message suggests that you have volumes that use the volume type
> you're modifying. If yes, with cinder API, since the Rocky release [1], you
> cannot modify volume types that are currently in use. The original design for
> cinder volume types was that they were always mutable - and changes to
> existing volume types didn't affect pre-existing volumes. However, this
> behavior was modified in the Ocata release [2], and finally removed in the
> Rocky release.
> 
>     One of your options is to also rename the existing volume type and create
> a new one if you'd like, with the original name. 
> 
>     [1]
> https://docs.openstack.org/releasenotes/cinder/rocky.html#relnotes-13-0-0-stable-rocky-upgrade-notes
>     [2] https://review.opendev.org/#/c/440680/
>      
> 
>     On Thu, Nov 7, 2019 at 12:33 AM Sinan Polat <sinan at turka.nl
> mailto:sinan at turka.nl > wrote:
> 
>         > > 
> >         Hi,
> > 
> >         I am using Ceph as the backend for Cinder. Within Ceph we have
> > defined 2 RBD pools (ssdvolumes, sasvolumes).
> >         In OpenStack I created 2 Volume Types (ssd, sas). Each Volume Type
> > has property "volume_backend_name='tripleo_ceph_<ssd|sas>'".
> > 
> >         In the Cinder configuration I have the following backends
> > configured:
> > 
> >         [tripleo_ceph_ssd]
> >         backend_host=hostgroup
> >         volume_backend_name=tripleo_ceph_ssd
> >         volume_driver=cinder.volume.drivers.rbd.RBDDriver
> >         rbd_ceph_conf=/etc/ceph/ceph.conf
> >         rbd_user=openstack
> >         rbd_pool=ssdvolumes
> > 
> >         [tripleo_ceph_sas]
> >         backend_host=hostgroup
> >         volume_backend_name=tripleo_ceph_sas
> >         volume_driver=cinder.volume.drivers.rbd.RBDDriver
> >         rbd_ceph_conf=/etc/ceph/ceph.conf
> >         rbd_user=openstack
> >         rbd_pool=sasvolumes
> > 
> >         As you might have noticed, the backend name (tripleo_ceph_ssd) and
> > the RBD pool name (ssdvolumes, not ssd) does not match. So far, we do not
> > have any problems. But I want to correct the names and I do not want to have
> > the mismatch anymore.
> > 
> >         So I want to change the value of key volume_backend_name for both
> > Volume Types (tripleo_ceph_ssd => tripleo_ceph_ssdvolumes).
> > 
> >         I tried the following:
> >         $ openstack volume type show 80cb25ff-376a-4483-b4f7-d8c75839e0ce
> >         +--------------------+----------------------------------------+
> >         | Field | Value |
> >         +--------------------+----------------------------------------+
> >         | access_project_ids | None |
> >         | description | |
> >         | id | 80cb25ff-376a-4483-b4f7-d8c75839e0ce |
> >         | is_public | True |
> >         | name | ssd |
> >         | properties | volume_backend_name='tripleo_ceph_ssd' |
> >         | qos_specs_id | None |
> >         +--------------------+----------------------------------------+
> >         $
> > 
> > 
> >         $ openstack volume type set --property
> > volume_backend_name='tripleo_ceph_ssdvolumes'
> > 80cb25ff-376a-4483-b4f7-d8c75839e0ce
> >         Failed to set volume type property: Volume Type is currently in use.
> > (HTTP 400) (Request-ID: req-5efaa5b7-910f-4802-8494-3115cfc4ab93)
> >         Command Failed: One or more of the operations failed
> >         $
> > 
> >         How to solve my problem?
> > 
> >         Thanks!
> > 
> >         Sinan
> > 
> >     > 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20191107/92658e93/attachment-0001.html>