summaryrefslogtreecommitdiff
path: root/libpod
Commit message (Collapse)AuthorAge
* Make operations on pod containers as a group independentMatthew Heon2018-02-22
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #361 Approved by: rhatdan
* Fix gofmtMatthew Heon2018-02-22
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #361 Approved by: rhatdan
* Add ability to start containers in a podMatthew Heon2018-02-22
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #361 Approved by: rhatdan
* Add kill and stop for podsMatthew Heon2018-02-22
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #361 Approved by: rhatdan
* Add pod status commandMatthew Heon2018-02-22
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #361 Approved by: rhatdan
* Push up createConfig.CgroupParent processing to parentJhon Honce2018-02-22
| | | | | | | Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #370 Approved by: rhatdan
* Corrected commentJhon Honce2018-02-22
| | | | | | | Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #370 Approved by: rhatdan
* Implement podman run option --cgroup-parentJhon Honce2018-02-22
| | | | | | | | | | | Example: sudo /usr/local/bin/podman run --cgroup-parent=/zzz fedora cat /proc/self/cgroup Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #370 Approved by: rhatdan
* Performance enhancement for podman imagesbaude2018-02-20
| | | | | | | | | | | | | Previous code was using slow routines to collect some of the information needed to output images. Specifically size was being calculated instead of using the cached, already known size already available. Also, straight- lined several of the code paths. Overall assessment is that these improvements cut the time for images in half. Signed-off-by: baude <bbaude@redhat.com> Closes: #365 Approved by: mheon
* Ensure we don't repeatedly poll disk for exit codesMatthew Heon2018-02-20
| | | | | | | | | | | | Change logic for refreshing our state using runc to only poll for conmon exit files when we first transition to the Stopped state. After that, we should already have the exit code stored in the database, so we don't need to look it up again. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #363 Approved by: TomSweeneyRedHat
* Change uptime format in `podman info` to human-readableMatthew Heon2018-02-19
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #355 Approved by: rhatdan
* Remove unused registry related options from libpodMatthew Heon2018-02-19
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #349 Approved by: rhatdan
* Add FFJSON encoding/decoding for our container structsMatthew Heon2018-02-16
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #323 Approved by: mheon
* Squash logged errors from failed SQL rollbacksMatthew Heon2018-02-15
| | | | | | | | | | | | | | | | Currently we unconditionally roll back transactions after error, even if a commit has already been attempted. Commit is guaranteed to end a transaction, though, whether by successfully committing or by rolling back if that fails. As such, we attempt a double rollback if a transaction fails at commit (for example, for a constraint violation), which doesn't error but does log angry warning messages. Ensure we don't try rolling back after commit runs to prevent this. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #327 Approved by: rhatdan
* 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