summaryrefslogtreecommitdiff
path: root/libpod
Commit message (Collapse)AuthorAge
* Streamline image resolutionbaude2018-01-23
| | | | | | | | | When trying to determine if a user-provided string that describes an image (ID, fq name, shortname, tagged), there were some inefficiencies where we looked up images multiple times to derive information about local images. Signed-off-by: baude <bbaude@redhat.com>
* libpod/oci.go: Perf issuebaude2018-01-23
| | | | | | | | | | | | Matt Heon and I found that a defer statement was costing podman run dearly. We dont think the defer function was working (nor needed) and was timing out as well. Removing this defer statement decreased podman runtime by 1.5s or more. Signed-off-by: baude <bbaude@redhat.com> Closes: #253 Approved by: baude
* Fix issues with podman ps from QEumohnani82018-01-22
| | | | | | | | | | | | | QE pointed out a few things missing/wrong with ps This PR addresses those issues. Added functionality for getting mounts and size also Fixed a few issues with the --filter params, for example filter with partial information. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #250 Approved by: rhatdan
* Expose ports from imagebaude2018-01-22
| | | | | | | | | | | | When an image has a port to expose, we need to expose it. User's input overrides the image's port information. Also, enable port information in ps so we can see which random port is assigned. Signed-off-by: baude <bbaude@redhat.com> Closes: #249 Approved by: rhatdan
* Override hostname for containerbaude2018-01-21
| | | | | | | | | | | Adds the ability to override the container's hostname. Also, uses the first twelve characters of the container ID as the default hostname if none is provided. Signed-off-by: baude <bbaude@redhat.com> Closes: #248 Approved by: baude
* Enable port bindingsbaude2018-01-20
| | | | | | | | | | | | | Set up nbetworking ports for the following use cases: * bind the same port between host and container * bind a specific host port to a different container port * bind a random host port to a specific container port Signed-off-by: baude <bbaude@redhat.com> Closes: #214 Approved by: baude
* Cleanup of podman statsDaniel J Walsh2018-01-19
| | | | | | | | | | | | Fix errors when containers are not running. --all, --latest, containers can not be used at same time. Should match the output of docker stats, 0 values replaced by "--" Should return stats right away if container is not running. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #244 Approved by: TomSweeneyRedHat
* Add --dns-search, --dns-opt, --dns-server and --add-host.baude2018-01-19
| | | | | | | | | | | | | | | | | | Each of these options are destructive in nature, meaning if the user adds one of them, all current ones are removed from the produced resolv.conf. * dns-server allows the user to specify dns servers. * dns-opt allows the user to specify special resolv.conf options * dns-search allows the user to specify search domains The add-host option is not destructive and truly just adds the host to /etc/hosts. Signed-off-by: baude <bbaude@redhat.com> Closes: #231 Approved by: mheon
* Fix gofmtMatthew Heon2018-01-18
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Rename containerRuntimeInfo to containerState for clarityMatthew Heon2018-01-18
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Rename ContainerState to ContainerStatusMatthew Heon2018-01-18
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Split container.go into three filesMatthew Heon2018-01-18
| | | | | | | | | Weighing in at ~1700 lines, container.go is just too big. Split it into three files: core structs and accessors (container.go), public API (container_api.go), and internal functions (container_internal.go). Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Fix seccomp supportDaniel J Walsh2018-01-18
| | | | | | | | | | | | | 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
* Fix gofmtMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Fix in-memory state testsMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Convert remaining state tests to new styleMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Add ability to get dependencies of a containerMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Fix comment typoMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Fix gofmtMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Address review commentsMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Wire in logic for selecting backing state implMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Do no lint test helpersMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Modify unit tests for state to run on all state implementationsMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Change handling for pods in libpod stateMatthew Heon2018-01-17
| | | | | | | | | | Add new functions to update pods and add/remove containers from them Use these new functions in place of manually modifying pods Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Add ability to retrieve a pod's container from the stateMatthew Heon2018-01-17
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
* Ensure batched containers have locksMatthew Heon2018-01-16
| | | | | | | | | | | This won't matter during batched operatins, but if the container leaks outside of the Batch() function it will segfault if asked to do any operation that locks unless this is applied Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #226 Approved by: rhatdan
* Fix lint issuesMatthew Heon2018-01-16
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #220 Approved by: rhatdan
* Prevent containers with dependencies from being removedMatthew Heon2018-01-16
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #220 Approved by: rhatdan
* Add ability for states to track container dependenciesMatthew Heon2018-01-16
| | | | | | | | | | | Also prevent containers with dependencies from being removed from in memory states. SQLite already enforced this via FOREIGN KEY constraints. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #220 Approved by: rhatdan
* Add API for sharing namespacesMatthew Heon2018-01-16
| | | | | | | | | | Remove existing code for sharing namespaces and replace with use of this API Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #220 Approved by: rhatdan
* Add support for shared CGroup namespacesMatthew Heon2018-01-16
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #220 Approved by: rhatdan
* Add support for joining shared namespaces in libpodMatthew Heon2018-01-16
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #220 Approved by: rhatdan
* When performing state-changing operations, don't exec runtimeMatthew Heon2018-01-16
| | | | | | | | | | | | | | If we start a container and it does not error, we can assume the container is now running. Subsequent API calls will sync for us to see if it died, so we can just set ContainerStateRunning instead of launching the runtime to explicitly get state. The same logic applies to pause and unpause. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #223 Approved by: rhatdan
* Add DNS and security fields to DBMatthew Heon2018-01-15
| | | | | | | | | | | | | | | | | Also moves port mappings out of the SQL DB and into a file on disk. These could get very sizable (hundred to thousands of ports) so moving them out to a file will keep the DB small and fast. Finally, add a foreign key reference from container ID to container state ID. This ensures we never get into an inconsistent state where we have data in one table but not the other. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #225 Approved by: baude
* Fix gofmtMatthew Heon2018-01-14
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #222 Approved by: rhatdan
* Add Sync() function to updating ctr state in Batch()Matthew Heon2018-01-14
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #222 Approved by: rhatdan
* Disable locking on functions in batch operationsMatthew Heon2018-01-14
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #222 Approved by: rhatdan
* Add initial function batching APIMatthew Heon2018-01-14
| | | | | | | | | Disabling locking/syncing in a batched operation not yet implemented Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #222 Approved by: rhatdan
* Remove unused fields from runtime configMatthew Heon2018-01-12
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #212 Approved by: rhatdan
* Merge pull request #211 from mheon/wireup_backendsDaniel J Walsh2018-01-12
|\ | | | | Wire up API for CGroup Parent
| * Add ability to set CGroup Parent via APIMatthew Heon2018-01-10
| | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* | Merge pull request #215 from mheon/update_cniDaniel J Walsh2018-01-12
|\ \ | | | | | | Update OCICNI vendor and plugin directories
| * | Update CNI plugin directories to search default location as wellMatthew Heon2018-01-11
| | | | | | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
| * | Fix build error after updating CNI vendorMatthew Heon2018-01-11
| |/ | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* | podman run container id to filebaude2018-01-11
| | | | | | | | | | | | | | | | | | | | podman run --cidfile /tmp/foo writes the container's id to a file. Signed-off-by: baude <bbaude@redhat.com> Closes: #205 Approved by: rhatdan
* | Add support for shm-size.Daniel J Walsh2018-01-11
|/ | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #206 Approved by: TomSweeneyRedHat
* Update DB to add new fields required for planned featuresMatthew Heon2018-01-10
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #209 Approved by: rhatdan
* Add latest to waitbaude2018-01-08
| | | | | | | | | | | | It is desirable to have a --latest switch on the podman wait command so we can wait on the latest container created to end. Also, fixes a panic with latest where no containers are available. Signed-off-by: baude <bbaude@redhat.com> Closes: #201 Approved by: baude
* Fix merge issuesMatthew Heon2018-01-08
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #189 Approved by: mheon
* Remove vendored files unnecessary after Kube hostport removalMatthew Heon2018-01-08
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #189 Approved by: mheon