Roman Levytskyi
06/02/2023, 11:57 AM{
"log.level": "error",
"@timestamp": "2023-06-02T11:50:25.391Z",
"log.logger": "cerbos.git.store",
"message": "Failed to check for updates",
"dir": "/work",
"error": "failed to pull from remote: worktree contains unstaged changes"
}
This is happening when I’m running tests in parallel:
1. constantly pushing random number of policies, both modified and new
2. constantly running process calling isAllowed
method on SDK
What could it be?
I’m afraid that when a policy is being modified and authz request is being received at the same time, the check could fail.
Also sometimes pod crashes and is being restarted with normal Shutting down
message, althought k8s resources are not limited.Charith (Cerbos)
Roman Levytskyi
06/02/2023, 1:22 PMRoman Levytskyi
06/02/2023, 1:55 PM/work
so it must be isolated per podCharith (Cerbos)
I’m afraid that when a policy is being modified and authz request is being received at the same time, the check could fail.That's not quite possible -- at least not in the sense of Cerbos returning a false positive. If the requested policy is already cached, then the request won't even hit the disk. If the policy is not cached, then there's a disk read to load the policy and if there happens to be git pull in the process, there's a really tiny chance that the file disappears or not fully written to disk yet. In either case, Cerbos will return a DENY because it can't read the policy.
Roman Levytskyi
06/02/2023, 2:06 PMRoman Levytskyi
06/02/2023, 2:07 PMCharith (Cerbos)
emptyDir
volume at /work
so that it's only tied to the pod lifetime. You won't need a persistent (not shared) volume unless your policy repo is huge and takes a long time to clone.Danylo Vivchar
11/25/2024, 9:27 AMShutting down
message, althought k8s resources are not limited.`?