<div dir="ltr"><div>Hi Eugen,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 20, 2020 at 6:12 PM Eugen Block <<a href="mailto:eblock@nde.ag" target="_blank">eblock@nde.ag</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Rajat,<br>
<br>
I retyped all remaining volumes of type "__DEFAULT__" but I still  <br>
can't delete that type, apparently it's marked as default somewhere,  <br>
but I can't find anything in the database referring to __DEFAULT__  <br>
except the cinder.volume_types table. I tried to delete it:<br>
<br>
---snip---<br>
controller02:~ # openstack volume type list<br>
+--------------------------------------+-------------+-----------+<br>
| ID                                   | Name        | Is Public |<br>
+--------------------------------------+-------------+-----------+<br>
| f27162b0-c3c4-4929-8a95-89b83875885f | __DEFAULT__ | True      |<br>
[...]<br>
+--------------------------------------+-------------+-----------+<br>
<br>
controller02:~ # openstack volume type delete  <br>
f27162b0-c3c4-4929-8a95-89b83875885f<br>
Failed to delete volume type with name or ID  <br>
'f27162b0-c3c4-4929-8a95-89b83875885f': Target volume type is default  <br>
and cannot be deleted. (HTTP 400) (Request-ID:  <br>
req-859c6546-a368-4f6f-ab02-80000c4404c1)<br>
---snip---<br>
<br></blockquote><div><br></div><div>This is probably because your cinder package version isn't updated to 15.4.0 (Train)<br></div><div>Your deployment should contain this patch[1] to make it work<br></div><div>To verify, you can run ``cinder-manage --version`` command<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
But according to cinder I have a different default-type:<br>
<br>
---snip---<br>
controller02:~ # cinder type-default<br>
+--------------------------------------+------+-------------+-----------+<br>
| ID                                   | Name | Description | Is_Public |<br>
+--------------------------------------+------+-------------+-----------+<br>
| 5f7f9e7f-a5b4-4061-b228-022d42139467 | hdd  |             | True      |<br>
+--------------------------------------+------+-------------+-----------+<br>
---snip---<br>
<br>
<br>
How do I get rid of that type now?<br>
<br>
Regards,<br>
Eugen<br>
<br>
<br>
Zitat von Rajat Dhasmana <<a href="mailto:rdhasman@redhat.com" target="_blank">rdhasman@redhat.com</a>>:<br>
<br>
> ---------- Forwarded message ---------<br>
> From: Rajat Dhasmana <<a href="mailto:rdhasman@redhat.com" target="_blank">rdhasman@redhat.com</a>><br>
> Date: Sat, Oct 17, 2020 at 12:31 AM<br>
> Subject: Re: [ops] [cinder] __DEFAULT__ volume type<br>
> To: Massimo Sgaravatto <<a href="mailto:massimo.sgaravatto@gmail.com" target="_blank">massimo.sgaravatto@gmail.com</a>><br>
><br>
><br>
> Hi Massimo,<br>
><br>
><br>
><br>
> On Fri, Oct 16, 2020 at 7:42 PM Massimo Sgaravatto <<br>
> <a href="mailto:massimo.sgaravatto@gmail.com" target="_blank">massimo.sgaravatto@gmail.com</a>> wrote:<br>
><br>
>> I have recently updated my Cloud from Rocky to Train (I am running Cinder<br>
>> v. 15.4.0)<br>
>> I have a question concerning the __DEFAULT__ volume type, that I don't<br>
>> remember to have seen before.<br>
>><br>
>><br>
> Since Train, cinder has decided to discourage untyped volumes (volumes with<br>
> None volume type) as it doesn't add any value to the volume attributes. To<br>
> achieve this, we created the __DEFAULT__ type and migrated all untyped<br>
> volumes to have the __DEFAULT__ type.<br>
><br>
><br>
>> Since:<br>
>> - I have no volumes using this volume type<br>
>> - I defined in in the [DEFAULT] section of cinder.conf the attribute<br>
>> "default_volume_type" to a value different than "__DEFAULT___"<br>
>><br>
>> I assume that I can safely delete the __DEFAULT__ volume type<br>
>><br>
>> Is this correct?<br>
>><br>
>><br>
> Yes, as long as there are no volumes using it and there is a valid volume<br>
> type defined with ``default_volume_type`` config in cinder.conf, you can<br>
> safely delete it.<br>
> NOTE: ``default_volume_type`` has a default value of ``__DEFAULT__`` to not<br>
> allow users to further create untyped volumes, if you are deleting this,<br>
> make sure there is always a valid volume type defined with<br>
> ``default_volume_type`` in cinder.conf<br>
><br>
><br>
>> Thanks, Massimo<br>
>><br>
><br>
><br>
> Thanks and Regards<br>
> Rajat Dhasmana<br>
<br>
<br></blockquote><div>[1] <a href="https://github.com/openstack/cinder/commit/e62ac18085e1deef83c975558db3de2a183528e1" target="_blank">https://github.com/openstack/cinder/commit/e62ac18085e1deef83c975558db3de2a183528e1</a> </div></div></div>