Commit graph

809 commits

Author SHA1 Message Date
Matthew Heon e563f41116 Re-add locks to volumes.
This will require a 'podman system renumber' after being applied
to get lock numbers for existing volumes.

Add the DB backend code for rewriting volume configs and use it
for updating lock numbers as part of 'system renumber'.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 11:35:00 -04:00
OpenShift Merge Robot 67926d86b5
Merge pull request #3824 from baude/varlinkendpointtest
Create framework for varlink endpoint integration tests
2019-08-26 17:11:12 +02:00
TomSweeneyRedHat ada0568f53 Update cni config instructions
Update the CNI configuration instructions to line up with
the changes introduced in #3868.  Also do a bit less documentation
of the configuration and point to the GitHub project so we won't
get out of sync in the future.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-08-22 19:39:07 -04:00
OpenShift Merge Robot b263dd9e81
Merge pull request #3800 from vrothberg/generate-pod
generate systemd pod
2019-08-22 19:08:08 +02:00
Valentin Rothberg 56a65cffac generate systemd: support pods and geneartig files
Support generating systemd unit files for a pod.  Podman generates one
unit file for the pod including the PID file for the infra container's
conmon process and one unit file for each container (excluding the infra
container).

Note that this change implies refactorings in the `pkg/systemdgen` API.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-08-21 17:28:30 +02:00
TomSweeneyRedHat 9ced2488c9 Add --digestfile option to push
Add the digestfile option to the push command so the digest can
be stored away in a file when requested by the user.  Also have added
a debug statement to show the completion of the push.

Emulates Buildah's https://github.com/containers/buildah/pull/1799/files

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-08-21 10:11:52 -04:00
Peter Hunt cc3d8da968 exec: run with user specified on container start
Before, if the container was run with a specified user that wasn't root, exec would fail because it always set to root unless respecified by user.
instead, inherit the user from the container start.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-08-20 11:44:27 -04:00
OpenShift Merge Robot 33906a4c40
Merge pull request #3852 from edsantiago/bats
Flake fix: build test timeout
2019-08-19 21:06:04 +02:00
Ashley Cui 8c7014f11d Implement healthcheck for remote client
Previously unimplemented. Works the same way the local one does, except its remote.

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-08-19 12:14:54 -04:00
OpenShift Merge Robot c137e8fcf9
Merge pull request #3849 from openSUSE/directory-pull
Fix directory pull image name for OCI images
2019-08-19 17:50:39 +02:00
OpenShift Merge Robot b1acc43481
Merge pull request #3848 from giuseppe/enable-all-tests-crun
tests: enable all tests for crun
2019-08-19 16:42:19 +02:00
Ed Santiago cb4804de38 Flake fix: build test timeout
The priv test added to the build test in June runs an 'apk'
command which, unavoidably, has to fetch stuff from the net.
This is slow and unreliable, and periodically leads to
timeout failures. Worse, when this happens, some sort of
invisible buildah-only container gets left behind that leads
to failures in subsequent tests when trying to reset to
known state.

Imperfect workaround: try a 240-second timeout (up from 60)
when running apk. As backup, add a custom teardown() which
attempts to force-remove all containers and any new images.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-08-19 08:05:33 -06:00
OpenShift Merge Robot befaa95d93
Merge pull request #3777 from rhatdan/vendor
Add support & documentation to run containers with different file types
2019-08-19 13:48:15 +02:00
Giuseppe Scrivano f7527fb06d
test: enable all tests for crun
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-19 13:41:42 +02:00
Giuseppe Scrivano 570e55fdfb
test: fix return code check for missing workdir
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-19 13:41:41 +02:00
OpenShift Merge Robot 98dee275d0
Merge pull request #3836 from chenzhiwei/hostname
Allow customizing pod hostname
2019-08-19 13:33:15 +02:00
Sascha Grunert 22f55ce406
Fix directory pull image name for OCI images
This is a breaking change and modifies the resulting image name when
pulling from an directory via `oci:...`.

Without this patch, the image names pulled via a local directory got
processed incorrectly, like this:

```
> podman pull oci:alpine
> podman images
REPOSITORY      TAG      IMAGE ID       CREATED       SIZE
localhost/oci   alpine   4fa153a82426   5 weeks ago   5.85 MB
```

We now use the same approach as in the corresponding [buildah fix][1] to
adapt the behavior for correct `localhost/` prefixing.

[1]: https://github.com/containers/buildah/pull/1800

After applying the patch the same OCI image pull looks like this:

```
> ./bin/podman pull oci:alpine
> podman images
REPOSITORY         TAG      IMAGE ID       CREATED       SIZE
localhost/alpine   latest   4fa153a82426   5 weeks ago   5.85 MB
```

End-to-end tests have been adapted as well to cover the added scenario.

Relates to: https://github.com/containers/buildah/issues/1797

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-19 12:49:59 +02:00
Chen Zhiwei 7aefc1ac33 Allow customizing pod hostname
* set hostname in pod yaml file
* set --hostname in pod create command

Signed-off-by: Chen Zhiwei <zhiweik@gmail.com>
2019-08-18 03:48:40 +00:00
OpenShift Merge Robot 76f327f73f
Merge pull request #3617 from QiWang19/create_pull
add --pull flag for podman create&run
2019-08-17 14:55:14 +02:00
OpenShift Merge Robot 704cc582ac
Merge pull request #3719 from baude/networklist
inclusion of podman network
2019-08-16 17:33:31 +02:00
baude 04f2f95bb4 Create framework for varlink endpoint integration tests
add the ability to write integration tests similar to our e2e tests for
the varlink endpoints.

Signed-off-by: baude <bbaude@redhat.com>
2019-08-16 10:10:50 -05:00
OpenShift Merge Robot 2d47f1ae54
Merge pull request #3796 from giuseppe/enable-cgroupsv2-crun
cirrus: enable cgroups v2 tests with crun
2019-08-16 13:20:30 +02:00
baude 6220ef1488 inclusion of podman network
adding podman network and the subcommands inspect, list, and rm.  the
inspect subcommand displays the raw cni network configuration.  the list
subcommand displays a summary of the cni networks ala ps.  and the rm
subcommand removes a cni network.

Signed-off-by: baude <bbaude@redhat.com>
2019-08-15 12:49:12 -05:00
Ed Santiago 4fb7036ca1 tests for exit status on podman run --rm
...and on a container killed by 'podman rm -f'. See #3795

Disable when testing podman-remote; see #3808

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-08-14 15:14:55 -06:00
Chen Zhiwei fb9e1d7d9f Fix play kube command in pod yaml
Signed-off-by: Chen Zhiwei <zhiweik@gmail.com>
2019-08-14 09:22:29 -04:00
Giuseppe Scrivano 4929cafb91
tests: skip pause tests if freezer is not available
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-13 21:44:23 +02:00
Giuseppe Scrivano 2e6164d124
tests: enable run tests for cgroups v2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-13 21:44:22 +02:00
Giuseppe Scrivano ebd2b70019
tests: enable cpu tests for cgroups v2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-13 21:44:21 +02:00
Giuseppe Scrivano 7e38a73c4b
tests: enable memory tests for cgroups v2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-13 21:43:37 +02:00
Giuseppe Scrivano 231b6cb758
test: fix option name
the option is --quiet, not --q

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-13 21:43:35 +02:00
Daniel J Walsh 316e51f0a9
Add support & documentation to run containers with different file types
Udica is adding new features to allow users to define container process
and file types. This would allow us to setup trusted communications channels
between multiple security domains.  ContainerA -> ContainerB -> ContainerC

Add tests to make sure users can change file types

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-08-13 10:16:01 -04:00
Giuseppe Scrivano 9f67cde9f8
tests: disable some tests currently failing when not using runc
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-12 16:09:34 +02:00
OpenShift Merge Robot 8c77dd77af
Merge pull request #3742 from adrianreber/ConmonPidFile
Conmon pid file
2019-08-10 12:01:45 +02:00
OpenShift Merge Robot d65cb66437
Merge pull request #3758 from edsantiago/bats
implement 'make remotesystem'
2019-08-10 11:52:44 +02:00
Qi Wang decfea65be add --pull flag for podman create&run
Requirement from https://github.com/containers/libpod/issues/3575#issuecomment-512238393

Added --pull for podman create and pull to match the newly added flag in docker CLI.
`missing`: default value, podman will pull the image if it does not exist in the local.
`always`: podman will always pull the image.
`never`: podman will never pull the image.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-09 15:21:34 -04:00
Adrian Reber 0c9a941d01
Test that restored container does not depend on the original container
In the restore from external checkpoint archive test, the second restore
using a new name and ID is now done first to ensure that nothing in the
restored container depends on the original container.

Test has been adapted to catch errors like the one fixed with the
previous commit to adapt ConmonPidFile for restored containers.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-08-09 19:26:57 +02:00
Qi Wang cfdf891552 fix create&run getting --authfile from cli
Add flag `--authfile` to create and run so Podman can read authfile path from not only environemnt variable REGISTRY_AUTH_FILE but also CLI

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-09 12:27:32 -04:00
OpenShift Merge Robot 76840f2d99
Merge pull request #3764 from rhatdan/dnssearch
Allow the passing of '.' to --dns-search
2019-08-09 04:03:17 +02:00
Qi Wang a2561ec58a fix copy change file owner if cp from container
If copies file from container to local machine, change the file owner to the cp command caller.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-08 17:14:47 -04:00
Daniel J Walsh 5270cd89d3
Allow the passing of '.' to --dns-search
--dns-search is defined to remove all search domains from a container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-08-08 15:25:50 -04:00
OpenShift Merge Robot 09cedd152d
Merge pull request #3750 from baude/portreporting
fix port early return
2019-08-08 20:34:49 +02:00
Ed Santiago 5c108cdab4 implement 'make remotesystem'
podman-remote rm now works; that's the only thing we were
waiting for to enable podman-remote (varlink) system tests.

Add a (too-complicated, sorry) Makefile target that will
define a random socket path, start the podman varlink server,
and run the test suite using podman-remote.

Also: add two convenience functions, is_rootless and is_remote,
and use those in skip_if_rootless/if_remote and elsewhere

Also: workarounds for broken tests:
 - basic version test: podman-remote emits an empty 'Client'
   line. Just ignore it.
 - looks like 'podman-remote pod' doesn't work; skip test.

Also: minor documentation update

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-08-08 11:44:55 -06:00
OpenShift Merge Robot 5701fe6689
Merge pull request #3744 from mheon/fix_command
When populating CMD, do not include Entrypoint
2019-08-08 14:32:27 +02:00
OpenShift Merge Robot 8776a577bf
Merge pull request #3738 from mheon/mount_opts_bools
Allow --ro=[true|false] with mount flag
2019-08-08 14:20:29 +02:00
Matthew Heon 8d44c61f27 Add a test for verifying ENTRYPOINT and CMD
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-07 11:49:34 -04:00
baude b7b86bda2d fix port early return
when listing multiple ports on a container with podman port, an early
return was limiting results.

Fixes: #3747

Signed-off-by: baude <bbaude@redhat.com>
2019-08-07 09:10:47 -05:00
Matthew Heon c0a124ea89 Allow --ro=[true|false] with mount flag
The 'podman run --mount' flag previously allowed the 'ro' option
to be specified, but was missing the ability to set it to a bool
(as is allowed by docker). Add that. While we're at it, allow
setting 'rw' explicitly as well.

Fixes #2980

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-07 10:03:01 -04:00
Peter Hunt 7c92256103 add test to verify hostname is shared in a pod
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-08-07 08:44:08 -04:00
Ed Santiago 8922dfcc76 pod top test: reenable
It looks like #2780 is fixed: an overnight run yielded no
instances of 'pod top' returning incomplete output.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-08-06 11:46:51 -06:00
OpenShift Merge Robot 337358ae63
Merge pull request #3690 from adrianreber/ignore-static-ip
restore: added --ignore-static-ip option
2019-08-05 16:11:50 +02:00