summaryrefslogtreecommitdiff
path: root/cmd/podman/ps.go
Commit message (Collapse)AuthorAge
* Fix ps filter with key=value labelsJoshua Roys2018-07-16
| | | | | Closes: #1101 Approved by: rhatdan
* Change logic for detecting conflicting flags in psMatthew Heon2018-07-13
| | | | | | | | | | | | There's no reason --size cannot be used together with a Go template - in fact, using a Go template for {{.Size}} without --size being passed will not work. Allow use of --namespace and --size with Go templates, but not with --quiet. Do not allow --namespace and --size at the same time. Signed-off-by: Matthew Heon <mheon@redhat.com>
* Only print container size JSON if --size was requestedMatthew Heon2018-07-13
| | | | | | | To do this, move it into a separate struct, and embed that in the JSON we return. Signed-off-by: Matthew Heon <mheon@redhat.com>
* Don't print rootfs and rw sizes if they're emptyMatthew Heon2018-07-13
| | | | | | | | | | | | We're printing them unconditionally now, even if --size is not passed, which is confusing (you see a pair of 0s for container size, when it is clearly not 0). This may introduce bugs related to containers with an rwsize of 0 (freshly created from an image) and --size specified, but is definitely better than what we have now. Signed-off-by: Matthew Heon <mheon@redhat.com>
* Major fixes to podman ps --format=json outputMatthew Heon2018-07-13
| | | | | | | | | | | | | A number of fields were never being populated. Populate them as best we can. Add a new field, exited, to indicate whether the exit code has meaning (IE, the container has exited). Fix handling of running time - it stops ticking when the container stops. There is further work needed here, I suspect. Signed-off-by: Matthew Heon <mheon@redhat.com>
* Ignore running containers in ps exit-code filtersMatthew Heon2018-07-13
| | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
* Record whether the container has exitedMatthew Heon2018-07-13
| | | | | | | | Use this to supplement exit codes returned from containers, to make sure we know when exit codes are invalid (as the container has not yet exited) Signed-off-by: Matthew Heon <mheon@redhat.com>
* Changed container status of Unknown from being printed as Dead to Error in Pshaircommander2018-07-12
| | | | | | | Signed-off-by: haircommander <pehunt@redhat.com> Closes: #1083 Approved by: rhatdan
* Containers can dissappearDaniel J Walsh2018-06-26
| | | | | | | | | | | | Between the time that ps command gets the list of containers and is able to ask for more data, the container could have exited. This patch logs Clibpod.ErrNoSuchCtr errors and just continues processing. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #996 Approved by: mheon
* Added --sort to pshaircommander2018-06-19
| | | | | | | | | Also podman ps now allows user to only output size of root FS, changed language of images and ps --sort to be by "created" as opposed to "time", and refactored the way templates are created (converted from psJSONParams type). Signed-off-by: haircommander <pehunt@redhat.com> Closes: #948 Approved by: rhatdan
* Implement --latest for psMatthew Heon2018-06-14
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #944 Approved by: rhatdan
* Correctly report errors retrieving containers in psMatthew Heon2018-06-14
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #944 Approved by: rhatdan
* add podman container and image commandDaniel J Walsh2018-06-13
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #941 Approved by: TomSweeneyRedHat
* sort containers and images by create timebaude2018-05-30
| | | | | | | | | | | | When running podman ps or podman images, the containers and images should be sorted by newest to oldest. Resolves: #830 Signed-off-by: baude <bbaude@redhat.com> Closes: #848 Approved by: mheon
* podman create, start, getattachsocketbaude2018-05-21
| | | | | | | | | First pass at implement API endpoints for create and start. Signed-off-by: baude <bbaude@redhat.com> Closes: #805 Approved by: baude
* Fix calculation of RunningFor in ps json outputMatthew Heon2018-05-05
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #727 Approved by: rhatdan
* varlink containersbaude2018-05-03
| | | | | | | | | | | | | first pass at adding in the container related endpoints/methods for the libpod backend. Couple of important notes: * endpoints that can use a console are not going to be done until we have "remote" console * several of the container methods should probably be able to stream as opposed to a one-off return Signed-off-by: baude <bbaude@redhat.com> Closes: #708 Approved by: baude
* varlink imagesbaude2018-04-26
| | | | | | | | | | | | | implement varlink image functions for working with libpod with the exception of a couple due to incompletions on the libpod side of things (build). also, created a first pass at a libpodpy package which will stand as a client to working with libpod's varlink methods using python. Signed-off-by: baude <bbaude@redhat.com> Closes: #669 Approved by: baude
* Stage3 Image Librarybaude2018-03-14
| | | | | | | | | | | | | This represents the stage3 implementation for the image library. At this point, we are moving the image-centric functions to pkg/image including migration of args and object-oriented references. This is a not a one-for-one migration of funcs and some funcs will need to continue to reside in runtime_img as they are overly specific to libpod and probably not useful to others. Signed-off-by: baude <bbaude@redhat.com> Closes: #484 Approved by: baude
* Fix a potential race around container removal in psMatthew Heon2018-03-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #467 Approved by: baude
* podman ps command string too longbaude2018-03-09
| | | | | | | | | | | | The default outout for podman ps should limit itself if the command is long. If the command is more than 20 characters, we truncate the command and add an elipses to it. Resolves: #464 Signed-off-by: baude <bbaude@redhat.com> Closes: #466 Approved by: rhatdan
* ps displays incorrect exit codebaude2018-02-26
| | | | | | | | | | | | The exit code should be derived in the batch operation and pulled from the batchinfo struct. Resolves issue #407 Signed-off-by: baude <bbaude@redhat.com> Closes: #408 Approved by: rhatdan
* podman ps json output use batched opsbaude2018-02-23
| | | | | | | | | | | The podman ps command for non-json targets has the ability to use a "batched" function which limits the use of locks needed. The collection of output for JSON should use this too. Signed-off-by: baude <bbaude@redhat.com> Closes: #380 Approved by: rhatdan
* PS performance cleanupsbaude2018-02-14
| | | | | | | | | | | By not getting data that we don't need and adding more locking functions under the batch, we are able to cut the time for listing 50 containers in half. More to come. Signed-off-by: baude <bbaude@redhat.com> Closes: #325 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
* Fixed Created At and Running For valueumohnani82018-01-25
| | | | | | | | | | | | Changed the Created At value to match the format of docker ps and fixed the value for Running For to reflect the time elapsed since the container has been started. Initially it was showing the time elapsed since the container was created. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #257 Approved by: rhatdan
* Merge pull request #251 from baude/psbatchDaniel J Walsh2018-01-23
|\ | | | | Use batched operations in ps
| * Use batched operations in psbaude2018-01-22
| | | | | | | | | | | | | | | | Because the podman ps command has to collection a lot of information from various places, many of which are controlled by locks, it is a good candidate for doing batch operations under a single lock. Signed-off-by: baude <bbaude@redhat.com>
* | 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
* Fix output for created containersbaude2018-01-18
| | | | | | | | | | | | | | Created containers that haven't hit runc yet should still be considered created (not dead). Also, fixed loop for deleting containers as leftover code still exited there that prevented proper deletion of containers that could be deleted. Signed-off-by: baude <bbaude@redhat.com> Closes: #238 Approved by: rhatdan
* Rename all references to kpod to podmanDaniel J Walsh2017-12-18
The decision is in, kpod is going to be named podman. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #145 Approved by: umohnani8