mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #83536 from yutedz/del-volume-err
Log the error return from store.Delete
This commit is contained in:
commit
ac9390627e
@ -210,8 +210,11 @@ func (ctrl *PersistentVolumeController) updateVolume(volume *v1.PersistentVolume
|
||||
|
||||
// deleteVolume runs in worker thread and handles "volume deleted" event.
|
||||
func (ctrl *PersistentVolumeController) deleteVolume(volume *v1.PersistentVolume) {
|
||||
_ = ctrl.volumes.store.Delete(volume)
|
||||
klog.V(4).Infof("volume %q deleted", volume.Name)
|
||||
if err := ctrl.volumes.store.Delete(volume); err != nil {
|
||||
klog.Errorf("volume %q deletion encountered : %v", volume.Name, err)
|
||||
} else {
|
||||
klog.V(4).Infof("volume %q deleted", volume.Name)
|
||||
}
|
||||
// record deletion metric if a deletion start timestamp is in the cache
|
||||
// the following calls will be a no-op if there is nothing for this volume in the cache
|
||||
// end of timestamp cache entry lifecycle, "RecordMetric" will do the clean
|
||||
@ -255,7 +258,9 @@ func (ctrl *PersistentVolumeController) updateClaim(claim *v1.PersistentVolumeCl
|
||||
// Unit test [5-5] [5-6] [5-7]
|
||||
// deleteClaim runs in worker thread and handles "claim deleted" event.
|
||||
func (ctrl *PersistentVolumeController) deleteClaim(claim *v1.PersistentVolumeClaim) {
|
||||
_ = ctrl.claims.Delete(claim)
|
||||
if err := ctrl.claims.Delete(claim); err != nil {
|
||||
klog.Errorf("claim %q deletion encountered : %v", claim.Name, err)
|
||||
}
|
||||
claimKey := claimToClaimKey(claim)
|
||||
klog.V(4).Infof("claim %q deleted", claimKey)
|
||||
// clean any possible unfinished provision start timestamp from cache
|
||||
|
Loading…
Reference in New Issue
Block a user