summaryrefslogtreecommitdiff
path: root/libpod
Commit message (Collapse)AuthorAge
* Make libpod build on 32-bit systemsMatthew Heon2018-02-13
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #324 Approved by: rhatdan
* Address review commentv0.2Matthew Heon2018-02-12
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #184 Approved by: baude
* Add buckets for all containers and all podsMatthew Heon2018-02-12
| | | | | | | | | | | Now, we don't need to use the global ID registry to iterate - we can iterate only through containers or only through pods, without having to iterate through both. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #184 Approved by: baude
* Containers in a pod can only join namespaces in that podMatthew Heon2018-02-12
| | | | | | | | | | | | | | This solves some dependency problems in the state, and makes sense from a design standpoint. Containers not in a pod can still depend on the namespaces of containers joined to a pod, which we might also want to change in the future. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #184 Approved by: baude
* Fix gofmt and lintMatthew Heon2018-02-12
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #184 Approved by: baude
* Check error when checking ctr dependenciesMatthew Heon2018-02-12
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #184 Approved by: baude
* Refactor Pod to use a Config structMatthew Heon2018-02-12
| | | | | | | | | | | | This allows us to JSON it and stuff it in the DB - previously, all pod fields were private, so JSON couldn't encode them. This allows us to keep all pod fields private by having a substruct with public fields. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #184 Approved by: baude
* Add pod functions to BoltDB stateMatthew Heon2018-02-12
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #184 Approved by: baude
* Add pod bucketsMatthew Heon2018-02-12
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #184 Approved by: baude
* Add implementation for BoltDB-backed stateMatthew Heon2018-02-12
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #184 Approved by: baude
* Change json to match docker inspectDaniel J Walsh2018-02-11
| | | | | | | | | | Changing these fields caused the output of podman inspect to more closely match docker inspect. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #306 Approved by: mheon
* Fix libpod to use given CGroup parent instead of a hardcoded oneMatthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #319 Approved by: TomSweeneyRedHat
* libpod/finished_amd64.go -> libpod/finished64.gobaude2018-02-09
| | | | | | | | | | | | Rename finished_amd64 to finished64.go to more accurately reflect that it covers all 64bit arches. Also, bumped the EPOCH for gitvalidation to speed up validations. Signed-off-by: baude <bbaude@redhat.com> Closes: #318 Approved by: mheon
* Fix further style issuesMatthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Allow removing pods with running containers if --force is givenMatthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Address style issues in in_memory_stateMatthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Fix gofmt and lintMatthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Finish unit tests for podsMatthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Fix bugs identified by unit testsMatthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Rework state tests to avoid boilerplate. Begin adding pod tests.Matthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Unify Pod and Container ID and Name registries for in-memory stateMatthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Remove read-only from DB, it's in the specMatthew Heon2018-02-09
| | | | | | | | | Don't need to store it separately Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Add pod removal codeMatthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Implement pod operations in SQL stateMatthew Heon2018-02-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* Tear out pod containers map. Instead rely on stateMatthew Heon2018-02-09
| | | | | | | | | | This ensures that there is only one canonical place where containers in a pod are stored, in the state itself. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
* cleanup network stack as well as storage when container shuts down.Daniel J Walsh2018-02-08
| | | | | | This patch will cleanup the network stack when the container exits Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #293 from rhatdan/sd_notifyMatthew Heon2018-02-07
|\ | | | | Need to add LISTEN_PID environment variable to conmon command
| * Need to add LISTEN_PID environment variable to conmon commandDaniel J Walsh2018-02-05
| | | | | | | | | | | | | | Without this field then conmon will not pass the proper data down to the OCI Runtime. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #309 from mheon/pause_state_errorDaniel J Walsh2018-02-07
|\ \ | | | | | | Change pause so only running containers are valid
| * | Change pause so only running containers are validMatthew Heon2018-02-07
| | | | | | | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | Merge pull request #289 from TomSweeneyRedHat/dev/tsweeney/usernameDaniel J Walsh2018-02-07
|\ \ \ | |/ / |/| | Change un/pwd handling to match Buildah's
| * | Change un/pwd handling to match Buildah'sTomSweeneyRedHat2018-02-06
| |/ | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
* | Error on attempting to restart containerMatthew Heon2018-02-07
| | | | | | | | | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #304 Approved by: baude
* | Change stop signal default to SIGTERMMatthew Heon2018-02-06
|/ | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #299 Approved by: rhatdan
* Pass NOTIFY_SOCKET and LISTEN_FDS env to OCI RUntime if setDaniel J Walsh2018-02-05
| | | | | | | | | | | | | | In order to have sd_notify from systemd to work in containers we need to pass down the NOTIFY_SOCKET environment variable to the container. LISTEN_FDS, tells the application inside of the container to use socket activation and grab the FDS that are leaked into the container. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #271 Approved by: umohnani8
* Allow users to specify logpathDaniel J Walsh2018-02-03
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #135 Approved by: mheon
* Migrate Create|Commit to ginkgobaude2018-02-02
| | | | | | | | | | | | Migrate create and commit bats tests to the ginkgo test suite. In doing so, some structures had to be moved to pkg/podmanstructs/podmanstructs.go so we could do better verification of test results. Signed-off-by: baude <bbaude@redhat.com> Closes: #286 Approved by: rhatdan
* Update stats code to reflect changes to containerd stats APIMatthew Heon2018-02-01
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* libpod/runtime.go: Stick paths in arraysbaude2018-01-31
| | | | | | | | | | | 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
* Ginkgo Tests: ps, pull, push and rmbaude2018-01-31
| | | | | | | | | | | | | Migrate ps, pull, push, and rm from bats to ginkgo. Also, fixed a conditional issue with adding ports when an image defines the port and the user wants to override it. Signed-off-by: baude <bbaude@redhat.com> Closes: #277 Approved by: baude
* libpod/runtime.go: runtime pathbaude2018-01-31
| | | | | | | | | | | | 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
* libpod/container_api: Set hostname in ENVbaude2018-01-30
| | | | | | | | | | The container's hostname should be set as an environment variable for the container. Signed-off-by: baude <bbaude@redhat.com> Closes: #273 Approved by: baude
* Add StopWithTimeout API function for containersMatthew Heon2018-01-30
| | | | | | | | | | 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
* Strip unused format specifierMatthew Heon2018-01-27
| | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #263 Approved by: umohnani8
* Close attach control fileMatthew Heon2018-01-27
| | | | | | | | | From CRI-O #1288 Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #263 Approved by: umohnani8
* Save --privileged stateDaniel J Walsh2018-01-25
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #255 Approved by: mheon
* Fix podman stats based on QE feedbackumohnani82018-01-25
| | | | | | | | | | | | QE found issues with formatting the go template and the man page was lacking information. Changed the format of the output to match latest docker. Add shortID function that returns the truncated ID Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #258 Approved by: rhatdan
* 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