From 25e50a34c66d5db7604746f4d2e12acbdd6c1459 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Tue, 26 Jun 2018 08:15:24 -0500 Subject: [PATCH] Nova/Libvirt: mount vm state directories with bidirectional propagation This PS updates the Nova and Libvirt charts to mount the vm state directories with bidirectional mount propagation for k8s >= 1.10. This allows mounts created by some volume drivers to be used, and unaffected by pod restart. Change-Id: Idaf664efb23a424dd8d9e1376ea7231b8565e3fe Signed-off-by: Pete Birley --- libvirt/templates/daemonset-libvirt.yaml | 6 ++++++ nova/templates/daemonset-compute.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/libvirt/templates/daemonset-libvirt.yaml b/libvirt/templates/daemonset-libvirt.yaml index 5c48b08bdf..1f3f3faa9a 100644 --- a/libvirt/templates/daemonset-libvirt.yaml +++ b/libvirt/templates/daemonset-libvirt.yaml @@ -141,8 +141,14 @@ spec: readOnly: true - name: var-lib-libvirt mountPath: /var/lib/libvirt + {{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }} + mountPropagation: Bidirectional + {{- end }} - name: var-lib-nova mountPath: /var/lib/nova + {{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }} + mountPropagation: Bidirectional + {{- end }} - name: run mountPath: /run - name: dev diff --git a/nova/templates/daemonset-compute.yaml b/nova/templates/daemonset-compute.yaml index 1f0a7be3e3..93f2d5b796 100644 --- a/nova/templates/daemonset-compute.yaml +++ b/nova/templates/daemonset-compute.yaml @@ -234,8 +234,14 @@ spec: readOnly: true - name: varlibnova mountPath: /var/lib/nova + {{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }} + mountPropagation: Bidirectional + {{- end }} - name: varliblibvirt mountPath: /var/lib/libvirt + {{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }} + mountPropagation: Bidirectional + {{- end }} - name: run mountPath: /run - name: cgroup