Closed sebgl closed 4 years ago
What version are you using? This repo is deprecated, and the local provisioner has moved to https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner
I believe some issues in this area have been fixed in later versions, such as https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/pull/174
Oh, sorry about that I missed the deprecated repo!
I'm using quay.io/external_storage/local-volume-provisioner:v2.2.0
, will update to the latest version. It indeed looks a lot like the issue you pointed out.
Thanks @msau42!
I got into a situation where a data volume managed by the local volume provisioner got mounted with existing data, that should normally have been cleaned up beforehand.
Looking at the sequence of events in the logs, I'm wondering if there could be a stale cache/state machine bug somewhere.
There's a first PV deletion at
05:25:23.110378
:After which I would expect some logs indicating a new volume has been found, similar to what happens at
05:37:43.665501
, but there's none.Then, we get a second PV deletion at
05:37:33.655461
:Note here that there was no
Deleting PV file volume
log message before that deletion.The volume is then recreated at
05:37:43.672479
:What I observed on my side is an application mounting that volume 1 hour later. The volume contains the data that existed there at
05:36
, before the "bad" cleanup that happened at05:37:33.655461
.It looks to me, but I may be wrong, that something went wrong in the cleanup state. I don't see any error in the logs.
It happened only once out of many runs, I'm not able to easily reproduce.