Commit graph

592 commits

Author SHA1 Message Date
Matthew Heon 02c6110093 Fix E2E tests
The Commit test is blatantly wrong and testing buggy behavior. We
should be commiting the destination, if anything - and more
likely nothing at all.

When force-removing volumes, don't remove the volumes of
containers we need to remove. This can lead to a chicken and the
egg problem where the container removes the volume before we can.
When we re-add volume locks this could lead to deadlocks. I don't
really want to deal with this, and this doesn't seem a
particularly harmful quirk, so we'll let this slide until we get
a bug report.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 12:27:20 -04:00
Matthew Heon 42c95eed2c Major rework of --volumes-from flag
The flag should be substantially more durable, and no longer
relies on the create artifact.

This should allow it to properly handle our new named volume
implementation.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 12:27:20 -04:00
Sascha Grunert 81a4451fea
Add deadcode linter
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-04 09:07:05 +02:00
Sascha Grunert 88b0e74e0b
Update registrar unit tests to match them of cri-o
- Add the test framework abstraction
- Update the unit tests to run with ginkgo

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-04 08:53:32 +02:00
Chris Evich fc4105ddbe
Improve podman pod rm -a test
When running as a user, the order of removal is database ID dependent.
This results in this test randomly failing.  This condition was
very difficult to debug and the test was missing two critical checks.
One to confirm an expected error message was produced, and another
to verify the expected running container, remains running.

Fix the container and missing error-message checks, and vastly improve
the debug-ability of this test.  Fixing the random-failures requires
intensive fixes in other areas, so that task will be left up to future
work.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-03 11:04:35 -04:00
Ed Santiago 1ae8a5b285
test: test that an unprivileged user cannot access the storage
Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-29 14:04:45 +01:00
OpenShift Merge Robot 340eeec1b6
Merge pull request #2747 from mheon/dns_none
Add --dns=none
2019-03-27 10:49:42 -07:00
Ed Santiago 67444db3b1 Sigh; disable pod-top test, it's unreliable (#2780)
Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-27 10:14:00 -06:00
Matthew Heon 86f03e0e52 Add a test that --add-host conflicts with --no-hosts
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-27 10:12:18 -04:00
baude 7f2221d48f size is optional for container inspection
on the remote client, if a user wants to know the rootfs size of a
container, a -s should be passed.  this corrects a behavior where size
was shown by default.

Fixes #2765

Signed-off-by: baude <bbaude@redhat.com>
2019-03-26 10:14:58 -05:00
Yiqiao Pu dc5043ae2d Add three test cases for podman attach test
Add following test cases for podman attach test:
1. podman attach to a running container
2. podman attach to the latest container
3. podman attach to a container with --sig-proxy set to false

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2019-03-26 20:09:27 +08:00
OpenShift Merge Robot 9e556530d2
Merge pull request #2498 from QiWang19/sysdf
podman system df- show podman disk usage
2019-03-26 04:51:06 -07:00
Qi Wang 25e0f87069 system df to show podman disk usage
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-25 15:05:26 -04:00
baude bb69004b8c podman health check phase3
podman will not start a transient service and timer for healthchecks.
this handles the tracking of the timing for health checks.

added the 'started' status which represents the time that a container is
in its start-period.

the systemd timing can be disabled with an env variable of
DISABLE_HC_SYSTEMD="true".

added filter for ps where --filter health=[starting, healthy, unhealthy]
can now be used.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-22 14:58:44 -05:00
Giuseppe Scrivano 7f6f2f3f4a
userns: use the intermediate mountns for volumes
when --uidmap is used, the user won't be able to access
/var/lib/containers/storage/volumes.  Use the intermediate mount
namespace, that is accessible to root in the container, for mounting
the volumes inside the container.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-21 21:18:13 +01:00
Giuseppe Scrivano a53c768409
podman: do not split --env on comma
if --env "a=b,c" is used, do not split into a=b and c=.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-20 23:22:22 +01:00
Chris Evich 148046745a
Add new key and never-expiring test certificate
Former `domain.crt` was created with a one-year life and expired causing
all testing to fail.  Create a replacement, along with configuration and
documentation on how to make a new certificate if ever required.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-20 13:36:17 -04:00
OpenShift Merge Robot 537c382f5b
Merge pull request #2703 from edsantiago/bats
BATS: new tests, and improvements to existing ones
2019-03-19 09:12:27 -07:00
Giuseppe Scrivano 4ac08d3aa1
ps: fix segfault if the store is not initialized
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-19 15:01:54 +01:00
Giuseppe Scrivano b581fa1510
tests: re-enable some tests for rootless mode
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-19 15:01:53 +01:00
Giuseppe Scrivano 66d2190125
test: fix SkipIfRootless() helper
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-19 15:01:51 +01:00
baude c6b205be77
Enable rootless integration tests
Signed-off-by: baude <bbaude@redhat.com>
2019-03-19 15:01:48 +01:00
OpenShift Merge Robot ac523cbe2b
Merge pull request #2688 from baude/issue2671
support GO template {{ json . }}
2019-03-18 15:51:31 -07:00
Ed Santiago 58d2e589fb BATS: new tests, and improvements to existing ones
New:
 - podman exec
 - podman load (requires #2674)
 - CLI parsing (regression test for #2574)

Improved:
 - help: test "podman NoSuchCommand", and subcommands
 - help: test "podman cmd" without required args
 - pod: start with --infra=false; this allows running rootless
 - log: also run 'logs' after container is run
 - log: test -f with two containers

Also, use helpful descriptions for skip_if_rootless

Tested on f29, root and rootless. As soon as podman-remote
supports rm, I'll start testing that too.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-18 15:21:52 -06:00
Debarshi Ray 022bb95c8e Export ConmonPidFile in 'podman inspect' for containers
This can help scripts provide a more meaningful message when coming
across issues [1] which require the container to be re-created.

[1] eg., https://github.com/containers/libpod/issues/2673

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2019-03-18 21:03:22 +01:00
OpenShift Merge Robot 41019f7472
Merge pull request #2632 from debarshiray/wip/rishi/podman-rm-exit-with-125-for-bogus-and-running
Make 'podman rm' exit with 125 if it had a bogus & a running container
2019-03-18 12:52:07 -07:00
baude 6aa8d14745 support GO template {{ json . }}
for podman version, we now support a GO template for json output.

fixes #2671

Signed-off-by: baude <bbaude@redhat.com>
2019-03-18 13:46:35 -05:00
baude 46f18764f2 podman logs on created container should exit
when running podman logs on a created container (which has no logs),
podman should return gracefully (like docker) with a 0 return code. if
multiple containers are provided and one is only in the created state
(and no follow is used), we still display the logs for the other ids.

fixes issue #2677

Signed-off-by: baude <bbaude@redhat.com>
2019-03-18 08:58:48 -05:00
OpenShift Merge Robot 122d00f67f
Merge pull request #2683 from giuseppe/fix-pod-top
rootless: fix pod top
2019-03-18 05:00:15 -07:00
Giuseppe Scrivano 46b74a8ff8
rootless: fix pod top
we need to join the namespace of the target pod.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-18 11:40:22 +01:00
OpenShift Merge Robot 97fb495718
Merge pull request #2620 from baude/multilogs
display logs for multiple containers at the same time
2019-03-16 04:21:32 -07:00
OpenShift Merge Robot 37467beaf9
Merge pull request #2664 from kunalkushwaha/ps-port-fix
port grouping in ps command output
2019-03-16 04:03:38 -07:00
baude 5e86acd591 display logs for multiple containers at the same time
add the ability for users to specify more than one container at a time
while using podman logs.  If more than one container is being displayed,
podman will also prepend a shortened container id of the container on
the log line.

also, enabled the podman-remote logs command during the refactoring of
the above ability.

fixes issue #2219

Signed-off-by: baude <bbaude@redhat.com>
2019-03-15 13:41:01 -05:00
Debarshi Ray 082d792693 Make 'podman rm' exit with 125 if it had a bogus & a running container
Getting a list of containers, and then deleting them are two separate
fallible steps that can run into different sets of errors. eg., in the
case of a bogus missing container and a container that's running or
paused, the first step will only trigger libpod.ErrNoSuchCtr. At this
point it might appear that the exit code ought to be 1. However, when
attempting the deletion, it will fail once more due to the status of
the running or paused container. Since libpod.ErrNoSuchCtr is no longer
the only error encountered, the exit code should be reset to 125.

This problem is currently masked for rootless usage due to commit
35432ecaae ("rootless: fix rm when uid in the container != 0").

Fixes: 85db895012 ("rm: set exit code to 1 if a specified ...")
       e41279b902 ("Change exit code to 1 on podman rm ...")

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2019-03-15 18:28:47 +01:00
Giuseppe Scrivano fc65d71df2
build: fix build DIR -t TAG
accept also the order "build DIR -t TAG"

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-15 10:39:17 +01:00
OpenShift Merge Robot 39859850ae
Merge pull request #2645 from mheon/fix_some_flakes
Fix a few flakes
2019-03-15 02:04:01 -07:00
Kunal Kushwaha d47d976c0b testcase added for listing range of ports in ps command
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-15 15:50:11 +09:00
OpenShift Merge Robot fc5951ad55
Merge pull request #1642 from kunalkushwaha/image-tree
Tree implementation for podman images
2019-03-14 09:53:49 -07:00
Matthew Heon 3c4f4bf561 Bump timeout on a podman info test to default
Saw this flake a few times because of a timeout issue.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-14 10:10:50 -04:00
Kunal Kushwaha a4b3b9ffbb Tree implementation for podman images
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-14 11:22:06 +09:00
Ed Santiago 3de5e4a99f Usability cleanup for 'inspect'
Make the usage messages (and options) different between
podman inspect, podman image inspect, and podman container inspect.

Disable inapplicable options (-l, -s) for podman image inspect

Disable -t (type) when the type is implicit through the subcommand.

Update man page to reflect differences in usage.

Fix broken test.

Uglier than desirable due to Go and Cobra limitations

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-13 08:29:52 -06:00
OpenShift Merge Robot 883566fbc0
Merge pull request #2562 from baude/healtcheckphase2
healthcheck phase 2
2019-03-12 13:09:13 -07:00
baude 03716cf7f3 healtcheck phase 2
integration of healthcheck into create and run as well as inspect.
healthcheck enhancements are as follows:

* add the following options to create|run so that non-docker images can
define healthchecks at the container level.
  * --healthcheck-command
  * --healthcheck-retries
  * --healthcheck-interval
  * --healthcheck-start-period

* podman create|run --healthcheck-command=none disables healthcheck as
described by an image.
* the healthcheck itself and the healthcheck "history" can now be
observed in podman inspect
* added the wiring for healthcheck history which logs the health history
of the container, the current failed streak attempts, and log entries
for the last five attempts which themselves have start and stop times,
result, and a 500 character truncated (if needed) log of stderr/stdout.

The timings themselves are not implemented in this PR but will be in
future enablement (i.e. next).

Signed-off-by: baude <bbaude@redhat.com>
2019-03-12 14:29:18 -05:00
baude ca1e76ff63 Add event logging to libpod, even display to podman
In lipod, we now log major events that occurr.  These events
can be displayed using the `podman events` command. Each
event contains:

* Type (container, image, volume, pod...)
* Status (create, rm, stop, kill, ....)
* Timestamp in RFC3339Nano format
* Name (if applicable)
* Image (if applicable)

The format of the event and the varlink endpoint are to not
be considered stable until cockpit has done its enablement.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-11 15:08:59 -05:00
Giuseppe Scrivano 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
OpenShift Merge Robot 9b21f14eef
Merge pull request #2592 from baude/testfixups
test docs fixups
2019-03-08 13:28:43 -08:00
OpenShift Merge Robot 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
baude 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
Peter Hunt 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
baude 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
OpenShift Merge Robot 1b2f8679b8
Merge pull request #2533 from edsantiago/bats
New system tests under BATS
2019-03-07 15:23:54 -08:00
Ed Santiago 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
Ed Santiago 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
Qi Wang 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
alsadi 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
alsadi 99ddf512aa add test to cover networking
Signed-off-by: alsadi <alsadi@gmail.com>
2019-03-07 09:06:02 +02:00
alsadi f0c146c772 tests to cover locks and parallel execution #2551
Signed-off-by: alsadi <alsadi@gmail.com>
2019-03-07 09:00:33 +02:00
OpenShift Merge Robot f50715ed25
Merge pull request #2412 from QiWang19/iss2380
Enable specifying directory as device on container with --device
2019-03-06 10:59:56 -08:00
OpenShift Merge Robot c6c0b54c36
Merge pull request #2491 from baude/healtcheckphase1
podman healthcheck run (phase 1)
2019-03-06 09:24:22 -08:00
Chris Evich 53cd9bed95
System-test: Documentation and TODO list
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-06 12:14:49 -05:00
Qi Wang c90e0ea346 fix bug --device enable specifying directory as device
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-06 10:14:52 -05:00
OpenShift Merge Robot 2dc8568368
Merge pull request #2430 from QiWang19/issfiltet
Support filter image by reference to the image name
2019-03-06 04:47:33 -08:00
baude 598bde52d0 podman healthcheck run (phase 1)
Add the ability to manually run a container's healthcheck command.
This is only the first phase of implementing the healthcheck.
Subsequent pull requests will deal with the exposing the results and
history of healthchecks as well as the scheduling.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-05 14:03:55 -06:00
Peter Hunt 6c8f2072aa Append hosts to dependency container's /etc/hosts file
Before, any container with a netNS dependency simply used its dependency container's hosts file, and didn't abide its configuration (mainly --add-host). Fix this by always appending to the dependency container's hosts file, creating one if necessary.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-03-05 13:15:25 -05:00
Qi Wang a8d6d7dce7 Support filter image by reference to the repo name
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-04 20:39:47 -05:00
Jhon Honce ae47a7c47e Fix #2521
* Bad merge against podman stop, restored overwritten code

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-03-04 12:20:37 -07:00
Daniel J Walsh 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
Daniel J Walsh 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
OpenShift Merge Robot 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
OpenShift Merge Robot 2747c20867
Merge pull request #2485 from adrianreber/oci-check
Verify that used OCI runtime supports checkpoint
2019-03-01 12:04:29 -08:00
OpenShift Merge Robot 55f80719a6
Merge pull request #2481 from cevich/sysexec_waitcomplete
Fix SystemExec completion race
2019-03-01 08:43:25 -08:00
Chris Evich 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
Adrian Reber 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
OpenShift Merge Robot 03b236a754
Merge pull request #2461 from adrianreber/disable
Skip checkpoint/restore tests on Fedora for now
2019-02-28 13:51:13 -08:00
Ed Santiago 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
TomSweeneyRedHat 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
Adrian Reber 6412b05211
Skip checkpoint/restore tests on Fedora for now
There is currently still one SELinux related checkpoint/restore problem:
https://github.com/containers/libpod/issues/2334

To avoid unnecessary CI failures the checkpoint/restore tests are
temporarily disabled on Fedora.

It is not necessary to disable the tests on Ubuntu as it is running
without SELinux and it is also not necessary to disable the RHEL 7 tests
as RHEL's CRIU is too old to run the checkpoint/restore tests at all.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-02-27 16:32:59 +01:00
OpenShift Merge Robot e45c442080
Merge pull request #2358 from rhatdan/namespace
Fix up handling of user defined network namespaces
2019-02-25 21:31:50 +01:00
Daniel J Walsh fe4c0c3780
Change exit code to 1 on podman rmi nosuch image
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>
2019-02-25 12:49:27 -05:00
Daniel J Walsh e41279b902
Change exit code to 1 on podman rm nosuch container
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>
2019-02-25 10:31:04 -05:00
OpenShift Merge Robot cc4adddeb7
Merge pull request #2413 from baude/remotepodstop
Enable more podman-remote pod commands
2019-02-24 03:13:25 +01:00
Daniel J Walsh b87bdced1f
Fix up handling of user defined network namespaces
If user specifies network namespace and the /etc/netns/XXX/resolv.conf
exists, we should use this rather then /etc/resolv.conf

Also fail cleaner if the user specifies an invalid Network Namespace.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 05:47:27 -05:00
baude 4bf973a9f6 Enable more podman-remote pod commands
enable pod start, stop, and kill subcommands for the remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-22 17:00:24 -06:00
Giuseppe Scrivano 7e920e4865
tests, rootless: use relative path for export test
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-22 23:55:22 +01:00
baude 71db80ddb1 podman-remote load image
enable the ability to load an image into remote storage
using the remote client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-21 10:11:19 -06:00
baude 711ac93051 podman-remote save [image]
Add the ability to save an image from the remote-host to the
remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-20 12:58:05 -06:00
Peter Hunt 81804fc464 pod infra container is started before a container in a pod is run, started, or attached.
Prior, a pod would have to be started immediately when created, leading to confusion about what a pod state should be immediately after creation. The problem was podman run --pod ... would error out if the infra container wasn't started (as it is a dependency). Fix this by allowing for recursive start, where each of the container's dependencies are started prior to the new container. This is only applied to the case where a new container is attached to a pod.

Also rework container_api Start, StartAndAttach, and Init functions, as there was some duplicated code, which made addressing the problem easier to fix.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-02-15 16:39:24 -05:00
OpenShift Merge Robot 40c6d5c98c
Merge pull request #2188 from TomSweeneyRedHat/dev/tsweeney/pullall
Add --all-tags to pull command
2019-02-15 14:45:03 +01:00
OpenShift Merge Robot ae8cc41295
Merge pull request #2332 from baude/remotevolumeprune
volume prune
2019-02-14 22:52:03 +01:00
OpenShift Merge Robot 18bf883eeb
Merge pull request #2151 from QiWang19/cp
'podman cp' copy between host and container
2019-02-14 22:31:52 +01:00
baude 5be818e715 enable podman-remote volume prune
allow users to remotely prune volumes.

this is the last volume command for remote enablement.  as such,
the volume commands are being folded back into main because they
are supported for both local and remote clients.

also, enable all volume tests that do not use containers
as containers are not enabled for the remote client yet.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-14 10:55:05 -06:00
Qi Wang 36d962990a 'podman cp' copy between host and container
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-02-14 09:29:53 -05:00
Matthew Heon 9d4e7fe58b Try disabling --rm on notify_socket test
We have a consistent CI failure with the notify_socket test that
I can't reproduce locally. There's no reason for the test to have
--rm, so try removing it.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-13 11:41:20 -05:00
Matthew Heon b1770ecc5b Remove a lot of '--rm' options from unit tests
Previously, 'podman create --rm' did not work - it wouldn't error
but it did nothing.

It is now fixed, but unfortunately the unit tests used it a lot,
in ways that just do not work when it actually functions.

Begin the process of fixing now-failing tests.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-12 14:18:23 -05:00
baude a1ab6788e4 Remove urfave/cli from libpod
This is the final cleanup to remove urfave/sli from libpod.  Removed
old, disabled tests that have not been run in over a year.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-11 17:48:34 -06:00
OpenShift Merge Robot 8440b0734c
Merge pull request #2306 from baude/podstatsgotemplate
Podman pod stats -- fix GO template output
2019-02-11 16:02:53 +01:00
baude 4994fecd46 Podman pod stats -- fix GO template output
Go templates were not being processed or printed correctly for podman
pod stats.  Added the ability to do templates as well as honor the
table identifier.

Fixes #2258

Signed-off-by: baude <bbaude@redhat.com>
2019-02-10 11:27:09 -06:00
TomSweeneyRedHat 1543a01be8 Add --all-tags to pull command
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Add --all-tags for the `podman pull` command so all tags
of an image will be pulled, not just ':latest'.  Emulates
the change in Buildah https://github.com/containers/buildah/pull/1263

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-09 20:00:19 -05:00