2240 Commits

Author SHA1 Message Date
6246942d37 Increase security and performance when looking up groups
We implement the securejoin method to make sure the paths to /etc/passwd and
/etc/group are not symlinks to something naughty or outside the container
image. And then instead of actually chrooting, we use the runc functions to
get information about a user.  The net result is increased security and
a a performance gain from 41ms to 100us.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-25 06:42:43 -05:00
e2aef6341d run prepare in parallel
run prepare() -- which consists of creating a network namespace and
mounting the container image is now run in parallel.   This saves 25-40ms.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-25 06:34:23 -05:00
57f778aed9 Merge pull request #1713 from baude/runcfail
downgrade runc due a rootless bug
2018-10-24 17:25:11 -07:00
803efd4d38 downgrade runc due a rootless bug
Signed-off-by: baude <bbaude@redhat.com>
2018-10-24 14:25:31 -05:00
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
cde41c0b84 Merge pull request #1646 from QiWang19/addenvbud
Support auth file environment variable in podman build
2018-10-23 17:04:17 -07:00
bf80717904 Merge pull request #1708 from rhatdan/docker
Eat our own dogfood
2018-10-23 16:41:43 -07:00
a9929b40dc Merge pull request #1684 from QiWang19/deviceman
Explain the device format in man pages
2018-10-23 15:18:14 -07:00
37e9e5667e Merge pull request #1706 from giuseppe/fix-cidfile-rootless
create: fix writing cidfile when using rootless
2018-10-23 14:45:33 -07:00
28279ce6bd Merge pull request #1666 from giuseppe/vendor-storage-overlay
vendor: update container/storage
2018-10-23 14:45:28 -07:00
9250747092 Eat our own dogfood
Switch all tests to use podman installed on the system, or Docker if podman
does not exist.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-10-23 17:36:37 -04:00
28d8d72a82 Merge pull request #1707 from afbjorklund/local_path
Add support for /usr/local installation
2018-10-23 14:29:43 -07:00
0a0dbc4692 vendor: update containers/storage
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-23 23:09:35 +02:00
21458369a1 Add support for /usr/local installation
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2018-10-23 22:25:59 +02:00
dfc689efc9 create: fix writing cidfile when using rootless
prevent opening the same file twice, since we re-exec podman in
rootless mode.  While at it, also solve a possible race between the
check for the file and writing to it.  Another process could have
created the file in the meanwhile and we would just end up overwriting
it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-23 22:13:17 +02:00
c285bd664e Explain the device format in man pages
Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-10-23 15:14:44 -04:00
10bab99ea0 Merge pull request #1705 from baude/twostepjson
read conmon output and convert to json in two steps
2018-10-23 11:56:02 -07:00
318e33ce2c read conmon output and convert to json in two steps
when reading the output from conmon using the JSON methods, it appears that
JSON marshalling is higher in pprof than it really is because the pipe is
"waiting" for a response. this gives us a clearer look at the real CPU/time
consumers.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-23 13:21:33 -05:00
d043ac4de5 Merge pull request #1677 from cevich/cirrus_latest_buildah
Cirrus: Use images w/ buildah fix
2018-10-23 09:56:12 -07:00
2c7ad7af50 Cirrus: Use images w/ buildah fix
Ref: https://github.com/containers/buildah/pull/1109

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-23 12:25:32 -04:00
8ff9742480 Merge pull request #1687 from rhatdan/vendor
Move selinux label reservations to containers storage.
2018-10-23 09:22:12 -07:00
c019830a75 Merge pull request #1662 from adrianreber/all-and-latest
Add --all and --latest to checkpoint/restore
2018-10-23 09:22:03 -07:00
41a8bbdbe0 Merge pull request #1649 from jwhonce/issue/1641
Downgrade code to support python3.4
2018-10-23 09:05:29 -07:00
41a4827f84 Merge pull request #1638 from baude/fastps
Make podman ps fast
2018-10-23 09:05:20 -07:00
02a76a82b6 Merge pull request #1686 from mheon/rootless_firewall
Use more reliable check for rootless for firewall init
2018-10-23 08:17:47 -07:00
f09f9be43c Merge pull request #1664 from adrianreber/port-l
Fix podman port -l
2018-10-23 08:05:20 -07:00
e8d69030b6 Add --all and --latest to checkpoint/restore
This add the convenience options --all and --latest to the subcommands
checkpoint and restore.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-23 17:01:30 +02:00
c10ac01395 Use the newly added getAllOrLatestContainers() function
This removes duplicate code paths which has been previously factored out
as getAllOrLatestContainers().

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-23 17:01:30 +02:00
fea37b387c Use the new checkAllAndLatest() function
Instead of duplicating the same code in multiple commands this uses the
newly added function checkAllAndLatest() instead.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-23 17:01:30 +02:00
215cf7b898 Also factor out getAllOrLatestContainers() function
Just as the checkAllAndLatest() function the new code in
getAllOrLatestContainers() is used in some commands and duplicated. This
factors out this code to be used in other places without duplicating it.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-23 17:01:30 +02:00
9d9493e41a Add checkAllAndLatest() function
The check about the --all and --latest option is used and repeated and
some commands. Factor it out and put it into common.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-23 17:01:30 +02:00
a7ea7e9d5c Downgrade code to support python3.4
* Added tox configuration to test python 3.4, 3.5 and 3.6.
  Tox testing not enabled on every PR
* Updated MANIFEST.ini to support tox
* Correct comments

Fixes #1641

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-10-23 07:58:48 -07:00
a95d71f113 Allow containers/storage to handle on SELinux labeling
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-10-23 10:57:23 -04:00
2e6bc3c7af Merge pull request #1627 from adrianreber/criu
Add CRIU version check for checkpoint and restore
2018-10-23 07:53:11 -07:00
79befd5158 Merge pull request #1648 from cevich/cirrus_podbot
Add simple IRC messenger
2018-10-23 07:41:43 -07:00
fba494de8e Use more reliable check for rootless for firewall init
We probably won't be able to initialize a firewall plugin when we
are not running as root, so we shouldn't even try. Replace the
less-effect EUID check with the rootless package's better check
to make sure we don't accidentally set up the firewall in these
cases.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-23 10:33:38 -04:00
57b0b89d0c Vendor in latest containers/storage opencontainers/selinux
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-10-23 10:32:32 -04:00
ab2b3d64ce Merge pull request #1697 from baude/statserr
correct stats err with non-running containers
2018-10-23 07:27:19 -07:00
9a6a64f78c Merge pull request #1665 from vrothberg/ignore-env-vars
fix environment variable parsing
2018-10-23 06:39:21 -07:00
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
cc27cd35a6 Support auth file environment variable in podman build
Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-10-23 09:08:58 -04:00
95c93577cd Merge pull request #1688 from baude/isf29ready
re-enable f29 testing
2018-10-23 05:56:40 -07:00
ad88fcfc22 Merge pull request #1660 from cevich/cirrus_criu
Cirrus: Install CRIU in test images
2018-10-23 05:56:29 -07:00
3a45fd1115 Merge pull request #1700 from baude/restoreArtifactsa
Use restoreArtifacts to save time in integration tests
2018-10-23 05:42:42 -07:00
a65fdf581b Merge pull request #1639 from baude/pararm
Make rm faster
2018-10-23 05:42:32 -07:00
fca5ad095e Merge pull request #1681 from giuseppe/cleanup-runtime-status
oci: cleanup process status
2018-10-23 05:17:21 -07:00
125202923f fix environment variable parsing
Fix the parsing of environment variables to catch invalid ones, such as
`-e = ` or `-e =A`, early in the stack to return meaningful error
messages.  Also, instead of erroring out, set unspecified env variables
as empty (e.g., `-e FOO`) to remain compatible with Docker.

Fixes: #1663
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-10-23 12:57:14 +02:00
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
8f6fb79ba8 Use the CRIU version check in checkpoint/restore
The newly introduced CRIU version check is now used to make sure
checkpointing and restoring is only used if the CRIU version is new
enough.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-23 12:52:03 +02:00
f75065842f Add helper function to read out CRIU version
This adds a simple CRIU version check using the vendored-in
CRIU go bindings.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-23 12:52:03 +02:00