Commit Graph

11 Commits

Author SHA1 Message Date
Valentin Rothberg 8017d7a735 add digest locks
Add a method to generate a lock file for a specific digest.  Such a
digest-specific lock file is needed to synchronize threads and processes
when copying blobs from a registry to the containers-storage.

Whenever a layer is about to get copied, the lock must be acquired which
indicates to other processes and threads that the layer/blob is already
being copied.

To avoid leaking file descriptors for long-living users of
containers/storage, such as CRI-O, open and close the file on demand
during Lock() and Unlock().  The internal reference counters allows to
determine if we are the first or last user.

Note: as deleting the lock files is subject to race conditions, we place
the lock files in a graph-specific directory in the runroot.  Since the
runroot is a tmpfs, the files will be cleanup during reboot.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-03-28 09:53:02 +01:00
Nalin Dahyabhai 852c5a4a5d Update generated files
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-03-06 15:06:35 -05:00
Nalin Dahyabhai 096e5b23e7 Update generated files
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-02-07 10:27:36 -05:00
Nalin Dahyabhai e87802be3e Update generated files
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-01-17 14:30:04 -05:00
Nalin Dahyabhai e358e50c67 Update generated files
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2018-05-30 17:18:10 -04:00
Nalin Dahyabhai 0a4c1e32ca Update generated files
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2018-05-07 10:38:17 -04:00
Nalin Dahyabhai 08b614b4c8 Update generated files
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2018-04-03 10:34:32 -04:00
Nalin Dahyabhai 986c508887 Update ffjson-generated files
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2018-03-07 17:07:39 -05:00
Nalin Dahyabhai 1824cf917a Add explicitly-settable digest values for images
Add explicitly-settable digest values for images that are treated mostly
like the implicit digests that we track for manifests, for the sake of
v1 images which have manifests that need to be preprocessed before being
digested to produce an image's digest value.  We'll still have the
digest of the unprocessed manifest, but that shouldn't hurt.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-12-11 16:16:46 -05:00
Nalin Dahyabhai 2a564455fd Add a notion of image "digests" based on their "manifest" data
Add a "digest" of an image that is equal to the digest of its big data
item named "manifest", if it has one, that we can index and use for
locating images.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-11-16 11:52:25 -05:00
Nalin Dahyabhai f109e5ac0c Make sure layers_ffjson.go is always current
Add a rule to make sure that layers_ffjson.go is regenerated whenever
we've updated layers.go, and do the same for images.go and containers.go.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-10-13 14:18:40 -04:00