Commit graph

3589 commits

Author SHA1 Message Date
Matthew Heon 3bd528e583 Bump to v1.2.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-30 11:33:12 -04:00
OpenShift Merge Robot 7b73974819
Merge pull request #2803 from mheon/release_notes_v1.2.0
Update release notes for v1.2.0
2019-03-29 15:10:12 -07:00
OpenShift Merge Robot e435931544
Merge pull request #2801 from mheon/remove_wait_event
Remove wait event
2019-03-29 15:10:04 -07:00
OpenShift Merge Robot c5ccab2dc4
Merge pull request #2802 from TomSweeneyRedHat/dev/tsweeney/buildah1.7.2
Vendor Buildah 1.7.2
2019-03-29 12:32:08 -07:00
Matthew Heon ae9e12d711 Update release notes for v1.2.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-29 15:29:14 -04:00
OpenShift Merge Robot 0531565343
Merge pull request #2800 from mheon/lock_events_file
Add locking to ensure events file is concurrency-safe
2019-03-29 12:16:00 -07:00
Matthew Heon 99318b0894 Remove wait event
It's not necessary to log an event for a read-only operation like
wait.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-29 14:50:43 -04:00
TomSweeneyRedHat 1a0d4f2602 Vendor Buildah 1.7.2
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-03-29 14:08:45 -04:00
Matthew Heon 8108801247 Add locking to ensure events file is concurrency-safe
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-29 12:51:37 -04:00
OpenShift Merge Robot f4d90a96cb
Merge pull request #2691 from baude/psdynamic
Add watch mode to podman ps
2019-03-29 07:59:11 -07:00
OpenShift Merge Robot 8b5f101726
Merge pull request #2635 from rhatdan/cache
Set blob cache directory based on GraphDriver
2019-03-29 07:59:04 -07:00
OpenShift Merge Robot 284dea453d
Merge pull request #2797 from giuseppe/rootless-set-sticky
rootless: set sticky bit on rundir
2019-03-29 07:48:12 -07:00
OpenShift Merge Robot 83cea5d5bc
Merge pull request #2730 from giuseppe/userns-take-rid-of-intermediate-mountns
userns: do not use an intermediate mount namespace
2019-03-29 07:48:05 -07:00
OpenShift Merge Robot dd2bf91540
Merge pull request #2793 from mheon/alter_name_regex
Alter container/pod/volume name regexp to match Docker
2019-03-29 07:19:05 -07:00
Matthew Heon 449b8ab7b1 Alter container/pod/volume name regexp to match Docker
Docker's upstream name validation regex has two major differences
from ours that we pick up in this PR.

The first requires that the first character of a name is a letter
or number, not a special character.

The second allows periods in names.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-29 09:40:06 -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
Giuseppe Scrivano 849548ffb8
userns: do not use an intermediate mount namespace
We have an issue in the current implementation where the cleanup
process is not able to umount the storage as it is running in a
separate namespace.

Simplify the implementation for user namespaces by not using an
intermediate mount namespace.  For doing it, we need to relax the
permissions on the parent directories and allow browsing
them. Containers that are running without a user namespace, will still
maintain mode 0700 on their directory.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-29 14:04:44 +01:00
Giuseppe Scrivano f7e72bc86a
volumes: push the chown logic to runtime_volume_linux.go
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-29 14:04:44 +01:00
OpenShift Merge Robot 9b789359f1
Merge pull request #2575 from haircommander/hotfix_play_kube
Default to SELinux private label for play kube mounts
2019-03-29 05:47:02 -07:00
OpenShift Merge Robot 376a89c7a4
Merge pull request #2524 from ekultails/podman-ps_man_page_status
Add all possible container status states to the podman-ps manual page.
2019-03-29 05:33:03 -07:00
Daniel J Walsh 6b0ac2301b
Cleanup image2 -> image for imports
Remove references to image2 in source code.  Makes the code
slightly more readable.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-29 08:27:47 -04:00
Daniel J Walsh c37589f503
Set blob cache directory based on GraphDriver
Currently in rootless containers, we end up not using the blob cache.
We also don't store the blob cache based on the users specified graph
storage.  This change will cause the cache directory to be stored with
the rest of the containe images.

While doing this patch, I found that we had duplicated GetSystemContext in
two places in libpod. I cleaned this up.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-29 08:27:33 -04:00
OpenShift Merge Robot 6ab27c6355
Merge pull request #2796 from mheon/fix_cni_multinetwork
Ensure that we make a netns for CNI non-default nets
2019-03-29 04:26:30 -07:00
Giuseppe Scrivano ca38ca49b8
utils: call GetRootlessRuntimeDir once
use a sync.Once to potentially avoid multiple system calls everytime
the function is called.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-29 12:01:13 +01:00
Giuseppe Scrivano 2fa9861d78
rootless: set sticky bit on rundir
it prevents the directory to be auto pruned, according to the XDG
specifications.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-29 12:01:12 +01:00
Giuseppe Scrivano d8caa2f2fa
oci: drop reference to runc
it can be any OCI runtime.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-29 11:10:34 +01:00
OpenShift Merge Robot fdf979a791
Merge pull request #2786 from giuseppe/change-rootless-env-names
rootless: change env prefix
2019-03-28 17:00:31 -07:00
OpenShift Merge Robot df5b6e29a6
Merge pull request #2784 from QiWang19/digest
fix bug remote-podman images --digests
2019-03-28 16:51:31 -07:00
Matthew Heon e25924f31c Fix lint
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-03-28 18:01:36 -04:00
Matthew Heon beb263554e Ensure that we make a netns for CNI non-default nets
We accidentally patched this out trying to enable ns:/path/to/ns

This should restore the ability to configure nondefault CNI
networks with Podman, by ensuring that they request creation of a
network namespace.

Completely remove the WithNetNS() call when we do use an explicit
namespace from a path. We use that call to indicate that a netns
is going to be created - there should not be any question about
whether it actually does.

Fixes #2795

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-03-28 17:39:56 -04:00
OpenShift Merge Robot 9085898ce2
Merge pull request #2773 from QiWang19/bug
fix bug `system df` add a space to the output
2019-03-28 09:21:48 -07:00
Giuseppe Scrivano ce0ca0d459
rootless: change env prefix
from _LIBPOD to _CONTAINERS.  The same change was done in buildah
unshare.

This is necessary for podman to detect we are running in a rootless
environment and work properly from a "buildah unshare" session.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-28 17:08:20 +01:00
OpenShift Merge Robot ef1b58e6f2
Merge pull request #2789 from vrothberg/vendor
vendor buildah, image, storage, cni
2019-03-28 07:19:34 -07:00
Valentin Rothberg a5443a532b vendor buildah, image, storage, cni
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-03-28 15:12:26 +01:00
OpenShift Merge Robot e7a2eecf5f
Merge pull request #2760 from mheon/misc_small_changes
Remove ulele/deepcopier in favor of JSON deep copy
2019-03-28 07:06:31 -07:00
Peter Hunt 0d0ad59641 Default to SELinux private label for play kube mounts
Before, there were SELinux denials when a volume was bind-mounted by podman play kube.
Partially fix this by setting the default private label for mounts created by play kube (with DirectoryOrCreate)
For volumes mounted as Directory, the user will have to set their own SELinux permissions on the mount point

also remove left over debugging print statement

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-03-28 09:54:31 -04:00
baude 3423c5a8c9 Add watch mode to podman ps
allows users to "watch" the output of podman ps on a set interval in
seconds. in watch mode, the screen is cleared between intervals as well.

podman -ps -w1 watches on 1 second intervals

Signed-off-by: baude <bbaude@redhat.com>
2019-03-28 08:34:27 -05:00
Luke Short 68ba4154e3 Add all container status states to the podman-ps manual page.
Signed-off-by: Luke Short <ekultails@gmail.com>
2019-03-28 09:17:18 -04:00
Qi Wang 2729695892 fix bug system df add blank space to the output
fix typo in Containers space usage: of podman system df -v, add a space for created time Change format string to const

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-28 09:13:40 -04:00
Qi Wang fd7a9c4a96 fix bug remote-podman images --digests
Add `digest` field to Image struct and update API.md
Show image digests when using --digests in podman-remote.

```
$ PODMAN_VARLINK_ADDRESS="tcp:127.0.0.1:1234" sudo bin/podman-remote images --digests
REPOSITORY                  TAG      DIGEST                                                                    IMAGE ID       CREATED       SIZE
docker.io/library/alpine    latest   sha256:d05ecd4520cab5d9e5d877595fb0532aadcd6c90f4bbc837bc11679f704c4c82   5cb3aa00f899   2 weeks ago   5.79 MB
docker.io/library/busybox   latest   sha256:4415a904b1aca178c2450fd54928ab362825e863c0ad5452fd020e92f7a6a47e   d8233ab899d4   5 weeks ago   1.42 MB
```

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-27 23:09:35 -04:00
OpenShift Merge Robot 850326cc19
Merge pull request #2777 from edsantiago/system_df_invalid_arg
system df: reject invalid arguments
2019-03-27 17:03:51 -07:00
Matthew Heon 179a66f1a0 Use spaces instead of tab for JSON marshal indent
The jsoniterator library believes that panic() is a reasonable
response to being told to indent JSON with a tab. So use spaces
instead.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-27 20:00:31 -04:00
Matthew Heon 589486e3e5 Fix gofmt
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-27 20:00:31 -04:00
Matthew Heon 5ed62991dc Remove ulele/deepcopier in favor of JSON deep copy
We have a very high performance JSON library that doesn't need to
perform code generation. Let's use it instead of our questionably
performant, reflection-dependent deep copy library.

Most changes because some functions can now return errors.

Also converts cmd/podman to use jsoniter, instead of pkg/json,
for increased performance.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-27 20:00:31 -04:00
OpenShift Merge Robot 340eeec1b6
Merge pull request #2747 from mheon/dns_none
Add --dns=none
2019-03-27 10:49:42 -07:00
OpenShift Merge Robot 1ff03ee9f5
Merge pull request #2779 from jcpunk/pod-static-publish
doc: add note that pod publish ports are static once defined
2019-03-27 10:36:43 -07:00
Pat Riehecky 1a9252e25c doc: add note that pod publish ports are static once defined
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2019-03-27 12:08:47 -05:00
OpenShift Merge Robot fbabe5538f
Merge pull request #2781 from edsantiago/bats
Sigh; disable pod-top test, it's unreliable (#2780)
2019-03-27 09:47:41 -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
OpenShift Merge Robot c600014643
Merge pull request #2762 from giuseppe/rootless-exec-old-containers-uidmap
rootless: fix regression when using exec on old containers
2019-03-27 08:37:37 -07:00