diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2018-09-21 11:40:50 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-21 11:42:06 -0700 |
commit | b4321f444727cc64da0b29623764223e48dbfddd (patch) | |
tree | 3a570479ba67b87707ce7e0946e4cacfc40caca8 /runsc/container/BUILD | |
parent | b63c4bfe02d1b88eb12d75d0c7051a006d5cbe7d (diff) |
runsc: Synchronize container metadata changes with a file lock.
Each container has associated metadata (particularly the container status) that
is manipulated by various runsc commands. This metadata is stored in a file
identified by the container id.
Different runsc processes may manipulate the same container metadata, and each
will read/write to the metadata file.
This CL adds a file lock per container which must be held when reading the
container metadata file, and when modifying and writing the container metadata.
PiperOrigin-RevId: 214019179
Change-Id: Ice4390ad233bc7f216c9a9a6cf05fb456c9ec0ad
Diffstat (limited to 'runsc/container/BUILD')
-rw-r--r-- | runsc/container/BUILD | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runsc/container/BUILD b/runsc/container/BUILD index d289e43be..72e2304bf 100644 --- a/runsc/container/BUILD +++ b/runsc/container/BUILD @@ -28,6 +28,7 @@ go_library( "//runsc/sandbox", "//runsc/specutils", "@com_github_cenkalti_backoff//:go_default_library", + "@com_github_gofrs_flock//:go_default_library", "@com_github_opencontainers_runtime-spec//specs-go:go_default_library", ], ) |