From c7c19e85c016d58bea258c9d867b7cc21f585d3b Mon Sep 17 00:00:00 2001
From: "Sphicas, Phil (ps3910)" <ps3910@att.com>
Date: Thu, 7 Jan 2021 20:19:04 +0000
Subject: [PATCH] Use HostToContainer mountPropagation

For any host mounts that include /var/lib/kubelet, use HostToContainer
mountPropagation, which avoids creating extra references to mounts in
other containers.

Affects the following resources:
* neutron-lb-agent daemonset
* neutron-ovs-agent daemonset
* neutron-sriov-agent daemonset (unused mount removed)
* nova-compute daemeonset

Change-Id: I92f1700e56517a74b1fbcc8e3a68567045a593ee
---
 neutron/Chart.yaml                           | 2 +-
 neutron/templates/daemonset-lb-agent.yaml    | 1 +
 neutron/templates/daemonset-ovs-agent.yaml   | 1 +
 neutron/templates/daemonset-sriov-agent.yaml | 3 ---
 nova/Chart.yaml                              | 2 +-
 nova/templates/daemonset-compute.yaml        | 1 +
 6 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/neutron/Chart.yaml b/neutron/Chart.yaml
index 5a4d3b6c25..e4d452d1b7 100644
--- a/neutron/Chart.yaml
+++ b/neutron/Chart.yaml
@@ -14,7 +14,7 @@ apiVersion: v1
 appVersion: v1.0.0
 description: OpenStack-Helm Neutron
 name: neutron
-version: 0.1.5
+version: 0.1.6
 home: https://docs.openstack.org/neutron/latest/
 icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
 sources:
diff --git a/neutron/templates/daemonset-lb-agent.yaml b/neutron/templates/daemonset-lb-agent.yaml
index 9c818a35cc..0e93b8f139 100644
--- a/neutron/templates/daemonset-lb-agent.yaml
+++ b/neutron/templates/daemonset-lb-agent.yaml
@@ -78,6 +78,7 @@ spec:
               readOnly: true
             - name: host-rootfs
               mountPath: /mnt/host-rootfs
+              mountPropagation: HostToContainer
               readOnly: true
         - name: neutron-lb-agent-init
 {{ tuple $envAll "neutron_linuxbridge_agent" | include "helm-toolkit.snippets.image" | indent 10 }}
diff --git a/neutron/templates/daemonset-ovs-agent.yaml b/neutron/templates/daemonset-ovs-agent.yaml
index b33cb0ef9e..055564afe2 100644
--- a/neutron/templates/daemonset-ovs-agent.yaml
+++ b/neutron/templates/daemonset-ovs-agent.yaml
@@ -95,6 +95,7 @@ spec:
               readOnly: true
             - name: host-rootfs
               mountPath: /mnt/host-rootfs
+              mountPropagation: HostToContainer
               readOnly: true
 {{- if .Values.conf.ovs_dpdk.enabled }}
             - name: pci-devices
diff --git a/neutron/templates/daemonset-sriov-agent.yaml b/neutron/templates/daemonset-sriov-agent.yaml
index c3f9c9fe3d..9a00d2455b 100644
--- a/neutron/templates/daemonset-sriov-agent.yaml
+++ b/neutron/templates/daemonset-sriov-agent.yaml
@@ -234,9 +234,6 @@ spec:
         - name: run
           hostPath:
             path: /run
-        - name: host-rootfs
-          hostPath:
-            path: /
 {{ if $mounts_neutron_sriov_agent.volumes }}{{ toYaml $mounts_neutron_sriov_agent.volumes | indent 8 }}{{ end }}
 {{- end }}
 {{- end }}
diff --git a/nova/Chart.yaml b/nova/Chart.yaml
index 4b13044bb0..7e22ff87b5 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.6
+version: 0.1.7
 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/daemonset-compute.yaml b/nova/templates/daemonset-compute.yaml
index ad7e76581e..5821fa85e3 100644
--- a/nova/templates/daemonset-compute.yaml
+++ b/nova/templates/daemonset-compute.yaml
@@ -366,6 +366,7 @@ spec:
             {{- if .Values.conf.enable_iscsi }}
             - name: host-rootfs
               mountPath: /mnt/host-rootfs
+              mountPropagation: HostToContainer
             - name: usrlocalsbin
               mountPath: /usr/local/sbin
             - name: etciscsi