mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-02 01:39:02 +00:00
Log if PV is still in use trying to delete it
Similar to what we have in: https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/volume/pvcprotection/pvc_protection_controller.go#L181 The objective is to have a easy way to monitor if a PV will enter in Terminating state due to a failed removal when still in use. This way we can capture the PV log and alert according. The code is not tested. Update pv_protection_controller.go Change call to Infof
This commit is contained in:
@@ -144,6 +144,7 @@ func (c *Controller) processPV(pvName string) error {
|
||||
if !isUsed {
|
||||
return c.removeFinalizer(pv)
|
||||
}
|
||||
klog.V(4).Infof("Keeping PV %s because it is being used", pvName)
|
||||
}
|
||||
|
||||
if protectionutil.NeedToAddFinalizer(pv, volumeutil.PVProtectionFinalizer) {
|
||||
|
Reference in New Issue
Block a user