From 97187997e47057bd2049a5f4e351807bbc4257e0 Mon Sep 17 00:00:00 2001 From: intlabs Date: Wed, 6 Jan 2021 11:51:05 -0600 Subject: [PATCH] Cinder: Enable iscsi to work correctly in cinder volume This PS enables iscsi actions to work correctly in cinder volume - enabling things like conversion of glance images to cinder volumes (required for nova-boot-from-volume) Change-Id: I63521ff9609ad89485a843bc0fbddb00e38dccc8 Signed-off-by: Pete Birley --- cinder/Chart.yaml | 2 +- cinder/templates/deployment-volume.yaml | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cinder/Chart.yaml b/cinder/Chart.yaml index a4dd13849a..e8032586c6 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.1.3 +version: 0.1.4 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/deployment-volume.yaml b/cinder/templates/deployment-volume.yaml index ac51ac5b4d..a6bb3b73d1 100755 --- a/cinder/templates/deployment-volume.yaml +++ b/cinder/templates/deployment-volume.yaml @@ -55,6 +55,9 @@ spec: {{ .Values.labels.volume.node_selector_key }}: {{ .Values.labels.volume.node_selector_value }} {{- if .Values.pod.useHostNetwork.volume }} hostNetwork: true +{{- end }} +{{- if .Values.conf.enable_iscsi }} + hostIPC: true {{- end }} initContainers: {{ tuple $envAll "volume" $mounts_cinder_volume_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} @@ -224,6 +227,14 @@ spec: {{- if .Values.conf.enable_iscsi }} - name: host-rootfs mountPath: /mnt/host-rootfs + {{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }} + mountPropagation: HostToContainer + {{- end }} + - name: host-dev + mountPath: /dev + {{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }} + mountPropagation: Bidirectional + {{- end }} - name: runlock mountPath: /run/lock - name: etciscsi @@ -281,6 +292,9 @@ spec: - name: host-rootfs hostPath: path: / + - name: host-dev + hostPath: + path: /dev - name: runlock hostPath: path: /run/lock