You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 trovilo
3.) trovilo add ConfigMap (or correctly the content of the ConfigMap) on "disk"
4.) tovilo crashes
5.) Delete ConfigMap from above
6.) trovilo recovers
--> If a ConfigMap is deleted during a crash of trovilo the ConfigMap 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 the targetDir.
The text was updated successfully, but these errors were encountered:
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:
1.) trovilo get's started
2.) add a ConfigMap with the expected labels for trovilo
3.) trovilo add ConfigMap (or correctly the content of the ConfigMap) on "disk"
4.) tovilo container is stopped for updates/maintainance/whatever
5.) Delete ConfigMap from above
6.) trovilo starts
However to trigger this in a kubernetes context, trovilo have to write the configmaps content to a persistant volume.
So we have to find a way to sync the "on Disk" state with the state in the kubernetes API.
The following solutions come to my mind:
Managing the relation file <--> configmap in a seperate file in the target dir
use the predictable filenames as mapping.
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: