Commit graph

347 commits

Author SHA1 Message Date
baude 9a23e285d3 add support for podman-remote history
this adds support to get the history for an image and its
layers using podman-remote.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-15 10:29:24 -06:00
baude f9f72823ad podman remote integrations tests
add exists and rmi tests back in ...

Signed-off-by: baude <bbaude@redhat.com>
2019-01-15 08:19:26 -06:00
baude b30a56c156 Run integrations test with remote-client
Add the ability to run the integration (ginkgo) suite using
the remote client.

Only the images_test.go file is run right now; all the rest are
isolated with a // +build !remotelinux.  As more content is
developed for the remote client, we can unblock the files and
just block single tests as needed.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 14:51:32 -06:00
Daniel J Walsh f2ff550967
Fix handling of nil volumes
Currently if a user passes in a -v with
-v $bogus:/foobar

We crash.  This will throw a proper error.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-10 10:27:39 -05:00
Adrian Reber ab8e03b3e7
Added checkpoint/restore test for same IP
Restoring a container from a checkpoint should give the container the
same IP as before checkpointing. This adds a test to make sure the IP
stays the same.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-01-09 07:34:57 +01:00
Adrian Reber e11cbd7129
Enable checkpoint test with established TCP connections
Signed-off-by: Adrian Reber <areber@redhat.com>
2019-01-09 07:34:57 +01:00
OpenShift Merge Robot c9d63fe89d
Merge pull request #2097 from debarshiray/wip/debarshiray/podman-exec-workdir
Add a --workdir option to 'podman exec'
2019-01-08 10:21:14 -08:00
Debarshi Ray 867669374c Add a --workdir option to 'podman exec'
Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2019-01-08 17:42:37 +01:00
Debarshi Ray f71264e612 Test that 'podman start --sig-proxy' does not work without --attach
Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2019-01-08 16:34:09 +01:00
Valentin Rothberg 75578aad61 add container-init support
Add support for executing an init binary as PID 1 in a container to
forward signals and reap processes.  When the `--init` flag is set for
podman-create or podman-run, the init binary is bind-mounted to
`/dev/init` in the container and "/dev/init --" is prepended to the
container's command.

The default base path of the container-init binary is `/usr/libexec/podman`
while the default binary is catatonit [1].  This default can be changed
permanently via the `init_path` field in the `libpod.conf` configuration
file (which is recommended for packaging) or temporarily via the
`--init-path` flag of podman-create and podman-run.

[1] https://github.com/openSUSE/catatonit

Fixes: #1670
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-01-04 11:42:03 +01:00
Adrian Reber 2b41cd5fd3
Re-enable checkpoint/restore CI tests on Fedora
Now that the correct distribution CRIU packages are installed the
checkpoint/restore tests should no longer fail. This re-enables the
disabled tests on Fedora.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-12-28 14:05:27 +01:00
Daniel J Walsh df99522c67
Fixes to handle /dev/shm correctly.
We had two problems with /dev/shm, first, you mount the
container read/only then /dev/shm was mounted read/only.
This is a bug a tmpfs directory should be read/write within
a read-only container.

The second problem is we were ignoring users mounted /dev/shm
from the host.

If user specified

podman run -d -v /dev/shm:/dev/shm ...

We were dropping this mount and still using the internal mount.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-24 09:03:53 -05:00
baude df923b2613 rootless tests using stop is more reliable
when testing rootless containers, it is more reliable to stop
a container with a zero timeout than kill a container.  We made
this change in non-rootless tests as well.  When IO or CPU are
taxed, it avoids a situation where the kill signal is sent but the
container has not been able to update its status when a subsequent
action occurs.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-23 11:47:46 -06:00
Daniel J Walsh c657dc4fdb
Switch all referencs to image.ContainerConfig to image.Config
This will more closely match what Docker is doing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-21 15:59:34 -05:00
Giuseppe Scrivano 0ed55f75ab
test: add test for rootless export
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-12-21 11:26:03 +01:00
baude 1f3726f2cf skip test for blkio.weight when kernel does not support it
Signed-off-by: baude <bbaude@redhat.com>
2018-12-20 09:00:52 -06:00
Qi Wang 31edf47285 Support podman image trust command
Display the trust policy of the host system. The trust policy is stored in the /etc/containers/policy.json file and defines a scope of registries or repositories.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-12-19 13:36:11 -05:00
TomSweeneyRedHat 92c7f4eb9e Show image only once with images -q
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-12-17 11:08:54 -05:00
Chris Evich a1a5f3ba51
Cirrus: Migrate PAPR testing of F28 to Cirrus
Since the most recent TWO versions of Fedora are officially supported
upstream, both need to be tested.  Implement the concept of a 'prior'
Fedora release in both base-image and cache-image production.  Utilize
the produced cache-image to test libpod.  Remove F28 testing from PAPR.

Much thanks to @baude @giuseppe for help with this.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 11:19:41 -05:00
Chris Evich cb89409a71
Skip checkpoint tests on Fedora <30
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 11:16:00 -05:00
OpenShift Merge Robot bff29f5475
Merge pull request #1988 from mheon/use_dependency_resolv
Containers sharing a netns should share resolv/hosts
2018-12-13 08:05:41 -08:00
OpenShift Merge Robot e3a1a7efca
Merge pull request #1989 from baude/deletecontainerfailstart
failed containers with --rm should remove themselves
2018-12-13 07:33:12 -08:00
Emilien Macchi 40dd9de9a5 e2e: add tests for systemd
Add functional tests to start a container from systemd.
This patch will:

- create a systemd unit file to start redis container
- create the container with `podman create`
- enable the service
- start the container with systemd
- check that the service is actually running

Signed-off-by: Emilien Macchi <emilien@redhat.com>
2018-12-12 17:04:59 -05:00
Matthew Heon c93ad3762c Add test for sharing resolv and hosts with netns
Signed-off-by: Matthew Heon <mheon@redhat.com>
2018-12-12 15:41:13 -05:00
baude 9786542620 failed containers with --rm should remove themselves
when starting or running a container that has --rm, if the starting
container fails (like due to an invalid command), the container should
get removed.

Resolves: #1985

Signed-off-by: baude <bbaude@redhat.com>
2018-12-12 10:55:53 -06:00
Giuseppe Scrivano 9a7416c342
rootless: fix restart when using fuse-overlayfs
With rootless containers we cannot really restart an existing container
as we would need to join the mount namespace as well to be able to reuse
the storage, so ensure the container is stopped first.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-12-11 10:24:06 +01:00
OpenShift Merge Robot 49d9a8f951
Merge pull request #1928 from baude/podtokube
generate kube
2018-12-07 07:46:52 -08:00
OpenShift Merge Robot 5c6e02b55b
Merge pull request #1904 from umohnani8/volume
Add "podman volume" command
2018-12-06 08:59:13 -08:00
Urvashi Mohnani 375831e976 Tests for podman volume commands
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2018-12-06 10:17:23 +00:00
baude e037427035 Add ability to prune containers and images
Allow user to prune unused/unnamed images, the layer images from building,
via podman rmi --prune.

Allow user to prune stopped/exiuted containers via podman rm --prune.

This should resolve #1910

Signed-off-by: baude <bbaude@redhat.com>
2018-12-05 19:57:54 -06:00
baude 0cd83466db test for rmi with children
Signed-off-by: baude <bbaude@redhat.com>
2018-12-04 14:22:11 -06:00
OpenShift Merge Robot b81f640bb5
Merge pull request #1920 from wking/explicit-hooks-dirs
libpod/container_internal: Deprecate implicit hook directories
2018-12-04 12:19:48 -08:00
baude c8436b4912 generate kube
add the ability to generate kubernetes pod and service yaml representations
of libpod containers and pods.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-04 08:03:49 -06:00
baude 9c359a31d5 create pod on the fly
when a user specifies --pod to podman create|run, we should create that pod
automatically.  the port bindings from the container are then inherited by
the infra container.  this signicantly improves the workflow of running
containers inside pods with podman.  the user is still encouraged to use
podman pod create to have more granular control of the pod create options.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-03 15:49:17 -06:00
W. Trevor King a4b483c848 libpod/container_internal: Deprecate implicit hook directories
Part of the motivation for 800eb863 (Hooks supports two directories,
process default and override, 2018-09-17, #1487) was [1]:

> We only use this for override. The reason this was caught is people
> are trying to get hooks to work with CoreOS. You are not allowed to
> write to /usr/share... on CoreOS, so they wanted podman to also look
> at /etc, where users and third parties can write.

But we'd also been disabling hooks completely for rootless users.  And
even for root users, the override logic was tricky when folks actually
had content in both directories.  For example, if you wanted to
disable a hook from the default directory, you'd have to add a no-op
hook to the override directory.

Also, the previous implementation failed to handle the case where
there hooks defined in the override directory but the default
directory did not exist:

  $ podman version
  Version:       0.11.2-dev
  Go Version:    go1.10.3
  Git Commit:    "6df7409cb5a41c710164c42ed35e33b28f3f7214"
  Built:         Sun Dec  2 21:30:06 2018
  OS/Arch:       linux/amd64
  $ ls -l /etc/containers/oci/hooks.d/test.json
  -rw-r--r--. 1 root root 184 Dec  2 16:27 /etc/containers/oci/hooks.d/test.json
  $ podman --log-level=debug run --rm docker.io/library/alpine echo 'successful container' 2>&1 | grep -i hook
  time="2018-12-02T21:31:19-08:00" level=debug msg="reading hooks from /usr/share/containers/oci/hooks.d"
  time="2018-12-02T21:31:19-08:00" level=warning msg="failed to load hooks: {}%!(EXTRA *os.PathError=open /usr/share/containers/oci/hooks.d: no such file or directory)"

With this commit:

  $ podman --log-level=debug run --rm docker.io/library/alpine echo 'successful container' 2>&1 | grep -i hook
  time="2018-12-02T21:33:07-08:00" level=debug msg="reading hooks from /usr/share/containers/oci/hooks.d"
  time="2018-12-02T21:33:07-08:00" level=debug msg="reading hooks from /etc/containers/oci/hooks.d"
  time="2018-12-02T21:33:07-08:00" level=debug msg="added hook /etc/containers/oci/hooks.d/test.json"
  time="2018-12-02T21:33:07-08:00" level=debug msg="hook test.json matched; adding to stages [prestart]"
  time="2018-12-02T21:33:07-08:00" level=warning msg="implicit hook directories are deprecated; set --hooks-dir="/etc/containers/oci/hooks.d" explicitly to continue to load hooks from this directory"
  time="2018-12-02T21:33:07-08:00" level=error msg="container create failed: container_linux.go:336: starting container process caused "process_linux.go:399: container init caused \"process_linux.go:382: running prestart hook 0 caused \\\"error running hook: exit status 1, stdout: , stderr: oh, noes!\\\\n\\\"\""

(I'd setup the hook to error out).  You can see that it's silenly
ignoring the ENOENT for /usr/share/containers/oci/hooks.d and
continuing on to load hooks from /etc/containers/oci/hooks.d.

When it loads the hook, it also logs a warning-level message
suggesting that callers explicitly configure their hook directories.
That will help consumers migrate, so we can drop the implicit hook
directories in some future release.  When folks *do* explicitly
configure hook directories (via the newly-public --hooks-dir and
hooks_dir options), we error out if they're missing:

  $ podman --hooks-dir /does/not/exist run --rm docker.io/library/alpine echo 'successful container'
  error setting up OCI Hooks: open /does/not/exist: no such file or directory

I've dropped the trailing "path" from the old, hidden --hooks-dir-path
and hooks_dir_path because I think "dir(ectory)" is already enough
context for "we expect a path argument".  I consider this name change
non-breaking because the old forms were undocumented.

Coming back to rootless users, I've enabled hooks now.  I expect they
were previously disabled because users had no way to avoid
/usr/share/containers/oci/hooks.d which might contain hooks that
required root permissions.  But now rootless users will have to
explicitly configure hook directories, and since their default config
is from ~/.config/containers/libpod.conf, it's a misconfiguration if
it contains hooks_dir entries which point at directories with hooks
that require root access.  We error out so they can fix their
libpod.conf.

[1]: https://github.com/containers/libpod/pull/1487#discussion_r218149355

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-12-03 12:54:30 -08:00
baude 318bf7017b podman pod exists
like containers and images, users would benefit from being able to check
if a pod exists in local storage.  if the pod exists, the return code is 0.
if the pod does not exists, the return code is 1.  Any other return code
indicates a real errors, such as permissions or runtime.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-03 12:00:18 -06:00
Yiqiao Pu e5518e268d Add create test with --mount flag
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-29 19:01:22 +08:00
OpenShift Merge Robot 3af62f620a
Merge pull request #1890 from baude/disablecheckpointtests
disable checkpoint tests on f29
2018-11-28 13:31:40 -08:00
baude dd81a8fe7d disable checkpoint tests on f29
temporarily disabling checkpoint tests on f29 as they don't currently pass.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-28 14:39:47 -06:00
Giuseppe Scrivano 6e04ec783b
test, rootless: specify USER env variable
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-28 21:31:28 +01:00
OpenShift Merge Robot 22d53e2b54
Merge pull request #1798 from giuseppe/fix-notify-socket
systemd: fix NOTIFY_SOCKET with patched runc
2018-11-28 09:16:27 -08:00
OpenShift Merge Robot 7ae37dcafc
Merge pull request #1879 from mheon/stop_stopped_is_valid
Stopping a stopped container is not an error for Podman
2018-11-28 07:39:37 -08:00
Giuseppe Scrivano 180d0c6f62
tests: fix NOTIFY_SOCKET test
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-28 16:33:51 +01:00
Giuseppe Scrivano f7d972a70f
test: fix test for NOTIFY_SOCKET
do not make any assumption on the path inside of the container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-28 16:25:12 +01:00
OpenShift Merge Robot effd63d6d5
Merge pull request #1848 from adrianreber/master
Add tcp-established to checkpoint/restore
2018-11-28 07:00:24 -08:00
Matthew Heon 841f47d728 Add test to ensure stopping a stopped container works
We regressed on this at some point. Adding a new test should help
ensure that doesn't happen again.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-28 09:35:30 -05:00
OpenShift Merge Robot d346996e15
Merge pull request #1849 from giuseppe/report-rootless-netmode
rootless: add new netmode "slirp4netns"
2018-11-28 06:18:28 -08:00
Giuseppe Scrivano 0365f57371
rootless: fix cleanup
The conmon exit command is running inside of a namespace where the
process is running with uid=0.  When it launches again podman for the
cleanup, podman is not running in rootless mode as the uid=0.

Export some more env variables to tell podman we are in rootless
mode.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-28 10:19:13 +01:00
Adrian Reber d3cde7cefe
Added more checkpoint/restore test cases
This adds checkpoint/restore test cases for the newly added options
 * --leave-running
 * --tcp-established
 * --all
 * --latest

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-11-28 08:00:38 +01:00
Giuseppe Scrivano 4203df69ac
rootless: add new netmode "slirp4netns"
so that inspect reports the correct network configuration.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-27 21:10:16 +01:00
Giuseppe Scrivano 266c4952a8
tests: change return type for PodmanAsUser to PodmanTestIntegration
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-27 21:10:15 +01:00
Giuseppe Scrivano 55508c1185
test: cleanup CNI network used by the tests
issue introduced with:

https://github.com/containers/libpod/pull/1871

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-27 16:55:28 +01:00
OpenShift Merge Robot 3f0c0cf80f
Merge pull request #1874 from ypu/mount-test
Improve podman run --mount test
2018-11-27 04:30:02 -08:00
OpenShift Merge Robot 5636066e2f
Merge pull request #1871 from ypu/ip-test
Add some tests for --ip flag with run and create command
2018-11-27 03:46:13 -08:00
OpenShift Merge Robot 049defa984
Merge pull request #1850 from vrothberg/mount-propagation
set root propagation based on volume properties
2018-11-27 03:29:17 -08:00
Yiqiao Pu 1a217b6aa1 Remove mount options relatime from podman run --mount with shared
In some test env, mount with shared options is not included relatime
in the mountinfo file. So remove this from the test case.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-27 16:38:41 +08:00
Yiqiao Pu 883f814cfb Update test case name to podman run with --mount flag
Update the test case name to make it easier to filter --mount related
test cases with -ginkgo.focus.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-27 15:59:55 +08:00
Yiqiao Pu d9adcd198f Add some tests for --ip flag with run and create command
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-27 15:09:47 +08:00
baude 9d883d2032 add podman container|image exists
Add an exists subcommand to podman container and podman image that allows
users to verify the existence of a container or image by ID or name.  The return
code can be 0 (success), 1 (failed to find), or 125 (failed to work with runtime).

Issue #1845

Signed-off-by: baude <bbaude@redhat.com>
2018-11-26 09:19:39 -06:00
Valentin Rothberg 0e2042ebd7 set root propagation based on volume properties
Set the root propagation based on the properties of volumes and default
mounts.  To remain compatibility, follow the semantics of Docker.  If a
volume is shared, keep the root propagation shared which works for slave
and private volumes too.  For slave volumes, it can either be shared or
rshared.  Do not change the root propagation for private volumes and
stick with the default.

Fixes: #1834
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-11-26 13:55:02 +01:00
baude 690c52a113 Allow users to expose ports from the pod to the host
we need to allow users to expose ports to the host for the purposes
of networking, like a webserver.  the port exposure must be done at
the time the pod is created.

strictly speaking, the port exposure occurs on the infra container.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-20 09:49:34 -06:00
Yiqiao Pu aaa31bbb1a Fix no-new-privileges test
Update the test to compare the output from different containers.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:24 +08:00
Yiqiao Pu 74bcfc2f96 Separate common used test functions and structs to test/utils
Put common used test functions and structs to a separated package.
So we can use them for more testsuites.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:00 +08:00
baude 2dd9cae37c rm -f now removes a paused container
We now can remove a paused container by sending it a kill signal while it
is paused.  We then unpause the container and it is immediately killed.

Also, reworked how the parallelWorker results are handled to provide a
more consistent approach to how each subcommand implements it. It also
fixes a bug where if one container errors, the error message is duplicated
when printed out.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-08 15:18:11 -06:00
Matthew Heon b598d6829b Fix run --hostname test that started failing post-merge
Signed-off-by: Matthew Heon <mheon@redhat.com>
2018-11-07 16:26:42 -05:00
OpenShift Merge Robot 90662c2fa3
Merge pull request #1751 from QiWang19/issue1745
Add hostname to /etc/hosts
2018-11-07 08:58:19 -08:00
Qi Wang 879f9116de Add hostname to /etc/hosts
Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-11-07 09:55:59 -05:00
baude b89a7c7406 Fix cleanup for "Pause a bunch of running containers"
When running integration tests in our CI, we observe a problem where paused containers
are not able to be stopped; and therefore cannot be cleaned up.  This leaves dangling mounts
and sometimes zombied conmon processes.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-06 19:35:22 -06:00
baude b559c19c2f Make kill, pause, and unpause parallel.
Operations like kill, pause, and unpause -- which can operation on one or
more containers -- can greatly benefit from parallizing its main job (eq kill).

In the case of pauseand unpause, an --all option as was added. pause --all will
pause all **running** containers.  And unpause --all will unpause all **paused**
containers.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 14:23:55 -05:00
OpenShift Merge Robot 732a4c814e
Merge pull request #1738 from baude/pararestart
Make restart parallel and add --all
2018-11-01 12:19:14 -07:00
baude 2011782d9d Make restart parallel and add --all
When attempting to restart many containers, we can benefit from making
the restarts parallel.  For convenience, two new options are added:

--all attempts to restart all containers
--run-only when used with --all will attempt to restart only running containers

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 13:14:12 -05:00
baude a610f0f869 replace quay.io/baude to quay.io/libpod
images used for our integration suite have moved from my work account
to a group organization called libpod.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 10:31:44 -05:00
baude 0360ec725a allow ppc64le to pass libpod integration tests
this pr allows the libpod integration suite to pass on the
ppc64le architecture.  in some cases, I had to skip tests.
eventually, these tests need to be fixed so that they properly pass. of
note for this PR is:

* changed the ppc64le default container os to be overlay (over vfs) as vfs seems non-performant on ppc64le
* still run vfs for rootless operations
* some images names for ppc64le had to change because they don't exist.
* this should help getting our CI to run on the platform

Signed-off-by: baude <bbaude@redhat.com>
2018-10-31 18:40:09 -05:00
OpenShift Merge Robot aa853b2091
Merge pull request #1585 from rhatdan/labels
Add tests for selinux labels
2018-10-26 07:30:39 -07:00
Daniel J Walsh f9fb62c737
Add tests for selinux labels
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-10-25 09:33:08 -04:00
Valentin Rothberg 606a5cec8f runlabel: run any command
As discussed [1], the runlabel command should execute any command
specified in a label.  The reasoning behind is that we cannot restrict
which options are passed to Podman which thereby has full access to the
host (runlabels must be used with care).

With the updated semantics, runlabel will substitute the commands with a
basepath equal to "docker" or "podman" with "/proc/self/exe", and
otherwise leave the command unchanged to execute any other command on
the host.

[1] https://github.com/containers/libpod/pull/1607#issuecomment-428321382

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-10-24 14:02:43 +02:00
OpenShift Merge Robot 41a4827f84
Merge pull request #1638 from baude/fastps
Make podman ps fast
2018-10-23 09:05:20 -07:00
OpenShift Merge Robot 2e6bc3c7af
Merge pull request #1627 from adrianreber/criu
Add CRIU version check for checkpoint and restore
2018-10-23 07:53:11 -07:00
OpenShift Merge Robot ab2b3d64ce
Merge pull request #1697 from baude/statserr
correct stats err with non-running containers
2018-10-23 07:27:19 -07:00
baude ee8f19e7be Make podman ps fast
Like Ricky Bobby, we want to go fast.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-23 08:26:21 -05:00
Adrian Reber a14155917b
tests: use existing CRIU version check
Do not re-implement the CRIU version check in the test suite, use it
from libpod/pkg/criu.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-23 12:52:03 +02:00
baude 6362158615 correct stats err with non-running containers
when doing stats -a|--all, if you have non-running containers, we should
not error on not being able to get information like PID, etc on them.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-22 17:07:42 -05:00
baude 949d292567 Use restoreArtifacts to save time in integration tests
Signed-off-by: baude <bbaude@redhat.com>
2018-10-22 17:07:04 -05:00
baude 4662d06efd fix NOTIFY_SOCKET in e2e testfix NOTIFY_SOCKET in e2e tests
Signed-off-by: baude <bbaude@redhat.com>
2018-10-18 10:38:16 -05:00
Giuseppe Scrivano e1521c6323
tests: do not make assumptions on the mount output
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-14 16:52:30 +02:00
Daniel J Walsh 04a537756d
Generate a passwd file for users not in container
If someone runs podman as a user (uid) that is not defined in the container
we want generate a passwd file so that getpwuid() will work inside of container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-10-12 07:08:13 -04:00
Matthew Heon a54709129f Add tests for --ip flag
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-11 11:24:08 -04:00
Adrian Reber 5246238e7e
tests: add checkpoint/restore test
Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-03 21:41:40 +02:00
baude 14473270d7 Add ability for ubuntu to be tested
unfortunately the papr CI system cannot test ubuntu as a VM; therefore,
this PR still keeps travis.  but it does include fixes that will be required
for running on modern versions of ubuntu.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-03 12:45:37 -05:00
OpenShift Merge Robot d5687946f6
Merge pull request #1528 from baude/runlabel
Add container runlabel command
2018-10-02 17:16:43 -07:00
Daniel J Walsh 86d435f32f
Disable SELinux labeling if --privileged
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-10-02 03:44:46 -04:00
Daniel J Walsh f60fe5fb2f
Vendor in the latest containers/storage, image and buildah
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-29 08:01:25 +02:00
baude 4f825f2e07 Add container runlabel command
Execute the command as described by a container image.  The value of the label is processed
into a command by:

1. Ensuring the first argument of the command is podman.
2. Substituting any variables with those defined by the environment or otherwise.

If no label exists in the container image, nothing is done.

podman container runlabel LABEL IMAGE extra_args
Signed-off-by: baude <bbaude@redhat.com>
2018-09-28 14:14:13 -05:00
baude a931c44104 run complex image names with short names
In cases where the image name is more complex like:

quay/baude/alpine_nginx:latest  and is not from the docker
registry, we need to be able to run the image by its shortname
such as baude/alpine_nginx.  The same goes when the image is
not from a registry but instead has the localhost repository.

This resolves buildah issue #1034

Signed-off-by: baude <bbaude@redhat.com>
2018-09-28 12:48:54 -05:00
Daniel J Walsh 502e387483
podman runs disabled containers and privileged containers as spc_t
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-27 17:23:58 +02:00
baude 4073541981 rework CI tests to test on VMs
This PR makes several key changes to our CI testing.  Firstly, we now test
podman on fedora 28, fedora 29, and centos VMS (rather than containers). Any
of these that having failing tests are not marked as required yet. We
still preserve the podman in podman and podman in docker tests as well and
they are marked as required.

The lint and validate work is now done on a openshift container.  We also
removed the rpm verification on papr and perform this test under the "images"
test on the openshift ci.

This PR exposes integration test fails on some of our OSs.  My expectation is we
will fix those in additional PRs and as they are fixed, we should be flipping
the boolean bit to required.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1492
Approved by: mheon
2018-09-26 15:47:29 +00:00
Daniel J Walsh 52c1365f32 Add --mount option for create & run command
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1524
Approved by: mheon
2018-09-21 21:33:41 +00:00
Giuseppe Scrivano 1a59c4d5fe test, rootless: enforce cgroupfs manager
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1515
Approved by: baude
2018-09-20 13:31:59 +00:00
Daniel J Walsh 28a2bf827a Add new tests for ipc namespace sharing
We seem to be having a few flakes on namespace sharing.
Adding this test to make sure sharing with the host is working correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1485
Approved by: mheon
2018-09-17 16:55:11 +00:00
baude 0c0de6dcc5 change search test to look for fedora and not fedora-minimal
Signed-off-by: baude <bbaude@redhat.com>
2018-09-14 13:49:58 -05:00