diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-12-02 23:06:00 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-12-10 10:46:06 -0500 |
commit | 0436cf29e57b3118c6fa22597240731913556a6f (patch) | |
tree | 3e40f7039b1d5ef54d628d2a056cd18e1d559c52 /seccomp.json | |
parent | 1368eaf1ba88b26c612f3fec809584c686cdd596 (diff) | |
download | podman-0436cf29e57b3118c6fa22597240731913556a6f.tar.gz podman-0436cf29e57b3118c6fa22597240731913556a6f.tar.bz2 podman-0436cf29e57b3118c6fa22597240731913556a6f.zip |
Ensure volumes reacquire locks on state refresh
After a restart, pods and containers both run a refresh()
function to prepare to run after a reboot. Until now, volumes
have not had a similar function, because they had no per-boot
setup to perform.
Unfortunately, this was not noticed when in-memory locking was
introduced to volumes. The refresh() routine is, among other
things, responsible for ensuring that locks are reserved after a
reboot, ensuring they cannot be taken by a freshly-created
container, pod, or volume. If this reservation is not done, we
can end up with two objects using the same lock, potentially
needing to lock each other for some operations - classic recipe
for deadlocks.
Add a refresh() function to volumes to perform lock reservation
and ensure it is called as part of overall refresh().
Fixes #4605
Fixes #4621
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'seccomp.json')
0 files changed, 0 insertions, 0 deletions