diff --git a/cinder/Chart.yaml b/cinder/Chart.yaml index 208f5f6f09..7d463ead61 100644 --- a/cinder/Chart.yaml +++ b/cinder/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Cinder name: cinder -version: 0.2.7 +version: 0.2.8 home: https://docs.openstack.org/cinder/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Cinder/OpenStack_Project_Cinder_vertical.png sources: diff --git a/cinder/templates/bin/_bootstrap.sh.tpl b/cinder/templates/bin/_bootstrap.sh.tpl index ea6bbd585a..be74cfc126 100644 --- a/cinder/templates/bin/_bootstrap.sh.tpl +++ b/cinder/templates/bin/_bootstrap.sh.tpl @@ -27,13 +27,22 @@ export HOME=/tmp {{- range $name, $properties := $volumeTypes }} {{- if $properties.volume_backend_name }} {{- if (eq $properties.volume_backend_name $backend_properties.volume_backend_name) }} -openstack volume type show {{ $name }} || \ +if [[ $(openstack volume type list -f value -c Name | grep -w {{ $name }}) ]]; then + if [[ ! $(openstack volume type show {{ $name }} | grep volume_backend_name) ]]; then + openstack volume type set \ + {{- range $key, $value := $properties }} + --property {{ $key }}={{ $value }} \ + {{- end }} + {{ $name }} + fi +else openstack volume type create \ --public \ {{- range $key, $value := $properties }} --property {{ $key }}={{ $value }} \ {{- end }} {{ $name }} +fi {{- end }} {{- end }} {{- end }} diff --git a/releasenotes/notes/cinder.yaml b/releasenotes/notes/cinder.yaml index dd5c2e900e..569643f967 100644 --- a/releasenotes/notes/cinder.yaml +++ b/releasenotes/notes/cinder.yaml @@ -24,4 +24,5 @@ cinder: - 0.2.5 Add volume QoS support - 0.2.6 Added helm.sh/hook with value of post-install and post-upgrade - 0.2.7 Add Victoria and Wallaby releases support + - 0.2.8 Add logic to bootstrap to handle upgrade timing issue ...