kubernetes-retired/external-storage

Why is there no leader election scheme for deleting a volume

windayski opened this issue · 2 comments

I looked through the code of ProvisionController. I found there is only one controller could become leader to provision a volume for a given claim. But I am confused that all controllers request to delete volume for one claim. Why is there no leader election scheme for deleting a volume?

For provisioning, the fear is that if 2 controllers race then a volume will be leaked. For deleting, if 2 controllers race the end result should still be that the volume is gone.

@wongma7 Thanks for reply. You're right. But it may cause duplicate requests for deleting and sending useless workload to back-end apis.