1756 Commits

Author SHA1 Message Date
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
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
f0a3a4329e Add notes to check version on problem
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #1462
Approved by: rhatdan
2018-09-13 18:31:21 +00:00
8e65b294c6 Do not set rlimits if we are rootless
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1437
Approved by: rhatdan
2018-09-13 17:56:58 +00:00
9126b45a3f Up default Podman rlimits to avoid max open files
Every port we open consumes an open FD. This can easily consume
all available FDs for the podman process. Set rlimits to resolve
this.

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

Closes: #1437
Approved by: rhatdan
2018-09-13 17:56:58 +00:00
70b160ae03 Search registries with an empty query
Adds functionality to search registries implementing the v2
endpoint with an empty query, that is the results will be
all the available images on the registries.
If this is tried with a v1 registry an error will occur.
To search a whole registry, there needs to be a trailing slash
at the end, i.e `podman search registry.fedoraproject.org/`.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #1444
Approved by: rhatdan
2018-09-13 16:20:40 +00:00
9bc3c9d11c Vendor in latest containers/image
Picks up changes made to authentication for registry search.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #1444
Approved by: rhatdan
2018-09-13 16:20:40 +00:00
ecec1a5430 Remove duplicate code between create.go and run.go
Create two new createInit for checking if the cotnainer is initialized
correctly.
createContainer which creates the actual container and containerConfig

Also added libpodruntime.GetContainerRuntime to put common runtime code
into separate function.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-13 12:16:14 -04:00
9ec82caa31 Add --interval flag to podman wait
Waiting uses a lot of CPU, so drop back to checking once/second
and allow user to pass in the interval.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-13 10:11:00 -04:00
61eda671ec Add podman rm --volumes flag
While this is not implemented yet, it is needed for working with existing
docker scripts.

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

Closes: #1460
Approved by: mheon
2018-09-13 13:27:09 +00:00
facab2aec5 Vendor in latest containers/storage to eliminage deadlock
When running lots of podman commands simultaneously we were able to get
into a deadlock situation.  The updated containers/storage should fix this issue.

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

Closes: #1454
Approved by: mheon
2018-09-12 23:27:09 +00:00
08936c3241 do not build with devicemapper
as of now, we do not want to build with device mapper because it cannot
handle parallel requests which would be common-place in podman.

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

Closes: #1445
Approved by: mheon
2018-09-12 22:21:50 +00:00
60e8e4fb2d run different cgroup tests depending on conditions
when running podman's integration tests, we need to be able to understand
our environment because the podman command will differ as will the results.

there is no 100% way to know if we are in a container, but using a combination
of container= and checking /proc seemed reasonable for our test suite.  non of this
code is run in podman proper.

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

Closes: #1441
Approved by: mheon
2018-09-12 20:20:50 +00:00