diff --git a/cinder/Chart.yaml b/cinder/Chart.yaml index 33aa5ca8..55df4145 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.13 +version: 0.1.14 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/_multipath.tpl b/cinder/templates/bin/_multipath.tpl new file mode 100644 index 00000000..7f84c9c8 --- /dev/null +++ b/cinder/templates/bin/_multipath.tpl @@ -0,0 +1,18 @@ +#!/bin/bash + +{{/* +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +chroot /mnt/host-rootfs /usr/bin/env -i PATH="/sbin:/bin:/usr/bin" \ + multipath "${@:1}" diff --git a/cinder/templates/bin/_multipathd.tpl b/cinder/templates/bin/_multipathd.tpl new file mode 100644 index 00000000..a9ff34a6 --- /dev/null +++ b/cinder/templates/bin/_multipathd.tpl @@ -0,0 +1,18 @@ +#!/bin/bash + +{{/* +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +chroot /mnt/host-rootfs /usr/bin/env -i PATH="/sbin:/bin:/usr/bin" \ + multipathd "${@:1}" diff --git a/cinder/templates/configmap-bin.yaml b/cinder/templates/configmap-bin.yaml index aba1cb00..40700856 100644 --- a/cinder/templates/configmap-bin.yaml +++ b/cinder/templates/configmap-bin.yaml @@ -24,6 +24,10 @@ data: {{- if .Values.conf.enable_iscsi }} iscsiadm: | {{ tuple "bin/_iscsiadm.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + multipath: | +{{ tuple "bin/_multipath.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + multipathd: | +{{ tuple "bin/_multipathd.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{- end }} {{- if .Values.images.local_registry.active }} image-repo-sync.sh: | diff --git a/cinder/templates/deployment-volume.yaml b/cinder/templates/deployment-volume.yaml index 6bf3a91d..13cc4695 100755 --- a/cinder/templates/deployment-volume.yaml +++ b/cinder/templates/deployment-volume.yaml @@ -248,6 +248,22 @@ spec: - name: cinder-bin mountPath: /usr/local/sbin/iscsiadm subPath: iscsiadm + - name: cinder-bin + mountPath: /usr/local/sbin/multipath + subPath: multipath + - name: cinder-bin + mountPath: /usr/local/sbin/multipathd + subPath: multipathd + - name: etcmultipath + mountPath: /etc/multipath + {{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }} + mountPropagation: Bidirectional + {{- end }} + - name: sys + mountPath: /sys + {{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }} + mountPropagation: HostToContainer + {{- end }} {{- end }} {{- dict "enabled" .Values.manifests.certificates "name" .Values.secrets.tls.volume.api.internal "path" "/etc/cinder/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} {{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal "path" "/etc/mysql/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} @@ -304,6 +320,12 @@ spec: path: /etc/iscsi - name: usrlocalsbin emptyDir: {} + - name: etcmultipath + hostPath: + path: /etc/multipath + - name: sys + hostPath: + path: /sys {{- end }} {{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }} {{- dict "enabled" .Values.manifests.certificates "name" .Values.secrets.tls.volume.api.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }} diff --git a/nova/Chart.yaml b/nova/Chart.yaml index d464e287..f3e023ce 100644 --- a/nova/Chart.yaml +++ b/nova/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Nova name: nova -version: 0.1.16 +version: 0.1.17 home: https://docs.openstack.org/nova/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Nova/OpenStack_Project_Nova_vertical.png sources: diff --git a/nova/templates/bin/_multipath.tpl b/nova/templates/bin/_multipath.tpl new file mode 100644 index 00000000..7f84c9c8 --- /dev/null +++ b/nova/templates/bin/_multipath.tpl @@ -0,0 +1,18 @@ +#!/bin/bash + +{{/* +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +chroot /mnt/host-rootfs /usr/bin/env -i PATH="/sbin:/bin:/usr/bin" \ + multipath "${@:1}" diff --git a/nova/templates/bin/_multipathd.tpl b/nova/templates/bin/_multipathd.tpl new file mode 100644 index 00000000..a9ff34a6 --- /dev/null +++ b/nova/templates/bin/_multipathd.tpl @@ -0,0 +1,18 @@ +#!/bin/bash + +{{/* +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +chroot /mnt/host-rootfs /usr/bin/env -i PATH="/sbin:/bin:/usr/bin" \ + multipathd "${@:1}" diff --git a/nova/templates/configmap-bin.yaml b/nova/templates/configmap-bin.yaml index 13622c5b..5b9bd854 100644 --- a/nova/templates/configmap-bin.yaml +++ b/nova/templates/configmap-bin.yaml @@ -24,6 +24,10 @@ data: {{- if .Values.conf.enable_iscsi }} iscsiadm: | {{ tuple "bin/_iscsiadm.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + multipath: | +{{ tuple "bin/_multipath.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + multipathd: | +{{ tuple "bin/_multipathd.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{- end }} {{- if .Values.images.local_registry.active }} image-repo-sync.sh: | diff --git a/nova/templates/daemonset-compute.yaml b/nova/templates/daemonset-compute.yaml index fca4e823..9d32a168 100644 --- a/nova/templates/daemonset-compute.yaml +++ b/nova/templates/daemonset-compute.yaml @@ -384,6 +384,24 @@ spec: - name: nova-bin mountPath: /usr/local/sbin/iscsiadm subPath: iscsiadm + - name: runlock + mountPath: /run/lock + - name: nova-bin + mountPath: /usr/local/sbin/multipath + subPath: multipath + - name: nova-bin + mountPath: /usr/local/sbin/multipathd + subPath: multipathd + - name: etcmultipath + mountPath: /etc/multipath + {{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }} + mountPropagation: Bidirectional + {{- end }} + - name: sysblock + mountPath: /sys/block + {{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }} + mountPropagation: HostToContainer + {{- end }} {{- end }} {{- if ( has "tungstenfabric" .Values.network.backend ) }} - name: tf-plugin-shared @@ -503,6 +521,13 @@ spec: path: /dev - name: usrlocalsbin emptyDir: {} + - name: etcmultipath + hostPath: + path: /etc/multipath + - name: sysblock + hostPath: + path: /sys/block + {{- end }} {{- if ( has "tungstenfabric" .Values.network.backend ) }} - name: tf-plugin-shared diff --git a/releasenotes/notes/cinder.yaml b/releasenotes/notes/cinder.yaml index 274f3069..bfcca28f 100644 --- a/releasenotes/notes/cinder.yaml +++ b/releasenotes/notes/cinder.yaml @@ -14,3 +14,4 @@ cinder: - 0.1.11 Update RBAC apiVersion from /v1beta1 to /v1 - 0.1.12 Update volume type creation bootstrap logic - 0.1.13 Add NFS cinder backup override + - 0.1.14 Add Multipathd support for ISCSI backed volumes diff --git a/releasenotes/notes/nova.yaml b/releasenotes/notes/nova.yaml index b6122bfc..252c7bf1 100644 --- a/releasenotes/notes/nova.yaml +++ b/releasenotes/notes/nova.yaml @@ -17,3 +17,4 @@ nova: - 0.1.14 BUG for deploying multiple compute nodes - 0.1.15 Mount /dev/pts in Nova compute container - 0.1.16 Use first IP address for migration + - 0.1.17 Add multipathd support for ISCSI backed volume VMs