-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible race condition? #21
Comments
I think this race condition exists. However does not need a crash to trigger this. I think this timeline will also not delete the configmap: However to trigger this in a kubernetes context, trovilo have to write the configmaps content to a persistant volume. Deleting a key from a configmap results in the same behaviour. trovilo will not delete that file. https://github.com/inovex/trovilo/blob/master/configmap/configmap.go#L125 So we have to find a way to sync the "on Disk" state with the state in the kubernetes API.
Solution 2 does not allow the user to place own files in the target dir. This might be a problem. E.g. if the user want to place some static/default config files in the target dir. |
Currently there is a possible race condition in the way trovilo is implemented (AFAIK):
Imagine the following flow:
1.) trovilo get's started
2.) add a
ConfigMap
with the expected labels for trovilo3.) trovilo add
ConfigMap
(or correctly the content of theConfigMap
) on "disk"4.) tovilo crashes
5.) Delete
ConfigMap
from above6.) trovilo recovers
--> If a
ConfigMap
is deleted during a crash of trovilo theConfigMap
will never be clean up, correct? Since this line will never be called https://github.com/inovex/trovilo/blob/master/cmd/trovilo/main.go#L104 or to be precisly trovilo never checks the initial state of thetargetDir
.The text was updated successfully, but these errors were encountered: