summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAge
* Set --force-rm for podman build to true by defaultUrvashi Mohnani2018-11-08
| | | | | | | | | Since we use buildah containers for the build process, the user will not know if we have any buildah containers lingering due to a failed build. Setting this to true by default till we figure out a better way to solve this. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* --interactive shall keep STDIN attached even when not explicitly called outŠimon Lukašík2018-11-03
| | | | | | | | | | | | | | Addressing: podman run -it -a STDERR --rm alpine /bin/ash hanging. As we droped stdin as soon as -a was used. Notice this is contrary to what D-tool does and contrary to what podman help implies: podman run --help | grep interact --interactive, -i Keep STDIN open even if not attached Signed-off-by: Šimon Lukašík <slukasik@redhat.com>
* Make kill, pause, and unpause parallel.baude2018-11-01
| | | | | | | | | | | Operations like kill, pause, and unpause -- which can operation on one or more containers -- can greatly benefit from parallizing its main job (eq kill). In the case of pauseand unpause, an --all option as was added. pause --all will pause all **running** containers. And unpause --all will unpause all **paused** containers. Signed-off-by: baude <bbaude@redhat.com>
* Make restart parallel and add --allbaude2018-11-01
| | | | | | | | | | When attempting to restart many containers, we can benefit from making the restarts parallel. For convenience, two new options are added: --all attempts to restart all containers --run-only when used with --all will attempt to restart only running containers Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #1731 from afbjorklund/versionOpenShift Merge Robot2018-10-31
|\ | | | | Fix setting of version information
| * Fix setting of version informationAnders F Björklund2018-10-31
| | | | | | | | | | | | | | It was setting the wrong variable (CamelCase) in the wrong module ("main", not "libpod")... Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* | Merge pull request #1704 from giuseppe/attach-cuid-too-longOpenShift Merge Robot2018-10-30
|\ \ | | | | | | attach: fix attach when cuid is too long
| * | runtime: do not allow runroot longer than 50 charactersGiuseppe Scrivano2018-10-30
| | | | | | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | truncate command output in ps by defaultbaude2018-10-30
| | | | | | | | | | | | | | | | | | | | | | | | when the PS command was reworked for performance and formatting improvements, i forgot to truncate the command field. Long container commands was throwing the formatting off. we now truncated to 17 characters plus the elipses. Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #1724 from baude/psformatchangesOpenShift Merge Robot2018-10-29
|\ \ \ | | | | | | | | make various changes to ps output
| * | | make various changes to ps outputbaude2018-10-29
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for backwards compatibility and auto-test, we needed a few changes that slipped in when i reworked ps to be faster to be reverted. the follow behaviours were reverted: 1. the is_infra column was redacted. that appears to be a mistake on my part. 2. a newline after ps prints its format was added 3. a newline prior to printing the headers was removed. Signed-off-by: baude <bbaude@redhat.com>
* / | Use two spaces to pad PS fieldsbaude2018-10-29
|/ / | | | | | | | | | | | | Ed has asked that we revert to using two spaces for padding between PS fields. I assume this is for docker autotests. Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #1637 from vrothberg/runlabel-execute-any-commandOpenShift Merge Robot2018-10-26
|\ \ | | | | | | runlabel: run any command
| * | runlabel: run any commandValentin Rothberg2018-10-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed [1], the runlabel command should execute any command specified in a label. The reasoning behind is that we cannot restrict which options are passed to Podman which thereby has full access to the host (runlabels must be used with care). With the updated semantics, runlabel will substitute the commands with a basepath equal to "docker" or "podman" with "/proc/self/exe", and otherwise leave the command unchanged to execute any other command on the host. [1] https://github.com/containers/libpod/pull/1607#issuecomment-428321382 Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
* | | fix bug in rm -fa parallel deletesbaude2018-10-25
| |/ |/| | | | | Signed-off-by: baude <bbaude@redhat.com>
* | Add --max-workers and heuristics for parallel operationsbaude2018-10-25
|/ | | | | | | | | | add a global flag for --max-workers so users can limit the number of parallel operations for a given function. also, when not limited by max-workers, we implement a heuristic function that returns the number of preferred parallel workers based on the number of CPUs and the given operation. Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #1646 from QiWang19/addenvbudOpenShift Merge Robot2018-10-23
|\ | | | | Support auth file environment variable in podman build
| * Support auth file environment variable in podman buildQi Wang2018-10-23
| | | | | | | | Signed-off-by: Qi Wang <qiwan@redhat.com>
* | create: fix writing cidfile when using rootlessGiuseppe Scrivano2018-10-23
| | | | | | | | | | | | | | | | | | | | prevent opening the same file twice, since we re-exec podman in rootless mode. While at it, also solve a possible race between the check for the file and writing to it. Another process could have created the file in the meanwhile and we would just end up overwriting it. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #1662 from adrianreber/all-and-latestOpenShift Merge Robot2018-10-23
|\ \ | | | | | | Add --all and --latest to checkpoint/restore
| * | Add --all and --latest to checkpoint/restoreAdrian Reber2018-10-23
| | | | | | | | | | | | | | | | | | | | | This add the convenience options --all and --latest to the subcommands checkpoint and restore. Signed-off-by: Adrian Reber <areber@redhat.com>
| * | Use the newly added getAllOrLatestContainers() functionAdrian Reber2018-10-23
| | | | | | | | | | | | | | | | | | | | | This removes duplicate code paths which has been previously factored out as getAllOrLatestContainers(). Signed-off-by: Adrian Reber <areber@redhat.com>
| * | Use the new checkAllAndLatest() functionAdrian Reber2018-10-23
| | | | | | | | | | | | | | | | | | | | | Instead of duplicating the same code in multiple commands this uses the newly added function checkAllAndLatest() instead. Signed-off-by: Adrian Reber <areber@redhat.com>
| * | Also factor out getAllOrLatestContainers() functionAdrian Reber2018-10-23
| | | | | | | | | | | | | | | | | | | | | | | | Just as the checkAllAndLatest() function the new code in getAllOrLatestContainers() is used in some commands and duplicated. This factors out this code to be used in other places without duplicating it. Signed-off-by: Adrian Reber <areber@redhat.com>
| * | Add checkAllAndLatest() functionAdrian Reber2018-10-23
| |/ | | | | | | | | | | | | The check about the --all and --latest option is used and repeated and some commands. Factor it out and put it into common. Signed-off-by: Adrian Reber <areber@redhat.com>
* | Merge pull request #1638 from baude/fastpsOpenShift Merge Robot2018-10-23
|\ \ | | | | | | Make podman ps fast
| * | Make podman ps fastbaude2018-10-23
| | | | | | | | | | | | | | | | | | Like Ricky Bobby, we want to go fast. Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #1664 from adrianreber/port-lOpenShift Merge Robot2018-10-23
|\ \ \ | | | | | | | | Fix podman port -l
| * | | Fix podman port -lAdrian Reber2018-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running 'podman port -l' on a system without any containers created gives: $ podman port -l panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xf3cef1] goroutine 1 [running]: github.com/containers/libpod/libpod.(*Container).State(0x0, 0x0, 0x0, 0x0) /share/go/src/github.com/containers/libpod/libpod/container.go:658 +0x41 main.portCmd(0xc420094580, 0x0, 0x0) /share/go/src/github.com/containers/libpod/cmd/podman/port.go:118 +0x406 This fixes it by making sure the variable 'containers' is nil and not [<nil>]. Signed-off-by: Adrian Reber <areber@redhat.com>
* | | | Merge pull request #1697 from baude/statserrOpenShift Merge Robot2018-10-23
|\ \ \ \ | | | | | | | | | | correct stats err with non-running containers
| * | | | correct stats err with non-running containersbaude2018-10-22
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | when doing stats -a|--all, if you have non-running containers, we should not error on not being able to get information like PID, etc on them. Signed-off-by: baude <bbaude@redhat.com>
* | | | Merge pull request #1665 from vrothberg/ignore-env-varsOpenShift Merge Robot2018-10-23
|\ \ \ \ | |_|_|/ |/| | | fix environment variable parsing
| * | | fix environment variable parsingValentin Rothberg2018-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the parsing of environment variables to catch invalid ones, such as `-e = ` or `-e =A`, early in the stack to return meaningful error messages. Also, instead of erroring out, set unspecified env variables as empty (e.g., `-e FOO`) to remain compatible with Docker. Fixes: #1663 Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
* | | | Merge pull request #1639 from baude/pararmOpenShift Merge Robot2018-10-23
|\ \ \ \ | |/ / / |/| | | Make rm faster
| * | | Make rm fasterbaude2018-10-22
| |/ / | | | | | | | | | | | | | | | | | | When doing rm, we now parallelize the actual conainter deletions so they can complete faster. This speeds up operations like rm -a. Signed-off-by: baude <bbaude@redhat.com>
* / / Handle http/https in registry given to login/outTomSweeneyRedHat2018-10-22
|/ / | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
* / Move rootless directory handling to the libpod/pkg/util directoryDaniel J Walsh2018-10-22
|/ | | | | | This should allow us to share this code with buildah. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Support auth file environment variable & add change to man pagesQi Wang2018-10-12
| | | | Signed-off-by: Qi Wang <qiwan@redhat.com>
* Swap from map to channels for podman stop workersMatthew Heon2018-10-11
| | | | | | | We were encountering sync issues with the map, so swap to a thread-safe channel and convert into a map when we output Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Merge pull request #1605 from mheon/syslog_cleanupOpenShift Merge Robot2018-10-11
|\ | | | | Pass along syslog variable to podman cleanup processes
| * Pass along syslog variable to podman cleanup processesMatthew Heon2018-10-11
| | | | | | | | | | | | | | | | | | As of now, there is no way to debug podman clean up processes. They are started by conmon with no stdout/stderr and log nowhere. This allows us to actually figure out what is going on when a cleanup process runs. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* | Merge pull request #1619 from QiWang19/issus1610OpenShift Merge Robot2018-10-11
|\ \ | | | | | | Sort all CLI flags in podman commands
| * | Sort all command flagsQi Wang2018-10-11
| |/ | | | | | | Signed-off-by: Qi Wang <qiwan@redhat.com>
* | Merge pull request #1614 from baude/parastopOpenShift Merge Robot2018-10-11
|\ \ | | | | | | Stop containers in parallel fashion
| * | Stop containers in parallel fashionbaude2018-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Prior, we were stopping containers serially. So if a container had a default timeout of 10 seconds and there were five containers being stopped, the operation would take roughly 50 seconds. If we stop these containers in parallel, the operation should be roughly 10 seconds and change which is a significant speed up at scale. Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #1623 from mheon/static_ipOpenShift Merge Robot2018-10-11
|\ \ \ | |_|/ |/| | Add ability to specify static IPs with --ip flag
| * | Add --ip flag and plumbing into libpodMatthew Heon2018-10-11
| |/ | | | | | | | | | | | | | | | | | | | | Add the --ip flag back with bash completions. Manpages still missing. Add plumbing to pass appropriate the appropriate option down to libpod to connect the flag to backend logic added in the previous commits. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* / fix runlabel functions based on QA feedbackbaude2018-10-11
|/ | | | Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #1587 from mheon/fix_pod_statusOpenShift Merge Robot2018-10-08
|\ | | | | Fix pod status reporting for new Exited state
| * Fix pod status reporting for new Exited stateMatthew Heon2018-10-03
| | | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com>