Commit Graph

14 Commits

Author SHA1 Message Date
Dan Walsh 5531c8da65 Move storage/storage go objects to storage.
There is no reason for the extra directory level.

Also fixup some go lint issues
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-05-16 17:25:11 -04:00
Nalin Dahyabhai fad31b87c6 Replace MakeStore() with GetStore()
Replace MakeStore() with GetStore(), which now keeps a list of all
running Store instances, so that we can't accidentally instantiate two
objects which attempt to manage the same store at the same time.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-11-08 12:58:48 -05:00
Nalin Dahyabhai ba1210640c Switch MakeStore() to expecting an options struct
Switch MakeStore() to accepting an options structure instead of
individual arguments, so that adding options in the future won't require
rewriting logic that calls it, per discussion in issue #2.

This also lets the CLI wrapper pick up its defaults from the library, so
it no longer has to have them hard-coded.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-10-27 11:35:17 -04:00
Nalin Dahyabhai 8b5bb42d5d Reset default locations, use MkdirAll() more
Reset default locations to /var/{lib,run}/containers and not their
respective "storage" subdirectories.  Make sure we build parent
directories every time we import layers, since another actor deleting
them may clean up something that we need to recreate.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-10-25 16:18:13 -04:00
Nalin Dahyabhai 354307d2d2 Change default storage locations to .../containers
Use a generic name, instead of something that might create branding or
trademark confusion, for default locations for filesystem paths.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-09-29 15:34:21 -04:00
Nalin Dahyabhai 321373adb4 Add GetContainerDirectory/GetContainerRunDirectory
Add GetContainerDirectory and GetContainerRunDirectory methods to the
store, for getting the location of a directory in which the caller can
manage data directly.

This breaks the general model of keeping the library's caller from
having to bother with where things are stored once the library is
initialized, but is added so that ocid won't have to manage the
directory in which it's dropping files to be picked up by other
binaries, in particular configuration files that it's leaving for runc.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-09-23 14:24:22 -04:00
Nalin Dahyabhai a6f7a6fe7b Add UID/GID map arguments to MakeStore()
The store needs to be able to have UID/GID maps passed to it at
initialization-time.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-09-06 17:22:03 -04:00
Nalin Dahyabhai 87dfe2feb0 Rename Mall objects to Store objects
Rename the Mall interface to Store, and the Store interface to
FileBasedStore.  This is why you don't want me naming things, people.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-08-31 17:34:33 -04:00
Nalin Dahyabhai cfec7d383f Add big-data lookasides to containers
Add a BigDataStore interface to the container store, too, so that
callers can use it to store items like container configurations, which
can get pretty complex.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-08-19 14:13:57 -04:00
Nalin Dahyabhai 138702b749 Add a notion of a runtime directory
Add a notion of a runtime directory, to store non-persistent state
information, and use it to store mount locations at run-time.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-08-09 16:14:14 -04:00
Nalin Dahyabhai b50f33bf70 Add --json to many of the CLI commands
Add a --json flag to most of the CLI commands, to force output that
would have gone to stdout to be output as JSON instead of whatever form
it would otherwise take.  Error messages sent to stderr are still plain
text.

Use this chance to rework the wrapping logic so that it's more
consistent: commands that take multiple IDs attempt the specified
operation on all of them, and report errors afterward.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-20 17:47:43 -04:00
Nalin Dahyabhai 0764afb669 Fix gofmt/golint/go vet errors
Fix multiple errors flagged by gofmt, golint, and go vet checks.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:50 -04:00
Nalin Dahyabhai 60ff079996 Rename: cow/cowman -> storage/oci-storage
Rename the library module and CLI wrapper.
Rename daemon/graphdriver to drivers.
Catch up vendoring to match modules we've pruned.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:50 -04:00
Nalin Dahyabhai c28495d8f2 Rename from cow/cowman to storage/oci-storage
Rename the cow module and cowman tool to storage and oci-storage,
respectively.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:50 -04:00