3210 Commits

Author SHA1 Message Date
d231cfba92 Fix aliased commands to actually work
The current aliased commands

podman container list

and

podman image list
podman image rm

Do not work properly.  The global storage options are broken.

This patch fixes this issue.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-03 06:14:20 -05:00
4c618875f6 Add tests to make sure podman container and podman image commands work
We have little to no testing to make sure we don't break podman image and
podman container commands that wrap traditional commands.

This PR adds tests for each of the commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-02 07:15:26 -05:00
9adcda7389 Merge pull request #2499 from mheon/bump-1.1.1
Bump to v1.1.1
2019-03-01 16:05:59 -08:00
c8e8732ee1 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-01 18:03:53 -05:00
d737546360 Bump to v1.2.0-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-01 18:03:53 -05:00
d5997dcb95 Bump to v1.1.1
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
v1.1.1
2019-03-01 18:03:50 -05:00
cabfc9b6fb Merge pull request #2497 from mheon/release_notes_v1.1.1
Update release notes for v1.1.1
2019-03-01 14:24:35 -08:00
8ee471f800 Merge pull request #2495 from baude/runlabelpulldefault
Pull image for runlabel if not local
2019-03-01 12:50:50 -08:00
467b677451 Merge pull request #2482 from edsantiago/podman_image_rm
Fix usage messages for podman image list, rm
2019-03-01 12:35:59 -08:00
bd7326e3df Update release notes for v1.1.1
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-01 15:33:44 -05:00
e4746f9b4b Merge pull request #2452 from edsantiago/no_more_args
Command-line input validation: reject unused args
2019-03-01 12:22:12 -08:00
ce8d7b8539 Merge pull request #2451 from baude/playrenamepodoncollision
rename pod when we have a name collision with a container
2019-03-01 12:22:07 -08:00
2747c20867 Merge pull request #2485 from adrianreber/oci-check
Verify that used OCI runtime supports checkpoint
2019-03-01 12:04:29 -08:00
c0bc88decc Merge pull request #2483 from cevich/important_contrib_note
[ci skip] Add critical note about skip-ci and merge bot
2019-03-01 09:13:34 -08:00
0bf06b9e3b Merge pull request #2486 from edsantiago/podman_command_compare
podman-commands script: refactor
2019-03-01 09:54:45 -07:00
6060113967 Merge pull request #2493 from edsantiago/broken_doc_links
Fix link inconsistencies in man pages
2019-03-01 09:50:00 -07:00
55f80719a6 Merge pull request #2481 from cevich/sysexec_waitcomplete
Fix SystemExec completion race
2019-03-01 08:43:25 -08:00
a4b82c03d3 Pull image for runlabel if not local
In cases where a user issues the podman container runlabel
command and the image is not local, we now default to pulling
the image automatically to mimic the atomic cli behavior.

Fixes: BZ #1677905

Signed-off-by: baude <bbaude@redhat.com>
2019-03-01 09:20:12 -06:00
f67859ffb3 Fix SystemExec completion race
Some callers assume when SystemExec returns, the command has completed.
Other callers explicitly wait for completion (as required).  However,
forgetting to do that is an incredibly easy mistake to make.  Fix this
by adding an explicit parameter to the function.  This requires
every caller to deliberately state whether or not a completion-check
is required.

Also address **many** resource naming / cleanup completion-races.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-01 09:18:45 -05:00
6f474c5704 Fix link inconsistencies in man pages
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>
2019-03-01 06:53:52 -07:00
c80416f034 Merge pull request #2492 from rhatdan/pull
Should be defaulting to pull not pull-always
2019-03-01 02:23:41 -08:00
43fe2bf064 Verify that used OCI runtime supports checkpoint
To be able to use OCI runtimes which do not implement checkpoint/restore
this adds a check to the checkpoint code path and the checkpoint/restore
tests to see if it knows about the checkpoint subcommand. If the used
OCI runtime does not implement checkpoint/restore the tests are skipped
and the actual 'podman container checkpoint' returns an error.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-03-01 08:08:55 +01:00
f539500884 Should be defaulting to pull not pull-always
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-28 17:20:29 -05:00
9137315133 Merge pull request #2484 from rhatdan/man
No podman container ps command exists
2019-02-28 14:12:58 -08:00
03b236a754 Merge pull request #2461 from adrianreber/disable
Skip checkpoint/restore tests on Fedora for now
2019-02-28 13:51:13 -08:00
e30628eeda Merge pull request #2490 from TomSweeneyRedHat/dev/tsweeney/fixbase
Fix -s to --storage-driver in baseline test
2019-02-28 13:32:32 -08:00
a680144f71 Merge pull request #2487 from haircommander/exec_attahc
Allow Exec API user to override streams
2019-02-28 13:18:05 -08:00
af848ae377 Merge pull request #2479 from giuseppe/rootless-give-uidmaptools-error
rootless, new[ug]idmap: on failure add output
2019-02-28 12:20:28 -08:00
742028e255 podman-commands script: refactor
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>
2019-02-28 13:16:24 -07:00
be0845936a Move Alias lines to descriptions of commands
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-28 15:14:08 -05:00
4258e38326 Fix usage messages for podman image list, rm
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>
2019-02-28 13:11:14 -07:00
d87894e5a0 Fix -s to --storage-driver in baseline test
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Changes the short option `-s` to the fully specified `--storage-driver`.
The short version is no longer supported.
2019-02-28 15:04:32 -05:00
edfe644a0c No podman container ps command exists
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-28 14:57:03 -05:00
d780e69559 Allow Exec API user to override streams
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>
2019-02-28 14:55:11 -05:00
4a109a7199 Merge pull request #2480 from baude/clifixups
fix up a number of misplace commands
2019-02-28 10:41:01 -08:00
2e463b7720 Merge pull request #2478 from baude/portbz1683734
podman port fix output
2019-02-28 10:03:13 -08:00
3fa1fdf711 fix up a number of misplace commands
* 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>
2019-02-28 09:36:23 -06:00
23615099e9 rootless, new[ug]idmap: on failure add output
if any of the mapping tools for setting up the user namespace fail,
then include their output in the error message.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-28 16:16:48 +01:00
711c056971 [ci skip] Critical note about merge bot
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-02-28 10:01:29 -05:00
5afae0b25b Merge pull request #2470 from rhatdan/man
Clean up man pages to match commands
2019-02-28 04:15:40 +01:00
bbf54aaab7 Merge pull request #2476 from mheon/fix_stop
Fix ignored --stop-timeout flag to 'podman create'
2019-02-28 03:54:53 +01:00
3eb1d3c08a podman port fix output
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>
2019-02-27 20:31:01 -06:00
6f0dbd004f Merge pull request #2474 from giuseppe/fix-fips-mode-with-namespaces
secrets: fix fips-mode with user namespaces
2019-02-28 00:45:13 +01:00
cd060d0b54 Merge pull request #2475 from edsantiago/podman_create_interspersed
podman create: disable interspersed opts
2019-02-27 23:29:23 +01:00
37f447d78e Fix ignored --time argument to podman restart
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-27 17:22:34 -05:00
8d120bab83 Merge pull request #2463 from edsantiago/missed_some_synopses
Followup to #2456: update examples, add trust
2019-02-27 23:11:37 +01:00
80bad464f9 secrets: fix fips-mode with user namespaces
When using a user namespace, we create the mount point under
`mountPrefix` so that the uid != 0 can access that directory.

Change the addFIPSModeSecret code to honor that, and also ensure we
are creating the directories with the right ownership.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-27 22:40:38 +01:00
3ba2af90ae Fix four errors tagged by Cobra macro debugging
Three flags are unimplemented (never implemented)

One had an incorrect retrieval macro

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-27 16:38:31 -05:00
b4b7b298fc Clean up man pages to match commands
Also add podman-commands.sh to compare man pages to commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-27 16:37:40 -05:00
ad6988be32 Add debugging for errors to Cobra compatibility macros
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-27 16:26:12 -05:00