Commit graph

42 commits

Author SHA1 Message Date
Matthew Heon cf0e5c6774 Fix review comments
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
Matthew Heon 32be712cd3 Change standard config path and add override config
The standard config has moved to /usr/share/containers/ per
discussion. An override configuration file is allowed at the
previous /etc/containers/ location. This override will be used in
place of the normal config if both are present, and exists to
override distro packaged configs without modifying the standard
config.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
Matthew Heon bd8557da85 Fix Conmon error to display Conmon paths
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
Matthew Heon d589c9fc38 Add support to load runtime configuration from config file
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
Matthew Heon e7296152f8 Add ability to dump config to file as TOML
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
Matthew Heon abd2ae7a0c Change conmon and runtime paths to arrays
This allows more graceful handling of multiple paths in a config
file.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
baude fd388a7da9 podman info add registries
add registries and insecure registries to the podman info output.  this gives us
some capatibility with other container runtimes.

Resolves issue #420

Signed-off-by: baude <bbaude@redhat.com>

Closes: #422
Approved by: mheon
2018-02-28 21:26:46 +00:00
Valentin Rothberg 2a59653bf3 CNIPluginDir: check "/usr/lib/cni"
Also consider "/usr/lib/cni" as a potential directory for CNI plugins.
On some distributions, e.g., on openSUSE, %{_libexecdir} evaluates to
"/usr/lib".

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #416
Approved by: mheon
2018-02-28 14:48:26 +00:00
baude 9f7643c364 Add ubuntu paths
The packages in Lokesh's ppa that is currently used for podman puts the
conmon and runc binaries in /usr/lib/crio/bin/conmon and /usr/lib/cri-o-runc/sbin/runc
respectively.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #406
Approved by: baude
2018-02-26 20:37:30 +00:00
Matthew Heon 07f15c2694 Remove unused registry related options from libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #349
Approved by: rhatdan
2018-02-19 14:17:18 +00:00
Matthew Heon b4cdc27b31 Add implementation for BoltDB-backed state
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #184
Approved by: baude
2018-02-12 14:28:07 +00:00
baude 7f6a141839 libpod/runtime.go: Stick paths in arrays
To account for more path possibilities, we now iterate
a string array of possible paths to try and find paths
to runc and conmon.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #278
Approved by: baude
2018-01-31 20:23:36 +00:00
baude ecb74aa406 libpod/runtime.go: runtime path
Ubuntu installs runc to /usr/sbin/runc so we now account
for that.  Also, added  small check when creating a new
runtime that if we cannot find the runc binary, we bail
out.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #276
Approved by: baude
2018-01-31 15:27:14 +00:00
Matthew Heon c60d8a0671 Add StopWithTimeout API function for containers
Normal Stop should not need a timeout, and should use the default
Add a function that does accept a timeout aside it

Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #272
Approved by: rhatdan
2018-01-30 05:02:12 +00:00
Daniel J Walsh 0d69ca6637 Fix seccomp support
If user does not specify seccomp file or seccomp file does not exist,
then use the default seccomp settings.

Still need to not hard code /etc/crio/seccomp.json, should move this to
/usr/share/seccomp/seccomp.json

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #233
Approved by: baude
2018-01-18 12:26:43 +00:00
Matthew Heon aa20a25ca0 Address review comments
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #229
Approved by: rhatdan
2018-01-17 15:26:43 +00:00
Matthew Heon b814a94c34 Wire in logic for selecting backing state impl
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #229
Approved by: rhatdan
2018-01-17 15:26:43 +00:00
Matthew Heon 9c5a42eb1f Remove unused fields from runtime config
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #212
Approved by: rhatdan
2018-01-12 17:01:36 +00:00
Matthew Heon 240e5789d4 Update CNI plugin directories to search default location as well
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-01-11 10:10:46 -05:00
Matthew Heon 2188167909 Remove vendored files unnecessary after Kube hostport removal
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #189
Approved by: mheon
2018-01-08 20:48:31 +00:00
Matthew Heon 5c5c024e80 Remove Kubernetes hostport support
This can now be handled by CNI plugins, so let them manage ports
instead.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #189
Approved by: mheon
2018-01-08 20:48:31 +00:00
baude 1a48c426c9 Extend search path for conmon
Adding /usr/libexec/crio/conmon to the list of places to
look for conmon.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #172
Approved by: rhatdan
2018-01-02 16:03:02 +00:00
Daniel J Walsh 1f49f555af Plumb through the --stop-timeout signal handling
podman run/create have the ability to set the stop timeout flag.
We need to stop it in the database.

Also Allowing negative time for stop timeout makes no sense, so switching
to timeout of uint, allows user to specify huge timeout values.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #158
Approved by: TomSweeneyRedHat
2017-12-20 18:10:43 +00:00
Matthew Heon 7981b7636b Change default directory for CNI plugins
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #109
Approved by: mheon
2017-12-14 23:59:22 +00:00
Matthew Heon 840eb04e03 Add iptables integration to network code
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #109
Approved by: mheon
2017-12-14 23:59:21 +00:00
Matthew Heon 2bc20dd4d2 Wire in net plugin into libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #109
Approved by: mheon
2017-12-14 23:59:21 +00:00
Matthew Heon bf0d359047 Remove lock existence checks when creating pods/containers
Given that we don't have a good way of cleaning up locks, these
could potential cause issues if we ever reuse a container or pod
ID

Also changes locks dir to use tmpfs, as we can't directly clean
up locks

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #138
Approved by: rhatdan
2017-12-14 18:18:16 +00:00
umohnani8 5330d3da7c Update kpod info to use new libpod api
Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #124
Approved by: mheon
2017-12-14 00:54:21 +00:00
Daniel J Walsh 12682aa475
Merge pull request #72 from mheon/file_locking
Move containers to file locks from c/storage
2017-12-11 10:48:29 -06:00
Matthew Heon b71cde19c8 Add ability to refresh state in DB
Also, ensure we always recreate runtime spec so our net namespace
paths will be correct

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-07 13:15:34 -05:00
Matthew Heon 92bc448624 Fix potential race condition in initializing libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 14:45:49 -05:00
Matthew Heon ae5aac50aa Add handling for system restart in libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 14:29:59 -05:00
Matthew Heon e9298a533a Remove SQL state locking and rely on sqlite locking
Also renames some parameters from locksDir -> lockDir for
consistency.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 13:40:27 -05:00
Matthew Heon abfd18b0db Move containers to file locks from c/storage
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 13:39:44 -05:00
Daniel J Walsh 55c8b69d8f When shutting down the runtime we should always close the database
Even if the storage fails to shutdown. This patch fixes on TODO.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #97
Approved by: mheon
2017-12-04 17:17:06 +00:00
Daniel J Walsh cefa782e50 Move libpod under containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #65
Approved by: mheon
2017-11-29 20:40:50 +00:00
Matthew Heon bbef986214 Fix comment on container.Stop()
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #68
Approved by: rhatdan
2017-11-29 12:15:15 +00:00
Matthew Heon 4f8fe2b810 Shut down containers when force stopping the runtime
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #68
Approved by: rhatdan
2017-11-29 12:15:15 +00:00
TomSweeneyRedHat d43f786728 Add docker transport to push image before final failure
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #42
Approved by: rhatdan
2017-11-28 12:53:25 +00:00
Matthew Heon 57300be94d Fix segfault cleaning up in after failing to create a Runtime
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:58:48 -05:00
Matthew Heon 763e372649 Wire SQL backed state into rest of libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:58:48 -05:00
Matthew Heon a031b83a09 Initial checkin from CRI-O repo
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-01 11:24:59 -04:00