Add logic to Cinder bootstrap to handle timing issue

During upgrade, the Cinder pods go through the upgrade
process. Sometimes, the pods are unavailable to handle
the requests in bootstrap even the Cinder services are
up. This patchset gives the bootstrap job additional
attempt to finish the tasks

Change-Id: Ie7bd8909f1c93b76b2242748318f892a6ff9c53d
This commit is contained in:
Sophie Huang 2021-08-23 20:48:11 +00:00
parent 2f80bd3ff2
commit 8ea0e27892
3 changed files with 12 additions and 2 deletions

View File

@ -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:

View File

@ -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 }}

View File

@ -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
...