3339 Commits

Author SHA1 Message Date
8656d2d887 Merge pull request #2538 from giuseppe/slirp4netns-path
libpod: allow to configure path to the slirp4netns binary
2019-03-11 07:56:50 -07:00
9b42577c32 Merge pull request #2604 from giuseppe/allow-single-mappings
rootless: allow single ID mappings
2019-03-11 07:30:31 -07:00
b33a00ef96 Merge pull request #2606 from TomSweeneyRedHat/dev/tsweeney/builddocfix
Remove --rm and --detach don't coexist note
2019-03-11 06:54:40 -07:00
af3e73426a rootless: allow single mappings
we were playing safe and not allowed any container to have less than
65536 mappings.  There are a couple of reasons to change it:

- it blocked libpod to work in an environment where
  newuidmap/newgidmap are not available, or not configured.

- not allowed to use different partitions of subuids, where each user
  has less than 65536 ids available.

Hopefully this change in containers/storage:

https://github.com/containers/storage/pull/303

will make error clearers if there are not enough IDs for the image
that is being used.

Closes: https://github.com/containers/libpod/issues/1651

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-11 14:38:42 +01:00
3e3fcd5422 Remove --rm and --detach don't coexist note
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

With later changes of Podman, you can now use both the
--rm and --detach in a single run command.  This PR removes
the documentation in the man pages saying this is not
allowed.

Fixes: #2601
2019-03-11 09:34:30 -04:00
e02393ba70 libpod: allow to configure path to the network-cmd binary
allow to configure the path to the network-cmd binary, either via an
option flag --network-cmd-path or through the libpod.conf
configuration file.

This is currently used to customize the path to the slirp4netns
binary.

Closes: https://github.com/containers/libpod/issues/2506

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-11 09:29:04 +01:00
ddcdc0c172 pull: promote debug statement to error
print an error if there is any failure pulling an image.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-11 09:25:40 +01:00
349e691149 Merge pull request #2603 from mheon/misc_pod_fixes
Misc pod fixes
2019-03-11 00:54:38 -07:00
54fd1a7bb9 Fix generation of infra container command
When sourcing from an image, we need to grab its entrypoint first
and then add command on to mimic the behavior of Docker.

The default Kube pause image just sets ENTRYPOINT, and not CMD,
so nothing changes there, but this ought to fix other images
(for example, nginx would try to run the pause command instead of
an nginx process without this patch)

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-10 14:25:13 -04:00
eb3dd94159 Remove an unused if statement I added
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-10 12:20:04 -04:00
bb0377eb3d Don't delete another container's resolv and hosts files
The logic of deleting and recreating /etc/hosts and
/etc/resolv.conf only makes sense when we're the one that creates
the files - when we don't, it just removes them, and there's
nothing left to use.

Fixes #2602

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-10 12:18:12 -04:00
7f0128ac33 Fix a potential segfault during infra container create
I was seeing some segfaults where image config was being passed
as nil, causing a nil dereference segfault. Fix the apparent
cause and add some safety fencing to try and ensure it doesn't
happen again.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-10 12:14:54 -04:00
d95f97a63e Merge pull request #2516 from rhatdan/secrets
Move secrets package to buildah
2019-03-09 05:11:24 -08:00
68a984a937 Merge pull request #2576 from rhatdan/troubleshooting
Add troublshoot information about SELinux labeling of containers/storage
2019-03-09 05:03:24 -08:00
b15273a0ca Merge pull request #2531 from cevich/rootless_stub
Cirrus: Add dedicated rootless mode testing
2019-03-09 04:15:09 -08:00
720e9c5ab4 Merge pull request #2598 from mheon/crio_umount_is_useless
We don't use crio-umount.conf
2019-03-09 03:30:08 -08:00
caa8c66a87 We don't use crio-umount.conf
It also causes conflicts with CRI-O packages.

Also, change the path on seccomp.json so it lives in /usr/share
by default, with everything else.

Fixes #2596

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-03-08 18:22:10 -05:00
9b21f14eef Merge pull request #2592 from baude/testfixups
test docs fixups
2019-03-08 13:28:43 -08:00
f4787aeeb4 Merge pull request #2590 from haircommander/pause_entry_cmd
Default to image entrypoint for infra container
2019-03-08 13:16:38 -08:00
2f3875d009 Move secrets package to buildah
Trying to remove circular dependencies between libpod and buildah.

First step to move pkg content from libpod to buildah.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-08 16:08:44 -05:00
550f9b1f6f Add troublshoot information about SELinux labeling of containers/storage
We have some bug reports about people moving containers storage to new
directories and this troubleshooter should help them fix this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-08 16:07:59 -05:00
8a3b45728a test docs fixups
adding some clarification on testing based on tom's input.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-08 14:30:20 -06:00
008aaf7468 Merge pull request #2560 from baude/ginkgoimprovements
ginkgo status improvements
2019-03-08 12:27:20 -08:00
dff224a205 Default to image entrypoint for infra container
If the pod infra container is overriden, we want to run the entry point of the image, instead of the default infra command. This allows users to override the infra-image with greater ease.
Also use process environment variables from image

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-03-08 15:15:15 -05:00
d5546008ab ginkgo status improvements
a series of improvements to our ginkgo test framework so we can
get better ideas of whats going on when run in CI

Signed-off-by: baude <bbaude@redhat.com>
2019-03-08 13:28:33 -06:00
be6ad02049 Merge pull request #2591 from baude/issue2209
podman play kube defaults
2019-03-08 11:24:44 -08:00
b3d9540b16 Merge pull request #2589 from baude/issue2171
container runlabel respect $PWD
2019-03-08 11:12:25 -08:00
bf8c2096d8 Merge pull request #2588 from giuseppe/rootless-propagate-error-from-info
rootless: propagate errors from info
2019-03-08 11:00:52 -08:00
cc411dd98f rootless: propagate errors from info
we use "podman info" to reconfigure the runtime after a reboot, but we
don't propagate the error message back if something goes wrong.

Closes: https://github.com/containers/libpod/issues/2584

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-08 19:42:20 +01:00
754d486da5 podman play kube defaults
if an input YAML file lacks securitycontext and working dir for
a container, we need to be able to handle that.  if no default for
working dir is provided, we use a default of "/".

fixes issue #2209

Signed-off-by: baude <bbaude@redhat.com>
2019-03-08 12:36:25 -06:00
5ae7359184 Merge pull request #2557 from QiWang19/filter2241
fix bug in podman images list all images with same name
2019-03-08 09:23:36 -08:00
5fdb8bfcb3 Merge pull request #2257 from cevich/system_test_beginning
[ci skip] System-test: Begin list of needed high-level tests
2019-03-08 09:13:07 -08:00
24f567a3db container runlabel respect $PWD
When doing environment variable substitution, we need to make sure
$PWD is replaced with the current working directory.

fixes issue #2171

Signed-off-by: baude <bbaude@redhat.com>
2019-03-08 10:32:33 -06:00
c4815e8a61 Merge pull request #2569 from giuseppe/rootless-fix-exec-with-user
rootless: exec join the user+mount namespace
2019-03-08 08:22:55 -08:00
90319bcf52 Merge pull request #2586 from mheon/fix_ps_states
Remove 'podman ps' restarting filter and fix stopped
2019-03-08 08:05:45 -08:00
8c54126b6f Merge pull request #2582 from baude/issue2574
label parsing in non-quoted field
2019-03-08 07:11:18 -08:00
fbd8f33a59 Remove 'podman ps' restarting filter and fix stopped
Podman has no concept of a "restarting" container - such a
container is just transitioning from running to stopped and
then back to running through our ordinary state machine.

As such, filtering "restarting" containers doesn't work and does
nothing.

Also, make "stopped" containers show as exited - this is a
momentary state we transition to before proper exited.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-08 09:55:39 -05:00
a7606ca5d9 label parsing in non-quoted field
switch from a stringslice to a stringarray for labels to handle quoted
input.

fixes issue #2574

Signed-off-by: baude <bbaude@redhat.com>
2019-03-08 08:17:31 -06:00
9e2cd7fea1 Merge pull request #2580 from rhatdan/cleanup1
More cleanup for failures on missing commands.
2019-03-08 04:20:14 -08:00
181f327d57 More cleanup for failures on missing commands.
Currently in podman if a user specifies a command that does not exist
the tool shows the help information.  This patch changes it to show
information like:

$ ./bin/podman foobar
Error: unrecognized command 'podman foobar'
Try 'podman --help' for more information.
$ ./bin/podman volume foobar
Error: unrecognized command `podman volume foobar`
Try 'podman volume --help' for more information.
$ ./bin/podman container foobar
Error: unrecognized command `podman container foobar`
Try 'podman container --help' for more information.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-08 07:06:50 -05:00
8a21e231e6 Merge pull request #2579 from edsantiago/add_healthcheck_to_podman_1
add podman-healthcheck(1) to podman(1)
2019-03-08 01:04:02 -08:00
1b2f8679b8 Merge pull request #2533 from edsantiago/bats
New system tests under BATS
2019-03-07 15:23:54 -08:00
e0f224816d Merge pull request #2570 from muayyad-alsadi/alsadi-tests-20190307
test to cover parallel execution and networking
2019-03-07 15:11:00 -08:00
94e89fc6ca Merge pull request #2564 from rhatdan/cleanup
Fix help commands to show short and long description.
2019-03-07 13:47:55 -08:00
91e15bd802 add podman-healthcheck(1) to podman(1)
...caught by hack/podman-commands.sh script. Which had a little
buglet, which I fixed: add a special case for 'help', which
neither has nor needs a man page.

I believe the podman-commands.sh script is ready to be run in CI,
hint hint.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-07 14:33:25 -07:00
589248d2f3 Implement review feedback
- document a recommended convention for fail-fast tests

- document the requirement for jq. (And, add a fail-fast
  test for its presence; remove the duplicated checks
  in subtests)

- add further sanity checks to 'help' test. Add missing
  documentation. Remove a no-longer-needed workaround for
  usage-message bug fixed in #2486

- add a documented TEMPLATE

- and, since we're at 1.1, enable 'Remote API' check in
  version test

- better diagnostics in setup/teardown; add vim filetype hint;
  better formatting of actual-vs-expect errors

- new pod-top, logs, build tests

- improve error messages

- add $IMAGE alias for ridiculous $PODMAN_TEST_IMAGE_FQN

- final cleanup, in prep for merge

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-07 14:09:00 -07:00
681eae9bcc new system tests under BATS
Initial attempt at writing a framework for podman system tests.
The idea is to define a useful set of primitives that will
make it easy to write actual tests and to interpret results
of failing ones.

This is a proof-of-concept right now; only a small number of
tests, by no means comprehensive. I am requesting review in
order to find showstopper problems: reasons why this approach
cannot work. Should there be none, we can work toward running
these as gating tests for Fedora and RHEL8.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-07 13:09:54 -07:00
15971689e8 fix bug in podman images list all images with same name
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-07 13:55:31 -05:00
9a39c60e46 Fix help commands to show short and long description.
Cleanup lots of help information to look good when displayed.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-07 13:46:59 -05:00
1b253cf73a Merge pull request #2214 from cevich/cirrus_imgts_activate
Cirrus: Use imgts container to record metadata (needs #2213)
2019-03-07 09:28:47 -08:00