3789 Commits

Author SHA1 Message Date
f5b7bdac0c Update vendor of container/storage
Lots of fixes for issues found by podman.

overlay: propagate errors from mountProgram
utils: root in a userns uses global conf file
Fix handling of additional stores
Correctly check permissions on rootless directory
Fix possible integer overflow on 32bit builds
Evaluate device path for lvm
lockfile test: make concurrent RW test determinisitc
lockfile test: make concurrent read tests deterministic

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-24 17:03:16 -04:00
d75543fcd2 Merge pull request #3002 from vrothberg/fix-pulling
pull: special case all-tags semantics
2019-04-24 11:54:37 -07:00
730309cb42 Merge pull request #2994 from mheon/fix_podman_stop_all
Fix podman stop --all attempting to stop created ctrs
2019-04-24 11:33:38 -07:00
b90a5107e9 pull: special case all-tags semantics
Supporting the all-tags semantics added some non-trivial code to the
pull command which does not make use of `registries.conf` and introduced
some regressions such as not adhering to the configured search registries.

Speacial case the all-tags flags to let existing users of all-tags
continue working while others can work again.  This implies that the
all-tags pull does not adhere to configured search registries while the
default (non-all-tags) pull does.

Note that this is a purely symptomaic fix.  A final solution should
include Buildah and the c/image library to avoid redundant and
error-prone code across the projects.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1701922
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-04-24 19:33:12 +02:00
90873b465b Fix test compile
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-24 12:51:41 -04:00
c3c2ba079d Trim whitespace from ps -q before comparing
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-24 12:51:41 -04:00
597b2ebfea Enhance tests for stop to check results
None of the stop tests actually verified that containers were in
a stopped state after they finished. We shouldn't take a 0 exit
code to indicate that things worked - verify that ps shows no
running containers.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-24 12:51:41 -04:00
5405b4f279 Add extra CI tests for stopping all containers
We weren't testing cases where not all containers were running
when stop --all ran.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-24 12:51:41 -04:00
4f69c07996 Fix podman stop --all attempting to stop created ctrs
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-24 12:51:41 -04:00
b4cba6090d Merge pull request #3003 from cevich/temp_selinux_workaround
Cirrus: Temp. override container-selinux on F29
2019-04-24 09:50:12 -07:00
72007746aa Cirrus: Temp. override container-selinux on F29
Also, undo oooooold runc package hack

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-24 11:54:41 -04:00
d652c8656d Merge pull request #2919 from rhatdan/infra_command
Internal names do not match external names
2019-04-22 15:24:36 -07:00
a2487aec67 Merge pull request #2933 from haircommander/kube-clean
Clean up after play kube failure
2019-04-22 13:31:27 -07:00
9f92b21d69 Merge pull request #2970 from jwhonce/wip/remote_pod_prune
Refactor of 'podman prune' to better support remote
2019-04-19 05:42:24 -07:00
69962682e9 Refactor of 'podman prune' to better support remote
* Push iterations into the service not the client
* Add e2e tests
* Refactor to use new frameworks

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-04-18 15:13:56 -07:00
e4947e5fd6 Merge pull request #2948 from baude/remotepause
podman-remote pause|unpause
2019-04-18 14:17:41 -07:00
55e630e787 podman-remote pause|unpause
Add the ability to pause and unpause containers with the remote client.

Also turned on the pause tests!

Signed-off-by: baude <bbaude@redhat.com>
2019-04-18 13:42:27 -05:00
615a9e9f78 Internal names do not match external names
We refer to the pause_image and pause_container in the libpod.conf
description, but internally we had infra_image and infra_container.

This means it the user made changes to the conf, it would not effect the
actual tool using libpod.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-18 10:59:39 -04:00
4d45f5180f Merge pull request #2967 from giuseppe/fix-rootless-close
rootless: not close more FDs than needed
2019-04-18 06:50:25 -07:00
8c478f94f9 Add header to play kube output
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-04-18 09:18:53 -04:00
47c1017cf8 Clean up after play kube failure
Before, we would half create a pod in play kube and error out if we fail.
Rather, let's clean up after our failure so the user doesn't have to delete the pod themselves.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-04-18 09:18:53 -04:00
0dfb61d806 rootless: not close more FDs than needed
we were previously closing as many FDs as they were open when we first
started Podman in the range (3-MAX-FD).  This would cause issues if
there were empty intervals, as these FDs are later on used by the
Golang runtime.  Store exactly what FDs were first open in a fd_set,
so that we can close exactly the FDs that were open at startup.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-18 14:32:46 +02:00
5260d33f95 Merge pull request #2952 from rhatdan/change
Fix podman command --change CMD
2019-04-18 05:23:43 -07:00
8b027dee48 Merge pull request #2965 from baude/fixcopr
Fix COPR builds to start working again
2019-04-18 01:31:20 -07:00
7987a1dfee Fix COPR builds to start working again
We now need systemd in the root of the COPR build for podman.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-17 16:12:54 -05:00
6b3d4abb07 Fix podman command --change CMD
Currently in Docker if you commit with --change 'CMD a b c'
The command that gets added is

[/bin/sh -c "a b c"]

If you commit --change 'CMD ["a","b","c"]'

You get
[a b c]

This patch set makes podman match this behaviour.

Similar change required for Entrypoint.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-17 15:44:50 -04:00
bf5ffdafb4 Merge pull request #2917 from baude/remotestart
podman-remote start
2019-04-17 10:13:18 -07:00
3c0147e559 podman-remote start
enable the ability to start containers from the remote-client.  also,
enable start integration tests for remote testing.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-17 11:08:54 -05:00
799d4667c1 Merge pull request #2936 from haircommander/pod-prune
Add podman pod prune
2019-04-17 08:55:59 -07:00
d0c5e216ca Merge pull request #2931 from TomSweeneyRedHat/dev/tsweeney/venbuildah
Vendor in latest Buildah
2019-04-17 06:50:48 -07:00
024ae24f14 Vendor in latest Buildah
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-04-16 15:20:17 -04:00
a87cf6fef8 Merge pull request #2949 from baude/remotecontainercommands
podman-remote container commands
2019-04-16 09:38:35 -07:00
4319552cf8 Added remote pod prune
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-04-16 11:23:18 -04:00
0b34b4a59c Add podman pod prune
podman system prune would leave pods be, and not prune them if they were stopped.
Fix this by adding a `podman pod prune` command that prunes stopped pods similarly to containers.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-04-16 11:23:18 -04:00
7cea949f04 podman-remote container commands
Several container commands were ported to the remote client but had not
been updated on the container submenu yet.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-16 10:22:50 -05:00
a2e9626d92 Merge pull request #2934 from haircommander/kube-file
Add File mounts to play kube
2019-04-16 08:05:44 -07:00
713839cf83 Merge pull request #2946 from baude/segs
Fix segfaults attribute to missing options
2019-04-16 06:25:41 -07:00
6fb0a706af Fix segfaults attribute to missing options
In cases where the remote client culls options to a command, we need to
be sure that the lookup for that flag does not result in a nil pointer.
To do so, we add a Remote attribute to the podman struct and then cli
helper funcs are now aware they are remote.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-15 12:21:51 -05:00
c1e2b583c8 Merge pull request #2944 from mheon/fix_renumber
Call the runtime with WithRenumber() when asked by 'system renumber' command
2019-04-15 09:39:17 -07:00
936537cfe7 Call the runtime with WithRenumber() when asked
We must have lost this at some point, rendering system renumber
useless.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-15 10:36:19 -04:00
6f3f0267f2 Merge pull request #2870 from rhatdan/change
Validate ENV/LABEL Change options in varlink
2019-04-15 07:21:37 -07:00
e5227919af Merge pull request #2939 from giuseppe/rootless-fixes
rootless: cleanups
2019-04-15 07:08:28 -07:00
2f804ea9a2 Add File mounts to play kube
Both File and FileOrCreate options are supported.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-04-15 09:27:36 -04:00
6e1dab76e2 Merge pull request #2921 from rhatdan/man
Remove old crio reference from man pages
2019-04-15 06:22:35 -07:00
187de9f98e cmd, pkg: drop commented code
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-15 13:00:54 +02:00
a09b6bf77d pod: drop dead code
we always create a user namespace now, so no need to check if we are
running as non root.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-15 12:59:46 +02:00
ffd8999421 rootless, mount: not create namespace
we need to check if we are able to mount the container as part of the
mount command itself.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-15 12:57:19 +02:00
d10f68ac95 Merge pull request #2932 from haircommander/kube-env
Incorporate image and default environment variables in play kube
2019-04-15 00:43:16 -07:00
e61838bc3b Incorporate image and default environment variables in play kube
Also put Environment variable parsing from image data into a helper function

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-04-14 16:27:52 -04:00
167ce59416 Merge pull request #2928 from giuseppe/fix-umount
oci: fix umount of /sys/kernel
2019-04-14 06:29:42 -07:00