Commit graph

665 commits

Author SHA1 Message Date
OpenShift Merge Robot 7be87f5551
Merge pull request #3078 from cevich/cirrus_f30
Cirrus F30
2019-06-19 16:13:47 +02:00
Brent Baude d87cb1a5f9 fix port -l timing with healthchecks
many of the port tests use our nginx container image.  in some cases, we have timing
issues between when the nginx and the container are running and when the port -l
command is run causing test flakes.  we now use the container image's built in
healthcheck to ensure that nginx is running (and subsequently the container
itself) before running the port command.

Fixes: #3309

Signed-off-by: Brent Baude <bbaude@redhat.com>
Signed-off-by: baude <bbaude@redhat.com>
2019-06-18 10:43:53 -05:00
Giuseppe Scrivano 292a48cab4
cmd, docs, test: fix some typos
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-18 10:52:19 +02:00
Ed Santiago d6f436204f run BATS tests in Cirrus
I'm running the BATS tests manually once in a while, and
catching several problems each week that make it past
the rest of CI. Since the BATS tests run at RPM gating
time, we need to catch problems earlier. Try running
the tests from Cirrus.

Tests will be skipped on Ubuntu due to a too-ancient
version of coreutils (8.28; the 'timeout -v' we use
requires 8.29).

Tests are run *after* integration tests, even though
these take three minutes and would be nice to have
fail quickly, because running before causes bizarre
CI failures. Shrug.

UPDATE: also fix run test, broken by #3311.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-06-17 13:41:14 -06:00
Giuseppe Scrivano 6b7649e4ba
test: add test for logs -f
discussion here:
https://github.com/containers/libpod/issues/3325#issuecomment-502214492

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-17 11:04:34 +02:00
OpenShift Merge Robot 670fc03088
Merge pull request #3094 from QiWang19/cpvol
podman copy  files to the volume with a container
2019-06-15 12:48:54 +02:00
OpenShift Merge Robot 90e3c9002b
Merge pull request #3328 from mheon/storage_opts_for_cleanup
When creating exit command, pass storage options on
2019-06-15 00:18:53 +02:00
Matthew Heon c866e441d0 Completely disable global options test
We need to cut a release. We can investigate further next week.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-14 16:33:22 -04:00
Matthew Heon 2abde1059c Skip runlabel global options test for podman-in-podman
This is failing 100% on CI. No time to debug why properly before
we need to cut a release, but is probably related to the change
from a slice to an array.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-14 15:21:46 -04:00
Chris Evich 11484580d3
Cirrus: Add support for testing F30
Remove disused `build_cache_images` task, and
update relevant dockerfiles for F30.

Fix problem of cloud-init failing to expand root-device on boot
(/var/lib/cloud/instance left in improper state).

Fix problem of cloud-init racing with google-network-daemon.service on
boot (looking for cloudconfig metadata too early).  Causing
root-device to _sometimes_ fail to expand.

Fix problem of hack/get_ci_vm.sh argument passing.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-14 13:41:58 -04:00
Giuseppe Scrivano 23efe4cb81
storage: support --mount type=bind,bind-nonrecursive
add support for not recursive bind mounts.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-13 15:32:45 +02:00
OpenShift Merge Robot c385f33cdf
Merge pull request #3290 from edsantiago/bats
BATS tests - get working again
2019-06-11 21:21:33 +02:00
Matthew Heon f909b745ec Add --filename option to generate kube
This allows writing output directly to a file, instead of STDOUT.
Makes things easier for some scripting tasks. Like the unit tests
for 'play kube'.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-11 11:26:46 -04:00
Ed Santiago bd0582dd34 BATS tests - get working again
Various small fixes to get BATS tests working again.
Split from #2947 because that one keeps getting stalled,
and I'm hoping these separate changes get approved.

I consider these changes urgent because RHEL8 gating
tests are failing, and will fail even more if/when #2272
gets picked up and packaged for RHEL8, and I consider
it important to have clean passing tests for RHEL8.

  * info test: 'insecure registries' is gone. A recent
    commit (d1a7378aa) changed the format of 'podman info',
    removing the 'insecure registries' key. Deal with it.

  * info test: remove check for .host.{Conmon,OCIRuntime}.package;
    the value on f28 and f29 is 'Unknown' (instead of an NVR).
    We can live without this check.

  * 'load' test: skip when running in CI, because stdin
    is not a tty.

  * container restore: fix arg processing. #2272 broke argument
    processing: 'podman container restore', with no args, should
    exit with 'argument required' error. Root cause is that the
    new --import option takes the place of an argument, so the
    checkAllAndLatest() call had to be changed to not exit on error.
    Workaround is (sigh) to copy/paste the skipped checkAllAndLatest()
    code, with minor tweaks to accommodate --import.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-06-11 06:53:03 -06:00
Matthew Heon 53435d4d47 Add a test for 'podman play kube' to prevent regression
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-10 18:57:29 -04:00
OpenShift Merge Robot 39f5ea4c04
Merge pull request #3180 from mheon/inspect_volumes
Begin to break up pkg/inspect
2019-06-08 14:45:24 +02:00
OpenShift Merge Robot 346128792c
Merge pull request #2272 from adrianreber/migration
Add support to migrate containers
2019-06-07 14:33:20 +02:00
Matthew Heon b2a8b725af Disable a very badly flaking healthcheck test
We'll reenable once the flake is fixed.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-06 10:55:57 -04:00
OpenShift Merge Robot 67c50ab63d
Merge pull request #3249 from baude/testtiming
fix timing issues with some tests
2019-06-04 14:51:32 +02:00
Adrian Reber bef83c42ea
migration: add possibility to restore a container with a new name
The option to restore a container from an external checkpoint archive
(podman container restore -i /tmp/checkpoint.tar.gz) restores a
container with the same name and same ID as id had before checkpointing.

This commit adds the option '--name,-n' to 'podman container restore'.
With this option the restored container gets the name specified after
'--name,-n' and a new ID. This way it is possible to restore one
container multiple times.

If a container is restored with a new name Podman will not try to
request the same IP address for the container as it had during
checkpointing. This implicitly assumes that if a container is restored
from a checkpoint archive with a different name, that it will be
restored multiple times and restoring a container multiple times with
the same IP address will fail as each IP address can only be used once.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-04 14:02:51 +02:00
Qi Wang c1b4060bdd podman copy files to the volume with a container
enabls podman to cpoy files between the host machine and the volume related with a container.
Close #3059

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-06-03 17:36:34 -04:00
Adrian Reber 2aa3261744
Add test case for container migration
The difference between container checkpoint/restore and container
migration is that for migration the container which was checkpointed
must not exist during restore. To simulate migration the container
is remove ('podman rm -fa') before being restored. The migration test
does following steps:

 * podman run
 * podman container checkpoint -l -e /tmp/checkpoint.tar.gz
 * podman rm -fa
 * podman container restore -i /tmp/checkpoint.tar.gz

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-03 22:05:12 +02:00
Matthew Heon 1be345bd9d Begin to break up pkg/inspect
Let's put inspect structs where they're actually being used. We
originally made pkg/inspect to solve circular import issues.
There are no more circular import issues.

Image structs remain for now, I'm focusing on container inspect.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-03 15:54:53 -04:00
OpenShift Merge Robot e41162076a
Merge pull request #3081 from baude/remotecommit
podman remote-client commit
2019-06-03 20:58:13 +02:00
baude c727cd1dc6 fix timing issues with some tests
some integration tests are inherently problematic due to timing issues.
one such case is running a valid health check on container that runs
nginx.  while the container may be running, nginx may not have finished
executing itself and therefore the healthcheck fails.

Signed-off-by: baude <bbaude@redhat.com>
2019-06-03 11:06:46 -05:00
Matthew Heon 25aac813bd Fix podman cp test by reordering operations
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-31 12:58:44 -04:00
OpenShift Merge Robot b5b461ac28
Merge pull request #3147 from baude/testimagecache
use imagecaches for local tests
2019-05-30 21:56:26 +02:00
baude 2df462024b podman remote-client commit
add the ability to commit a container to an image using the remote
client.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-30 10:14:23 -05:00
Matthew Heon 5a07311d9e Fix podman cp tests
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-30 10:53:52 -04:00
Matthew Heon f456825fe8 Fix bug in e2e tests for podman cp
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:51 -04:00
Matthew Heon 431e633b48 Add test to ensure symlinks are resolved in ctr scope
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:51 -04:00
baude f610a485c1 use imagecaches for local tests
when doing localized tests (not varlink), we can use secondary image
stores as read-only image caches.  this cuts down on test time
significantly because each test does not need to restore the images from
a tarball anymore.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-29 15:12:05 -05:00
OpenShift Merge Robot 294448c2ea
Merge pull request #2709 from haircommander/journald
Add libpod journald logging
2019-05-29 17:51:27 +02:00
Peter Hunt 88429242dd Add --follow to journald ctr logging
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-28 11:14:08 -04:00
Peter Hunt 51bdf29f04 Address comments
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-28 11:10:57 -04:00
Peter Hunt 02f971131a Implement podman logs with log-driver journald
Add a journald reader that translates the journald entry to a k8s-file formatted line, to be added as a log line

Note: --follow with journald hasn't been implemented. It's going to be a larger undertaking that can wait.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-28 11:10:57 -04:00
OpenShift Merge Robot 7b6dac300d
Merge pull request #3194 from QiWang19/cptar
fix bug dest path of copying tar
2019-05-28 16:44:58 +02:00
OpenShift Merge Robot 335a1ef160
Merge pull request #3189 from vrothberg/apparmor-fixes
Apparmor fixes
2019-05-28 16:23:48 +02:00
OpenShift Merge Robot b1d590b441
Merge pull request #3196 from giuseppe/keep-id
userns: add new option --userns=keep-id
2019-05-25 12:32:08 +02:00
OpenShift Merge Robot 3c85122faa
Merge pull request #3185 from mheon/fix_cp_test
Fix a potential flake in the tests for podman cp
2019-05-25 12:20:08 +02:00
Qi Wang bb7b0aad0e fix bug dest path of copying tar
when podman cp tar without --extract flag, if the destination already exists, or ends with path seprator, cp the tar under the directory, otherwise copy the tar named with the destination

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-05-24 11:51:30 -04:00
Giuseppe Scrivano f09370c68b
userns: add new option --userns=keep-id
it creates a namespace where the current UID:GID on the host is mapped
to the same UID:GID in the container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-24 17:34:12 +02:00
Valentin Rothberg bcbf5c4894 baseline tests: apparmor with --privileged
https://github.com/containers/libpod/issues/3112 has revealed a
regression in apparmor when running privileged containers where the
profile must not be set or loaded.  Add a simple test to avoid potential
future regressions.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-05-24 11:09:25 +02:00
Matthew Heon 0b571ede78 Fix a potential flake in the tests for podman cp
Instead of using the working directory, use a subdirectory of the
temporary directory created for the individual test, to prevent a
potential EEXIST for shared working directory.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-23 16:30:11 -04:00
Yiqiao Pu 3a3c558f60 Add test cases for login and logout
As logout test request login to the registry, we plan to test them
together. There are five test cases added:
1. Podman login and logout with default value
3. Podman login and logout with --authfile
2. Podman login and logout with --tls-verify
4. Podman login and logout with --cert-dir
5. Podman login and logout with multi registry

All above test cases are using docker rgistry v2

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2019-05-22 14:34:42 +08:00
OpenShift Merge Robot 488b698040
Merge pull request #3177 from mheon/duplicate_volumes
When superceding mounts, check for opposite types
2019-05-22 00:10:40 +02:00
OpenShift Merge Robot 8f43d08d96
Merge pull request #2561 from cevich/cirrus_test_images
Cirrus: Support testing of VM cache-image changes
2019-05-21 22:08:00 +02:00
Matthew Heon 43f28cdc16 Add test for image volume conflict with user volume
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-21 12:36:48 -04:00
Chris Evich c4d9b03f78
Cirrus: Overhaul/Simplify env. var setup
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:02 -04:00
Divyansh Kamboj c6f7066e77 Minor fix filtering images by label
Added test to avoid future regressions

Fix #3163

Signed-off-by: Divyansh Kamboj <kambojdivyansh2000@gmail.com>
2019-05-20 23:11:48 +05:30