diff --git a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go index e23dc4dad7d..831324813de 100644 --- a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go +++ b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go @@ -1185,7 +1185,7 @@ type seLinuxMountMismatchError struct { func (err seLinuxMountMismatchError) Error() string { return fmt.Sprintf( - "volumeName %q is already mounted to a different pod with a different SELinux label", + "waiting for unmount of volume %q, because it is already mounted to a different pod with a different SELinux label", err.volumeName) } diff --git a/pkg/kubelet/volumemanager/reconciler/reconciler.go b/pkg/kubelet/volumemanager/reconciler/reconciler.go index 14b4a660c46..de178350158 100644 --- a/pkg/kubelet/volumemanager/reconciler/reconciler.go +++ b/pkg/kubelet/volumemanager/reconciler/reconciler.go @@ -223,6 +223,7 @@ func (rc *reconciler) mountOrAttachVolumes() { // The volume is mounted, but with an unexpected SELinux context. // It will get unmounted in unmountVolumes / unmountDetachDevices and // then removed from actualStateOfWorld. + rc.desiredStateOfWorld.AddErrorToPod(volumeToMount.PodName, err.Error()) continue } else if cache.IsVolumeNotAttachedError(err) { rc.waitForVolumeAttach(volumeToMount)