3481 Commits

Author SHA1 Message Date
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
04b5cb5ad6 implement showerror and accept HOST_PORT env which defaults to 8080
Signed-off-by: alsadi <alsadi@gmail.com>
2019-03-07 18:05:17 +02:00
a07053192f Merge pull request #2573 from giuseppe/exec-extra-files
oci: make explicit the extra files to the exec
2019-03-07 07:20:18 -08:00
081291c8d6 create: join also the mount ns of the dependency
when we are creating a container that depends on another one, be sure
we also join its mount namespace in addition to the user namespace.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-07 15:51:50 +01:00
153cf39b52 Merge pull request #2550 from wking/language-dot-split
libpod/container_internal: Split locale at the first dot, etc.
2019-03-07 06:47:23 -08:00
4a02713c57 rootless: exec join the user+mount namespace
it is not enough to join the user namespace where the container is
running.  We also need to join the mount namespace so that we can
correctly look-up inside of the container rootfs.  This is necessary
to lookup the mounted /etc/passwd file when --user is specified.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-07 15:34:30 +01:00
bf21ec8520 Merge pull request #2565 from edsantiago/healthcheck_run_usage_fix
Yet another seemingly minor tweak to usage message
2019-03-07 06:30:51 -08:00
ffe1ed7058 oci: make explicit the extra files to the exec
In the previous version I forgot to add the fds to preserve into
AdditionalFiles.  It doesn't make a difference as the files were still
preserved, but this seems to be the correct way of making it
explicit.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-07 15:16:28 +01:00
ea031be2df Merge pull request #2563 from mheon/lookup_double_match_always_returns_name
Change LookupContainer logic to match Docker
2019-03-07 00:49:52 -08:00