diff --git a/cinder/Chart.yaml b/cinder/Chart.yaml index 47b118193d..e12912441a 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.3.16 +version: 0.3.17 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/_cinder-api.sh.tpl b/cinder/templates/bin/_cinder-api.sh.tpl index 3b64745c43..73ae571845 100644 --- a/cinder/templates/bin/_cinder-api.sh.tpl +++ b/cinder/templates/bin/_cinder-api.sh.tpl @@ -48,8 +48,7 @@ function start () { # Starts Apache2 exec {{ .Values.conf.software.apache2.binary }} {{ .Values.conf.software.apache2.start_parameters }} {{- else }} - exec cinder-api \ - --config-file /etc/cinder/cinder.conf + exec uwsgi --ini /etc/cinder/cinder-api-uwsgi.ini {{- end }} } diff --git a/cinder/templates/configmap-etc.yaml b/cinder/templates/configmap-etc.yaml index 5010ab9653..1a20ea8414 100644 --- a/cinder/templates/configmap-etc.yaml +++ b/cinder/templates/configmap-etc.yaml @@ -144,6 +144,15 @@ limitations under the License. {{- end -}} {{- end -}} +{{- if empty .Values.conf.cinder_api_uwsgi.uwsgi.processes -}} +{{- $_ := set .Values.conf.cinder_api_uwsgi.uwsgi "processes" .Values.conf.cinder.DEFAULT.osapi_volume_workers -}} +{{- end -}} +{{- if empty (index .Values.conf.cinder_api_uwsgi.uwsgi "http-socket") -}} +{{- $http_socket_port := tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }} +{{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }} +{{- $_ := set .Values.conf.cinder_api_uwsgi.uwsgi "http-socket" $http_socket -}} +{{- end -}} + {{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}} {{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} {{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }} @@ -168,6 +177,7 @@ data: logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }} backends.conf: {{ include "helm-toolkit.utils.to_ini" .Values.conf.backends | b64enc }} api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }} + cinder-api-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.cinder_api_uwsgi | b64enc }} policy.yaml: {{ toYaml .Values.conf.policy | b64enc }} {{- if .Values.manifests.certificates }} {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.mpm_event "key" "mpm_event.conf" "format" "Secret" ) | indent 2 }} diff --git a/cinder/templates/deployment-api.yaml b/cinder/templates/deployment-api.yaml index 8ef57549a0..feab3ef738 100644 --- a/cinder/templates/deployment-api.yaml +++ b/cinder/templates/deployment-api.yaml @@ -104,7 +104,7 @@ spec: scheme: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }} path: / port: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} - initialDelaySeconds: 30 + initialDelaySeconds: 5 failureThreshold: 3 periodSeconds: 10 successThreshold: 1 @@ -118,6 +118,10 @@ spec: mountPath: /tmp/cinder-api.sh subPath: cinder-api.sh readOnly: true + - name: cinder-etc + mountPath: /etc/cinder/cinder-api-uwsgi.ini + subPath: cinder-api-uwsgi.ini + readOnly: true - name: cinder-etc mountPath: /etc/cinder/cinder.conf subPath: cinder.conf diff --git a/cinder/values.yaml b/cinder/values.yaml index c13a9114f1..266c80f622 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -1011,6 +1011,23 @@ conf: - volume_type volume_type: [] enable_iscsi: false + cinder_api_uwsgi: + uwsgi: + add-header: "Connection: close" + buffer-size: 65535 + die-on-term: true + enable-threads: true + exit-on-reload: false + hook-master-start: unix_signal:15 gracefully_kill_them_all + lazy-apps: true + log-x-forwarded-for: true + master: true + procname-prefix-spaced: "cinder-api:" + route-user-agent: '^kube-probe.* donotlog:' + thunder-lock: true + worker-reload-mercy: 80 + wsgi-file: /var/lib/openstack/bin/cinder-wsgi + backup: external_ceph_rbd: enabled: false diff --git a/releasenotes/notes/cinder.yaml b/releasenotes/notes/cinder.yaml index d3624eb830..a638885e3b 100644 --- a/releasenotes/notes/cinder.yaml +++ b/releasenotes/notes/cinder.yaml @@ -66,4 +66,5 @@ cinder: - 0.3.14 Add Ubuntu Jammy overrides - 0.3.15 Add 2023.2 Ubuntu Jammy overrides - 0.3.16 Update Ceph images to Jammy and Reef 18.2.1 + - 0.3.17 Use uWSGI for API service ...