summaryrefslogtreecommitdiff
path: root/cmd/podman
Commit message (Collapse)AuthorAge
* 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>
* | runlabel: execute /proc/self/exe and avoid recursionValentin Rothberg2018-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | Execute /proc/self/exe instead of podman. This makes the runlabel command more portable as it works for binaries outside the path as well as for local builds. Also, avoid redundantly executing the runlabel command by setting the PODMAN_RUNLABEL_NESTED environment variable to "1". Podman now checks for this variable before executing the runlabel command and will throw an error in case the variable is set. Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
* | Add support to checkpoint/restore containersAdrian Reber2018-10-03
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runc uses CRIU to support checkpoint and restore of containers. This brings an initial checkpoint/restore implementation to podman. None of the additional runc flags are yet supported and container migration optimization (pre-copy/post-copy) is also left for the future. The current status is that it is possible to checkpoint and restore a container. I am testing on RHEL-7.x and as the combination of RHEL-7 and CRIU has seccomp troubles I have to create the container without seccomp. With the following steps I am able to checkpoint and restore a container: # podman run --security-opt="seccomp=unconfined" -d registry.fedoraproject.org/f27/httpd # curl -I 10.22.0.78:8080 HTTP/1.1 403 Forbidden # <-- this is actually a good answer # podman container checkpoint <container> # curl -I 10.22.0.78:8080 curl: (7) Failed connect to 10.22.0.78:8080; No route to host # podman container restore <container> # curl -I 10.22.0.78:8080 HTTP/1.1 403 Forbidden I am using CRIU, runc and conmon from git. All required changes for checkpoint/restore support in podman have been merged in the corresponding projects. To have the same IP address in the restored container as before checkpointing, CNI is told which IP address to use. If the saved network configuration cannot be found during restore, the container is restored with a new IP address. For CRIU to restore established TCP connections the IP address of the network namespace used for restore needs to be the same. For TCP connections in the listening state the IP address can change. During restore only one network interface with one IP address is handled correctly. Support to restore containers with more advanced network configuration will be implemented later. v2: * comment typo * print debug messages during cleanup of restore files * use createContainer() instead of createOCIContainer() * introduce helper CheckpointPath() * do not try to restore a container that is paused * use existing helper functions for cleanup * restructure code flow for better readability * do not try to restore if checkpoint/inventory.img is missing * git add checkpoint.go restore.go v3: * move checkpoint/restore under 'podman container' v4: * incorporated changes from latest reviews Signed-off-by: Adrian Reber <areber@redhat.com>
* Merge pull request #1580 from giuseppe/rootless-always-set-XDG_RUNTIME_DIROpenShift Merge Robot2018-10-03
|\ | | | | rootless: always set XDG_RUNTIME_DIR
| * rootless: always set XDG_RUNTIME_DIRGiuseppe Scrivano2018-10-03
| | | | | | | | | | | | | | | | it is used internally by containers/image to locate the auth file. Closes: https://github.com/containers/libpod/issues/1457 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #1531 from mheon/add_exited_stateOpenShift Merge Robot2018-10-03
|\ \ | |/ |/| Add ContainerStateExited and OCI delete() in cleanup()
| * Address review comments and fix ps outputMatthew Heon2018-10-02
| | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
| * Add ContainerStateExited and OCI delete() in cleanup()Matthew Heon2018-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To work better with Kata containers, we need to delete() from the OCI runtime as a part of cleanup, to ensure resources aren't retained longer than they need to be. To enable this, we need to add a new state to containers, ContainerStateExited. Containers transition from ContainerStateStopped to ContainerStateExited via cleanupRuntime which is invoked as part of cleanup(). A container in the Exited state is identical to Stopped, except it has been removed from the OCI runtime and thus will be handled differently when initializing the container. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* | Merge pull request #1528 from baude/runlabelOpenShift Merge Robot2018-10-02
|\ \ | | | | | | Add container runlabel command
| * | Add container runlabel commandbaude2018-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Execute the command as described by a container image. The value of the label is processed into a command by: 1. Ensuring the first argument of the command is podman. 2. Substituting any variables with those defined by the environment or otherwise. If no label exists in the container image, nothing is done. podman container runlabel LABEL IMAGE extra_args Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #1576 from rhatdan/labelOpenShift Merge Robot2018-10-02
|\ \ \ | |_|/ |/| | Disable SELinux labeling if --privileged
| * | Disable SELinux labeling if --privilegedDaniel J Walsh2018-10-02
| | | | | | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #1563 from jwhonce/wip/podsOpenShift Merge Robot2018-10-02
|\ \ \ | |/ / |/| | Implement pod varlink bindings
| * | * Update documenationJhon Honce2018-10-01
| | | | | | | | | | | | Signed-off-by: Jhon Honce <jhonce@redhat.com>
| * | Implement pod varlink bindingsJhon Honce2018-10-01
| |/ | | | | | | | | | | | | | | | | | | | | | | * Update varlink document * Add NoContainersInPod error in go and python * Add support for varlink pod interface * New code passes pylint * Fix bug in test_runner.sh * Update integration tests for race condition on status check * Add missing port config file support Signed-off-by: Jhon Honce <jhonce@redhat.com>
* / Add --all flag to podman killDaniel J Walsh2018-09-30
|/ | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>