summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAge
* Merge pull request #2482 from edsantiago/podman_image_rmOpenShift Merge Robot2019-03-01
|\ | | | | Fix usage messages for podman image list, rm
| * Fix usage messages for podman image list, rmEd Santiago2019-02-28
| | | | | | | | | | | | | | | | | | | | pr #2480 fixed the missing 'podman image list/rm' commands; it broke their usage messages. This corrects both usage messages and also their examples. Also: add an e2e test for 'podman image rm' (untested) Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #2452 from edsantiago/no_more_argsOpenShift Merge Robot2019-03-01
|\ \ | | | | | | Command-line input validation: reject unused args
| * | Command-line input validation: reject unused argsEd Santiago2019-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several podman commands accept no subcommands. Some of those were not actually checking, though, which could lead to user confusion. Added validation where missing; and, refactored to minimize duplication. (Side note: I decided against using cobra.NoArgs because its error message, "unknown command", misleadingly implies that there are known ones). Also added validation to varlink Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #2451 from baude/playrenamepodoncollisionOpenShift Merge Robot2019-03-01
|\ \ \ | | | | | | | | rename pod when we have a name collision with a container
| * | | rename pod when we have a name collision with a containerbaude2019-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when podman generate kube runs, it names the pod based on the first container it finds. the resulting yaml file is perfectly acceptable in a kubernetes environment. But when replaying the YAML file with podman, we cannot have a container and pod with the same name. therefore, we rename the pod if find a collision to name_pod. Signed-off-by: baude <bbaude@redhat.com>
* | | | Merge pull request #2486 from edsantiago/podman_command_compareEd Santiago2019-03-01
|\ \ \ \ | | | | | | | | | | podman-commands script: refactor
| * | | | podman-commands script: refactorEd Santiago2019-02-28
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make more general-purpose: instead of hardcoding a list of known subcommands, and duplicating sed pipelines for each, rely on 'podman help' itself to tell us which podman commands have subcommands; and examine each in turn. Should there ever be new subcommands, this will identify and test them. A special case is needed for 'podman image trust', whose documentation format doesn't match the others. The change to `common.go` fixes an inconsistency: the Usage message for commands with subcommands had an unnecessary blank line, making it harder to parse automatically. This simply produces consistent Usage messages for all podman commands. This script will not pass until #2480 is merged. After that, the goal is to add this as a CI hook. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | Merge pull request #2493 from edsantiago/broken_doc_linksEd Santiago2019-03-01
|\ \ \ \ | | | | | | | | | | Fix link inconsistencies in man pages
| * | | | Fix link inconsistencies in man pagesEd Santiago2019-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via: for i in docs/*.md;do x=$(perl -ne 'if (/\[(podman-.*?)\(1\)\]\((podman-.*?)\.1\.md/) { print " $1 != $2\n" if $1 ne $2; print " ENOENT $2\n" unless -e "docs/$2.1.md" }' <$i); if [ -n "$x" ]; then echo $i; echo "$x";fi;done ...which is probably a good candidate for another CI hook, except I have no idea how to rewrite it in awk. Additionally, mark `podman refresh` and `podman container refresh` as hidden, remove its man page, and remove references to it from all other man pages. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | | Should be defaulting to pull not pull-alwaysDaniel J Walsh2019-02-28
|/ / / / | | | | | | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #2487 from haircommander/exec_attahcOpenShift Merge Robot2019-02-28
|\ \ \ \ | |/ / / |/| | | Allow Exec API user to override streams
| * | | Allow Exec API user to override streamsPeter Hunt2019-02-28
| | | | | | | | | | | | | | | | | | | | | | | | Allow passing in of AttachStreams to libpod.Exec() for usage in podman healthcheck. An API caller can now specify different streams for stdout, stderr and stdin, or no streams at all. Signed-off-by: Peter Hunt <pehunt@redhat.com>
* | | | Merge pull request #2480 from baude/clifixupsOpenShift Merge Robot2019-02-28
|\ \ \ \ | |/ / / |/| | | fix up a number of misplace commands
| * | | fix up a number of misplace commandsbaude2019-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ps now on main command * sign is no longer on main commmand * ls, list no longer are valid main aliases for images * ls, list does work for podman image Signed-off-by: baude <bbaude@redhat.com>
* | | | Merge pull request #2478 from baude/portbz1683734OpenShift Merge Robot2019-02-28
|\ \ \ \ | |/ / / |/| | | podman port fix output
| * | | podman port fix outputbaude2019-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | list a portion of the container id and the ports exposed on the same line. when using all, if no ports are exposed, do not list the container id. Also, shorten the container id to a len of 12 like other container commands. Fixes bugzilla #1683734 Signed-off-by: baude <bbaude@redhat.com>
* | | | Merge pull request #2476 from mheon/fix_stopOpenShift Merge Robot2019-02-28
|\ \ \ \ | |/ / / |/| | | Fix ignored --stop-timeout flag to 'podman create'
| * | | Fix ignored --time argument to podman restartMatthew Heon2019-02-27
| | | | | | | | | | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | | Fix four errors tagged by Cobra macro debuggingMatthew Heon2019-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three flags are unimplemented (never implemented) One had an incorrect retrieval macro Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | | Add debugging for errors to Cobra compatibility macrosMatthew Heon2019-02-27
| | | | | | | | | | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | | Fix ignored --stop-timeout flag to 'podman create'Matthew Heon2019-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add some extra debug information to help figure out what's going on when stop goes bad. Fixes: #2472 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | | Merge pull request #2475 from edsantiago/podman_create_interspersedOpenShift Merge Robot2019-02-27
|\ \ \ \ | | | | | | | | | | podman create: disable interspersed opts
| * | | | podman create: disable interspersed optsEd Santiago2019-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the change to cobra, the following command fails: # podman create alpine sh -c /bin/true Error: unknown shorthand flag: 'c' in -c (Correct behavior is to pass '-c' to the container command) This PR corrects that. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | | fixup! Incorporate review feedbackEd Santiago2019-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per tsweeney, add back the original examples Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | | fixup! missed some more:Ed Santiago2019-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - [flags] in generate-kube - optional [IMAGE] in images Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | | fixup! Correction to 'checkpoint'Ed Santiago2019-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...it's a subcommand of 'podman container' Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | | Followup to #2456: update examples, add trustEd Santiago2019-02-27
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | - belatedly incorporate review feedback from baude - add usage synopsis for trust-set and trust-show Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | Merge pull request #2471 from baude/clifixupsOpenShift Merge Robot2019-02-27
|\ \ \ \ | |/ / / |/| | | fix up a number of misplace commands
| * | | fix up a number of misplace commandsbaude2019-02-27
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | * ps now on main command * sign is no longer on main commmand * ls, list no longer are valid main aliases for images * ls, list does work for podman image Signed-off-by: baude <bbaude@redhat.com>
* / / Fix build for non-Varlink-tagged PodmanMatthew Heon2019-02-27
|/ / | | | | | | | | | | Fixes #2459 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #2454 from mheon/all_your_defaults_belong_to_libpodOpenShift Merge Robot2019-02-27
|\ \ | | | | | | Move all storage configuration defaults into libpod
| * | Move all storage configuration defaults into libpodMatthew Heon2019-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of passing in defaults via WithStorageConfig after computing them in cmd/podman/libpodruntime, do all defaults in libpod itself. This can alleviate ordering issues which caused settings in the libpod config (most notably, volume path) to be ignored. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Merge pull request #2456 from edsantiago/better_synopsesOpenShift Merge Robot2019-02-27
|\ \ \ | | | | | | | | Better usage synopses for subcommands
| * | | Better usage synopses for subcommandsEd Santiago2019-02-26
| |/ / | | | | | | | | | | | | | | | | | | Conceptually simple: include, where applicable, a brief description of command-line options for each subcommand. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #2460 from adrianreber/restoreOpenShift Merge Robot2019-02-27
|\ \ \ | |/ / |/| | Remove restore as podman subcommand
| * | Remove restore as podman subcommandAdrian Reber2019-02-27
| | | | | | | | | | | | | | | | | | | | | | | | The commands checkpoint and restore should only be available under 'podman container'. This is probably a result of the recent cobra migration. Signed-off-by: Adrian Reber <areber@redhat.com>
* | | Merge pull request #2446 from mheon/add_image_volumeOpenShift Merge Robot2019-02-26
|\ \ \ | |_|/ |/| | Only remove image volumes when removing containers
| * | Only remove image volumes when removing containersMatthew Heon2019-02-26
| |/ | | | | | | | | | | | | | | | | | | | | | | When removing volumes with rm --volumes we want to only remove volumes that were created with the container. Volumes created separately via 'podman volume create' should not be removed. Also ensure that --rm implies volumes will be removed. Fixes #2441 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #2443 from baude/playstartrecursiveOpenShift Merge Robot2019-02-26
|\ \ | | | | | | start pod containers recursively
| * | start pod containers recursivelybaude2019-02-26
| | | | | | | | | | | | | | | | | | | | | | | | when using the play kube command, we need to make sure that containers with dependancies are started in proper order. in this case, the infra container must be started first. Signed-off-by: baude <bbaude@redhat.com>
* | | Fix podman logs -lAdrian Reber2019-02-26
| |/ |/| | | | | | | | | | | 'podman logs -l' was no longer working. This fixes it by replacing &waitCommand.Latest with &logsCommand.Latest. Signed-off-by: Adrian Reber <areber@redhat.com>
* | When location of c/storage root changes, set VolumePathMatthew Heon2019-02-26
|/ | | | | | | | | | | | | | | We want named volumes to be created in a subdirectory of the c/storage graph root, the same as the libpod root directory is now. As such, we need to adjust its location when the graph root changes location. Also, make a change to how we set the default. There's no need to explicitly set it every time we initialize via an option - that might conflict with WithStorageConfig setting it based on graph root changes. Instead, just initialize it in the default config like our other settings. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* podman-remote pod pause|unpause|restartbaude2019-02-25
| | | | | | | enable the ability for the remote client to pause, unpause, and restart pods. Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #2422 from baude/remotepodcreateOpenShift Merge Robot2019-02-25
|\ | | | | podman-remote create|ps
| * podman-remote create|psbaude2019-02-25
| | | | | | | | | | | | | | enable the podman-remote client to be able to create and list pods on a remote system. Signed-off-by: baude <bbaude@redhat.com>
* | Change exit code to 1 on podman rmi nosuch imageDaniel J Walsh2019-02-25
| | | | | | | | | | | | | | | | Make it easy for scripts to determine if an image removal failure. If only errors were no such image exit with 1 versus 125. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #2423 from rhatdan/rmOpenShift Merge Robot2019-02-25
|\ \ | | | | | | Change exit code to 1 on podman rm nosuch container
| * | Change exit code to 1 on podman rm nosuch containerDaniel J Walsh2019-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make it easy for scripts to determine if a container removal fails versus the container did not exist. If only errors were no such container exit with 1 versus 125. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | remove duplicate commands in mainbaude2019-02-25
|/ / | | | | | | | | | | | | | | | | | | | | kube was erronously being added as main subcommand multiple times. it should not be a subcommand as it should live under either play or generate. also removing the addition of the volume command from the commands.go to eliminate a duplicate. Signed-off-by: baude <bbaude@redhat.com>