2067 Commits

Author SHA1 Message Date
af12e6534e report when rootless
when running as rootless, report as such.

resolves: #1509
Signed-off-by: baude <bbaude@redhat.com>

Closes: #1514
Approved by: rhatdan
2018-09-20 09:18:27 +00:00
cad16bd671 add the gopath environment variable to the openshift dockerfile
Signed-off-by: baude <bbaude@redhat.com>

Closes: #1513
Approved by: baude
2018-09-19 21:23:58 +00:00
cf13fa1866 Vendor in latest opencontainers/runtime-tools
This will cause /proc inside of the container to match the mount options
of the host.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1511
Approved by: baude
2018-09-19 20:53:32 +00:00
129c1408f7 Merge pull request #1512 from baude/addvarlinktoopenshiftimage
Add python-varlink to the Fedora openshift image
2018-09-19 14:47:09 -05:00
983029bf1b Add python-varlink to the Fedora openshift image
Signed-off-by: baude <bbaude@redhat.com>
2018-09-19 14:32:39 -05:00
de199252e0 Add Dockerfile for openshift lint, gofmt, and validate testing
Signed-off-by: baude <bbaude@redhat.com>

Closes: #1504
Approved by: mheon
2018-09-19 15:10:29 +00:00
03f53efb51 Merge pull request #1503 from rhatdan/buildah
Vendor in latest containers/buildah
2018-09-19 09:00:35 -04:00
92b28a88d8 Vendor in latest containers/buildah
Switch from projectatomic/buildah to containers/buildah

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-18 17:20:30 -04:00
c3a0874222 Don't crash if an image has no names
When image is not tagged, we should just set the imageName to the
image.ID.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1501
Approved by: mheon
2018-09-18 13:29:20 +00:00
1fb8d7f248 Replace all usages of "install -D" with "install -d"
Fixes #1481

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1496
Approved by: rhatdan
2018-09-18 12:36:15 +00:00
0b2cfa7fcf Increase pidWaitTimeout to 1000ms
When managing the containers with systemd, it takes a bit more than
250ms to have podman creating the pidfile.
Increasing the value to 1 second will avoid timeout issues when running
a lot of containers managed by systemd.

This patch was tested in a VM with 56 services (OpenStack) deployed by
TripleO and managed by systemd.

Fixes #1495

Signed-off-by: Emilien Macchi <emilien@redhat.com>

Closes: #1497
Approved by: rhatdan
2018-09-18 12:24:39 +00:00
e4770b8289 Small updates to OCI spec generation
Firstly, when adding the privileged catch-all resource device,
first remove the spec's default catch-all resource device.

Second, remove our default rootfs propogation config - Docker
does not set this by default, so I don't think we should either.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1491
Approved by: TomSweeneyRedHat
2018-09-17 22:13:42 +00:00
28a2bf827a Add new tests for ipc namespace sharing
We seem to be having a few flakes on namespace sharing.
Adding this test to make sure sharing with the host is working correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1485
Approved by: mheon
2018-09-17 16:55:11 +00:00
800eb86338 Hooks supports two directories, process default and override
ALso cleanup files section or podman man page

Add description of policy.json
Sort alphabetically.
Add more info on  oci hooks

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1487
Approved by: umohnani8
2018-09-17 16:28:28 +00:00
8b66eae7d8 Merge pull request #1490 from mheon/bump-0.9.2.1
Bump to 0.9.2.1
2018-09-17 12:04:18 -04:00
e2f44f1045 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-17 12:03:01 -04:00
baabd44c55 Bump to v0.9.3-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-17 12:03:00 -04:00
19cb754556 Bump to v0.9.2.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.9.2.1
2018-09-17 12:02:57 -04:00
c3180c2e51 Merge pull request #1489 from mheon/release_notes_0.9.2.1
Update release notes for 0.9.2.1
2018-09-17 12:01:54 -04:00
6bc2469e60 Update release notes for 0.9.2.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-17 12:01:01 -04:00
5e4f7e915e Vendor in latest projectatomic/buildah
Buildah

Fixes to COPY and ADD to properly follow symbolic links is SRC is a symbolic link
Print out a digest message on successful push.
We should not drop the Bounding set when running as a non priv user in podman build

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1483
Approved by: rhatdan
2018-09-15 10:58:55 +00:00
70189f0223 Vndr latest containers/image
Containers image has a fix docker tarfile: use the cached digest if existing

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1482
Approved by: rhatdan
2018-09-15 08:55:21 +00:00
81df604bdb Merge pull request #1480 from mheon/bump-0.9.2
Bump to 0.9.2
2018-09-14 18:14:51 -04:00
9cae1696f6 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-14 18:13:33 -04:00
fc86a9261a Bump to v0.9.3-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-14 18:13:33 -04:00
37a2afe872 Bump to v0.9.2
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.9.2
2018-09-14 18:13:27 -04:00
ab5dd390cc Merge pull request #1479 from mheon/release_notes_0.9.2
Update release notes for 0.9.2
2018-09-14 18:12:46 -04:00
a139f98aea Update release notes for 0.9.2
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-14 18:11:42 -04:00
b471904175 Merge pull request #1472 from giuseppe/rootless-fix-entrypoint
rootless: do not raise an error if the entrypoint is specified
2018-09-14 17:53:34 -04:00
5622de9c61 Merge pull request #1467 from rhatdan/dev
Don't mount /dev/* if user mounted /dev
2018-09-14 17:26:38 -04:00
8b21e2ecf5 Merge pull request #1461 from rhatdan/run
Remove duplicate code between create.go and run.go
2018-09-14 16:56:34 -04:00
77985bc25b Merge pull request #1464 from mheon/optionally_disable_port_reservation
Add a way to disable port reservation
2018-09-14 16:56:14 -04:00
a7b6a0fd16 Merge pull request #1474 from baude/varlinkinforegistries
add registry information to varlink info
2018-09-14 16:53:53 -04:00
0405555345 Merge pull request #1434 from rhatdan/wait
Add --interval flag to podman wait
2018-09-14 16:52:13 -04:00
8541ed41e4 Merge pull request #1478 from baude/fedoraminimal
change search test to look for fedora and not fedora-minimal
2018-09-14 16:05:28 -04:00
0c0de6dcc5 change search test to look for fedora and not fedora-minimal
Signed-off-by: baude <bbaude@redhat.com>
2018-09-14 13:49:58 -05:00
31294799c4 Don't mount /dev/* if user mounted /dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-14 13:28:19 -04:00
6f47eb0b28 add registry information to varlink info
when using the varlink api, we should pass on the registries information
as is present in the cli info command.

Signed-off-by: baude <bbaude@redhat.com>
2018-09-14 10:13:07 -05:00
2188d8f7ad libpod/image/pull: Return image-pulling errors from doPullImage
We were already writing these to our debug logs.  But collecting them
and including them in the error message will make it easier for
callers who don't have debugging enabled to figure out what's going
wrong.

Using multierror gives us both pretty formatting (when we print this
for the user) and programmatic access (for any callers that need to
inspect the constituent errors).  With this commit and a config like:

  $ cat /etc/containers/registries.conf
  [registries.search]
  registries = ['registry.access.redhat.com', 'quay.io', 'docker.io']

pulling an unqualified missing image looks like:

  $ podman pull does-not/exist
  Trying to pull registry.access.redhat.com/does-not/exist:latest...Failed
  Trying to pull quay.io/does-not/exist:latest...Failed
  Trying to pull docker.io/does-not/exist:latest...Failed
  error pulling image "does-not/exist": unable to pull does-not/exist: 3 errors occurred:

  * Error determining manifest MIME type for docker://registry.access.redhat.com/does-not/exist:latest: Error reading manifest latest in registry.access.redhat.com/does-not/exist: unknown: Not Found
  * Error determining manifest MIME type for docker://quay.io/does-not/exist:latest: Error reading manifest latest in quay.io/does-not/exist: unauthorized: access to the requested resource is not authorized
  * Error determining manifest MIME type for docker://does-not/exist:latest: Error reading manifest latest in docker.io/does-not/exist: errors:
  denied: requested access to the resource is denied
  unauthorized: authentication required

A qualified image looks like:

  $ podman pull quay.io/does-not/exist
  Trying to pull quay.io/does-not/exist...Failed
  error pulling image "quay.io/does-not/exist": unable to pull quay.io/does-not/exist: unable to pull image: Error determining manifest MIME type for docker://quay.io/does-not/exist:latest: Error reading manifest latest in quay.io/does-not/exist: unauthorized: access to the requested resource is not authorized

If one of the searched repositories was offline, you'd get a more
useful routing error for that specific registry.  For example:

  $ cat /etc/hosts
  127.0.0.1   quay.io
  $ podman pull does-not/exist
  Trying to pull registry.access.redhat.com/does-not/exist:latest...Failed
  Trying to pull quay.io/does-not/exist:latest...Failed
  Trying to pull docker.io/does-not/exist:latest...Failed
  error pulling image "does-not/exist": unable to pull does-not/exist: 3 errors occurred:

  * Error determining manifest MIME type for docker://registry.access.redhat.com/does-not/exist:latest: Error reading manifest latest in registry.access.redhat.com/does-not/exist: unknown: Not Found
  * Error determining manifest MIME type for docker://quay.io/does-not/exist:latest: pinging docker registry returned: Get https://quay.io/v2/: dial tcp 127.0.0.1:443: connect: connection refused
  * Error determining manifest MIME type for docker://does-not/exist:latest: Error reading manifest latest in docker.io/does-not/exist: errors:
  denied: requested access to the resource is denied
  unauthorized: authentication required

This is our first direct dependency on multierror, but we've been
vendoring it for a while now because opencontainers/runtime-tools uses
it for config validation.

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #1456
Approved by: rhatdan
2018-09-14 15:01:43 +00:00
b873fe760a Merge pull request #1473 from mheon/update_gitvalidation_epoch
Update gitvalidation epoch to avoid a bad commit
2018-09-14 11:01:17 -04:00
2d6bfe5f50 Update gitvalidation epoch to avoid a bad commit
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-14 10:59:48 -04:00
0cb0849c72 Update README to reflect current development efforts
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-14 10:59:25 -04:00
316c31a840 Merge pull request #1468 from TomSweeneyRedHat/dev/tsweeney/readmerel
Add Buildah Podman relationship to README.md
2018-09-14 10:27:34 -04:00
1c26d81394 rootless: do not raise an error if the entrypoint is specified
do not error out when the storage is not initialized and the
entrypoint command is not available for the specified image.  Check it
when we re-exec in an user namespace and can access the storage.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-09-14 13:22:55 +02:00
356765aa95 contrib/python/*/Makefile: Fallback to unversioned 'python'
And pull these from the PATH by default.  This way systems like CentOS
that don't have a python3 can still execute 'make clean', which
doesn't care about the Python major version.

The setup.py shebang, mode change, and ./ prefixing helps address
cases where PYTHON is empty.  This could be the result of improper
user configuration:

  $ make PYTHON='' clean

It could also be the state on systems with no Python installed, in
which case you'll see:

  $ make PYTHON='' clean
  ./setup.py clean --all
  /usr/bin/env: 'python': No such file or directory
  make: *** [Makefile:13: clean] Error 127

I've also shifted the Python invocations to the end of the clean
recipies so that as much as possible gets cleaned up even on systems
without Python installed.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-09-13 22:15:22 -07:00
af6d86dcdf Makefile: Drop PYTHON
This line landed in 8493dba2 (Initial varlink implementation,
2018-03-26, #627), but this Makefile has never consumed that variable.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-09-13 22:15:22 -07:00
da42c60307 Makefile: Call contrib/python's clean regardless of HAS_PYTHON3
The only Python dependency in contrib/python's clean is:

  $(PYTHON) setup.py clean --all

and our setup.pys work on both major Python versions:

  $ make -C contrib/python/podman PYTHON=python2 clean
  make: Entering directory `/.../libpod/contrib/python/podman'
  python2 setup.py clean --all
  /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
    warnings.warn(msg)
  running clean
  'build/lib' does not exist -- can't clean it
  'build/bdist.linux-x86_64' does not exist -- can't clean it
  'build/scripts-2.7' does not exist -- can't clean it
  rm -rf podman.egg-info dist
  find . -depth -name __pycache__ -exec rm -rf {} \;
  find . -depth -name \*.pyc -exec rm -f {} \;
  make: Leaving directory `/.../libpod/contrib/python/podman'
  $ echo $?
  0
  $ make -C contrib/python/pypodman PYTHON=python2 clean
  make: Entering directory `/.../libpod/contrib/python/pypodman'
  python2 setup.py clean --all
  /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
    warnings.warn(msg)
  running clean
  removing 'build/lib' (and everything under it)
  removing 'build/bdist.linux-x86_64' (and everything under it)
  'build/scripts-2.7' does not exist -- can't clean it
  removing 'build'
  rm -rf pypodman.egg-info dist
  find . -depth -name __pycache__ -exec rm -rf {} \;
  find . -depth -name \*.pyc -exec rm -f {} \;
  make: Leaving directory `/.../libpod/contrib/python/pypodman'
  $ echo $?
  0

This rolls back part of 390bd16d (tidy up the copr spec, 2018-05-20, #813).

I've also shifted the submake cleans to the end of the main clean
recipe.  That way, if one of the submake cleans dies (e.g. because the
system lacks Python entirely), the temp-file removal will still
happen.  The way I have it setup now, the podman clean dying will keep
any of the pypodman clean from happening.  You could probably work
around that with something like:

  $(MAKE) -C contrib/python/podman clean & \
    $(MAKE) -C contrib/python/pypodman clean & \
    wait

but that seems too fancy for such a corner case.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-09-13 22:10:58 -07:00
4310e5ccc2 Add Buildah Podman relationship to README.md
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-09-13 19:09:56 -04:00
e2137cd009 Swap default mount propagation from private to rprivate
This matches Docker behavior more closely and should resolve an
issue we were seeing with /sys mounts

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1465
Approved by: rhatdan
2018-09-13 21:35:44 +00:00
95a374100b Add a way to disable port reservation
We've increased the default rlimits to allow Podman to hold many
ports open without hitting limits and crashing, but this doesn't
solve the amount of memory that holding open potentially
thousands of ports will use. Offer a switch to optionally disable
port reservation for performance- and memory-constrained use
cases.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-13 14:42:47 -04:00