Avoid rbd unmap failure; use HostToContainer mountPropagation
The divingbell pods use a hostPath volume for the root filesystem. Because this mount includes /var/lib/kubelet, the pod holds a reference to every volume mounted by every pod on the same host. The most visible case where this causes a problem is the termination of a pod that uses a ceph-backed PVCs. When kubelet tries to unmap the rbd device, it is unable to do so, manifesting in the kubelet logs as: rbd: unmap failed: (16) Device or resource busy This change sets the mountPropagation to HostToContainer for the rootfs volume, so that the divingbell pods will not prevent kubelet from releasing these devices. https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation Change-Id: I6e91fb9b9d7cbe852c5e6dc8b7224d6085175590
This commit is contained in:
parent
55ba4cb61c
commit
918da6d055
|
@ -58,6 +58,7 @@ spec:
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: rootfs-{{ $daemonset }}
|
- name: rootfs-{{ $daemonset }}
|
||||||
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
||||||
|
mountPropagation: HostToContainer
|
||||||
- name: {{ $secretName }}
|
- name: {{ $secretName }}
|
||||||
mountPath: /tmp/{{ $daemonset }}.sh
|
mountPath: /tmp/{{ $daemonset }}.sh
|
||||||
subPath: {{ $daemonset }}
|
subPath: {{ $daemonset }}
|
||||||
|
|
|
@ -58,6 +58,7 @@ spec:
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: rootfs-{{ $daemonset }}
|
- name: rootfs-{{ $daemonset }}
|
||||||
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
||||||
|
mountPropagation: HostToContainer
|
||||||
- name: {{ $secretName }}
|
- name: {{ $secretName }}
|
||||||
mountPath: /tmp/{{ $daemonset }}.sh
|
mountPath: /tmp/{{ $daemonset }}.sh
|
||||||
subPath: {{ $daemonset }}
|
subPath: {{ $daemonset }}
|
||||||
|
|
|
@ -58,6 +58,7 @@ spec:
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: rootfs-{{ $daemonset }}
|
- name: rootfs-{{ $daemonset }}
|
||||||
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
||||||
|
mountPropagation: HostToContainer
|
||||||
- name: {{ $secretName }}
|
- name: {{ $secretName }}
|
||||||
mountPath: /tmp/{{ $daemonset }}.sh
|
mountPath: /tmp/{{ $daemonset }}.sh
|
||||||
subPath: {{ $daemonset }}
|
subPath: {{ $daemonset }}
|
||||||
|
|
|
@ -58,6 +58,7 @@ spec:
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: rootfs-{{ $daemonset }}
|
- name: rootfs-{{ $daemonset }}
|
||||||
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
||||||
|
mountPropagation: HostToContainer
|
||||||
- name: {{ $secretName }}
|
- name: {{ $secretName }}
|
||||||
mountPath: /tmp/{{ $daemonset }}.sh
|
mountPath: /tmp/{{ $daemonset }}.sh
|
||||||
subPath: {{ $daemonset }}
|
subPath: {{ $daemonset }}
|
||||||
|
|
|
@ -58,6 +58,7 @@ spec:
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: rootfs-{{ $daemonset }}
|
- name: rootfs-{{ $daemonset }}
|
||||||
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
||||||
|
mountPropagation: HostToContainer
|
||||||
- name: {{ $secretName }}
|
- name: {{ $secretName }}
|
||||||
mountPath: /tmp/{{ $daemonset }}.sh
|
mountPath: /tmp/{{ $daemonset }}.sh
|
||||||
subPath: {{ $daemonset }}
|
subPath: {{ $daemonset }}
|
||||||
|
|
|
@ -58,6 +58,7 @@ spec:
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: rootfs-{{ $daemonset }}
|
- name: rootfs-{{ $daemonset }}
|
||||||
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
||||||
|
mountPropagation: HostToContainer
|
||||||
- name: {{ $secretName }}
|
- name: {{ $secretName }}
|
||||||
mountPath: /tmp/{{ $daemonset }}.sh
|
mountPath: /tmp/{{ $daemonset }}.sh
|
||||||
subPath: {{ $daemonset }}
|
subPath: {{ $daemonset }}
|
||||||
|
|
|
@ -58,6 +58,7 @@ spec:
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: rootfs-{{ $daemonset }}
|
- name: rootfs-{{ $daemonset }}
|
||||||
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
||||||
|
mountPropagation: HostToContainer
|
||||||
- name: {{ $secretName }}
|
- name: {{ $secretName }}
|
||||||
mountPath: /tmp/{{ $daemonset }}.sh
|
mountPath: /tmp/{{ $daemonset }}.sh
|
||||||
subPath: {{ $daemonset }}
|
subPath: {{ $daemonset }}
|
||||||
|
|
|
@ -58,6 +58,7 @@ spec:
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: rootfs-{{ $daemonset }}
|
- name: rootfs-{{ $daemonset }}
|
||||||
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
||||||
|
mountPropagation: HostToContainer
|
||||||
- name: {{ $secretName }}
|
- name: {{ $secretName }}
|
||||||
mountPath: /tmp/{{ $daemonset }}.sh
|
mountPath: /tmp/{{ $daemonset }}.sh
|
||||||
subPath: {{ $daemonset }}
|
subPath: {{ $daemonset }}
|
||||||
|
|
|
@ -54,6 +54,7 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: rootfs-{{ $daemonset }}
|
- name: rootfs-{{ $daemonset }}
|
||||||
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
mountPath: {{ .Values.conf.chroot_mnt_path }}
|
||||||
|
mountPropagation: HostToContainer
|
||||||
- name: {{ $secretName }}
|
- name: {{ $secretName }}
|
||||||
mountPath: /tmp/{{ $daemonset }}.sh
|
mountPath: /tmp/{{ $daemonset }}.sh
|
||||||
subPath: {{ $daemonset }}
|
subPath: {{ $daemonset }}
|
||||||
|
|
Loading…
Reference in New Issue