From a7fc99933b2f631f1b06bee57e46e52d7044c12e Mon Sep 17 00:00:00 2001 From: Sami Wagiaalla Date: Fri, 20 Nov 2015 13:01:45 -0500 Subject: [PATCH] Fix predicates for SELinux and ownership management --- pkg/kubelet/kubelet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 344ca8b75dc..7a4f61be79c 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -1086,7 +1086,7 @@ func makeMounts(pod *api.Pod, podDir string, container *api.Container, podVolume // If the volume supports SELinux and it has not been // relabeled already and it is not a read-only volume, // relabel it and mark it as labeled - if vol.Builder.GetAttributes().SupportsSELinux && !vol.SELinuxLabeled && !vol.Builder.GetAttributes().Managed { + if vol.Builder.GetAttributes().Managed && vol.Builder.GetAttributes().SupportsSELinux && !vol.SELinuxLabeled { vol.SELinuxLabeled = true relabelVolume = true }