Commit Graph

6355 Commits

Author SHA1 Message Date
OpenShift Merge Robot 1284260b66
Merge pull request #4539 from containers/dependabot/go_modules/gopkg.in/yaml.v2-2.2.7
build(deps): bump gopkg.in/yaml.v2 from 2.2.5 to 2.2.7
2019-11-22 22:18:37 +01:00
OpenShift Merge Robot c2dfef5444
Merge pull request #4554 from vrothberg/prune-me-tender-prune-me-sweet
e2e/prune: run two top containers
2019-11-22 21:56:20 +01:00
OpenShift Merge Robot ef240f4cd0
Merge pull request #4512 from kunalkushwaha/prune-filter
image prune command fixed as per docker image prune.
2019-11-22 21:56:12 +01:00
OpenShift Merge Robot 35605c02fd
Merge pull request #4528 from haircommander/kube-seccomp
Handle seccomp annotations in play kube
2019-11-22 21:09:05 +01:00
Valentin Rothberg d76242e5b4 e2e/prune: run two top containers
In hope to make the prune tests more robust, run two top containers and
stop one explicitly to reduce the risk of a race condition.

Fixes: #4452
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-22 16:34:01 +01:00
OpenShift Merge Robot e4b805441b
Merge pull request #4538 from containers/dependabot/go_modules/github.com/containers/storage-1.14.0
build(deps): bump github.com/containers/storage from 1.13.5 to 1.14.0
2019-11-22 16:21:19 +01:00
OpenShift Merge Robot 22e7d7d86f
Merge pull request #4525 from rst0git/uns-restore-fix
container-restore: Fix restore with user namespace
2019-11-22 16:07:26 +01:00
dependabot-preview[bot] 866391bb57 build(deps): bump github.com/containers/storage from 1.13.5 to 1.14.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.13.5 to 1.14.0.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.13.5...v1.14.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-22 15:03:53 +01:00
dependabot-preview[bot] 7377528764 build(deps): bump gopkg.in/yaml.v2 from 2.2.5 to 2.2.7
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.5 to 2.2.7.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.5...v2.2.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-22 15:02:32 +01:00
dependabot-preview[bot] 885df0cb1e build(deps): bump github.com/pkg/profile from 1.3.0 to 1.4.0
Bumps [github.com/pkg/profile](https://github.com/pkg/profile) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/pkg/profile/releases)
- [Commits](https://github.com/pkg/profile/compare/v1.3.0...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-22 15:00:59 +01:00
Kunal Kushwaha c7d911e776 document updated for filter and until options
examples of image prune with filter and
until options added

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2019-11-22 17:42:48 +09:00
Kunal Kushwaha 5082496cc0 filter added to image pruge command.
filter option accepts two filters.
- label
- until
label supports "label=value" or "label=key=value" format
until supports all golang compatible time/duration formats.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2019-11-22 17:36:27 +09:00
OpenShift Merge Robot 63924775ba
Merge pull request #4541 from giuseppe/use-file-backend-no-systemd
config: use EventsLogger=file without systemd
2019-11-21 14:57:03 +01:00
Giuseppe Scrivano 0352bbc6e9
config: use EventsLogger=file without systemd
if systemd is not available, use the file events logger backend.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-21 12:02:04 +01:00
OpenShift Merge Robot c673ff8cb6
Merge pull request #4464 from TomSweeneyRedHat/dev/tsweeney/buildtest
Add new test suite for build
2019-11-19 23:15:57 +01:00
Matthew Heon 6c405b5fbc Error on netns not exist only when ctr is running
If the container is running and we need to get its netns and
can't, that is a serious bug deserving of errors.

If it's not running, that's not really a big deal. Log an error
and continue.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-11-19 15:38:03 -05:00
Matthew Heon 25cc43c376 Add ContainerStateRemoving
When Libpod removes a container, there is the possibility that
removal will not fully succeed. The most notable problems are
storage issues, where the container cannot be removed from
c/storage.

When this occurs, we were faced with a choice. We can keep the
container in the state, appearing in `podman ps` and available for
other API operations, but likely unable to do any of them as it's
been partially removed. Or we can remove it very early and clean
up after it's already gone. We have, until now, used the second
approach.

The problem that arises is intermittent problems removing
storage. We end up removing a container, failing to remove its
storage, and ending up with a container permanently stuck in
c/storage that we can't remove with the normal Podman CLI, can't
use the name of, and generally can't interact with. A notable
cause is when Podman is hit by a SIGKILL midway through removal,
which can consistently cause `podman rm` to fail to remove
storage.

We now add a new state for containers that are in the process of
being removed, ContainerStateRemoving. We set this at the
beginning of the removal process. It notifies Podman that the
container cannot be used anymore, but preserves it in the DB
until it is fully removed. This will allow Remove to be run on
these containers again, which should successfully remove storage
if it fails.

Fixes #3906

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-11-19 15:38:03 -05:00
OpenShift Merge Robot f3f219a67c
Merge pull request #4523 from vrothberg/systemd-improvements
podman rm/stop --cidfile
2019-11-19 13:13:51 +01:00
Peter Hunt 8d585ccfa8 play kube: handle seccomp labels
Add handling of seccomp annotations to play kube at both container and pod levels.
also add a test

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-11-18 10:11:35 -05:00
OpenShift Merge Robot 741b90c2b9
Merge pull request #4502 from vrothberg/fix-3359
history: rewrite mappings
2019-11-18 15:10:09 +01:00
Valentin Rothberg 061bf77588 podman rm/stop --cidfile
Add a --cidfile flag to podman rm/stop to pass a container ID via a
file.  Podman run already provides the functionaly to store the ID
in a specified file which we now complete with rm/stop.  This allows
for a better life-cycle management in systemd services.  Note that
--cdifile can be specified multiple times to rm/stop.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-18 14:44:08 +01:00
OpenShift Merge Robot db32ed1ae8
Merge pull request #4521 from haircommander/winsz-fix
Also delete winsz fifo
2019-11-17 17:05:07 +01:00
Radostin Stoyanov 368d2ecfb6 container-restore: Fix restore with user namespace
When restoring a container with user namespace, the user namespace is
created by the OCI runtime, and the network namespace is created after
the user namespace to ensure correct ownership.

In this case PostConfigureNetNS will be set and the value of
c.state.NetNS would be nil. Hence, the following error occurs:

    $ sudo podman run --name cr \
	   --uidmap 0:1000:500 \
	   -d docker.io/library/alpine \
	   /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'

    $ sudo podman container checkpoint cr
    $ sudo podman container restore cr
    ...
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x13a5e3c]

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2019-11-17 00:34:02 +00:00
TomSweeneyRedHat f2f45ccb57 Add new test suite for build
Most build testing should be done in Buildah's test
suites, but we should have a minimal amount of tests,
especially testing the parts that are different like
layers and squash.  Also the CLI argument handling
of things like the context directory that we've had
issues reported.

This first chunk does a basic test and then checks for
context directory being a file and squash iterations.

More to be added as time goes by.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-11-16 19:19:49 -05:00
OpenShift Merge Robot c6f2383213
Merge pull request #4505 from vrothberg/arch
container create: os/arch check
2019-11-16 17:36:12 +01:00
OpenShift Merge Robot 51c08f3be6
Merge pull request #4368 from haircommander/pod-annotations
Add pod annotations to container
2019-11-15 19:41:39 +01:00
Peter Hunt fa415f07a1 Also delete winsz fifo
In conmon 2.0.3, we add another fifo to handle window resizing. This needs to be cleaned up for commands like restore, where the same path is used.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-11-15 12:44:15 -05:00
OpenShift Merge Robot d7ed9fa188
Merge pull request #4518 from baude/alpinetopause
use pause image for check all
2019-11-14 22:40:18 +01:00
baude 294cef4901 use pause image for check all
the pull all tags test can frequently timeout when trying to pull all
alpine tags.  using the pause image, which is smaller, should provide
some relief.

Signed-off-by: baude <bbaude@redhat.com>
2019-11-14 12:58:16 -06:00
Kunal Kushwaha c200583f31 timestamp related functions added
timetype package include functions for calculating
time input in string as one of golang duration format and
calculate as unix timestamp

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2019-11-14 17:16:22 +09:00
OpenShift Merge Robot 225f22b9d5
Merge pull request #4506 from TomSweeneyRedHat/dev/tsweeney/bump_buildah1.11.5
Bump to Buildah v1.11.5
2019-11-13 20:19:54 +01:00
OpenShift Merge Robot 15220af08c
Merge pull request #4497 from onlyjob/master
codespell: spelling corrections
2019-11-13 18:01:52 +01:00
OpenShift Merge Robot 7a693a1946
Merge pull request #4503 from cevich/fix_branch_images
Cirrus: Use branch-specific container tags
2019-11-13 17:47:55 +01:00
TomSweeneyRedHat 6003033ada Bump to Buildah v1.11.5
Bump to Buildah v1.11.5.  Most notably changes to the
podman build `--pull` functionality.  `--pull=true` and `--pull=false` now
work as Docker does, `--pull-never` added to supply the functionality
of the old `--pull=false`.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-11-13 10:57:19 -05:00
Valentin Rothberg 96ab0c64b4 container create: os/arch check
Unless explicitely overridden, check if the image's OS and architecture
and throw an errors in case of a mismatch.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-12 17:57:31 -05:00
Valentin Rothberg bf62f9a5cf history: rewrite mappings
Rewrite the backend for displaying the history of an image to simplify
the code and be closer to docker's behaviour.  Instead of driving
index-based heuristics, create a reverse mapping from top-layers to the
corresponding image IDs and lookup the layers on-demand.  Also use the
uncompressed layer size to be closer to Docker's behaviour.

Note that intermediate images from local builds are not considered for
the ID lookups anymore.

Fixes: #3359
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-12 17:29:30 -05:00
Dmitry Smirnov 8d928d525f codespell: spelling corrections
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2019-11-13 08:15:00 +11:00
Chris Evich e959abf2db
Cirrus: Use branch-specific container tags
Automated building of container images is handled in quay.io based on
changes in the master branch of this repository.  However, as additional
branches are made, the "latest" image (from master) diverges from their
expectations.  Fix this by using the branch-tagged images built by quay.
For the near-term, this also implies quay.io will be configured to also
build different images for each branch, and tag them appropriately.
Long-term, image build automation should be combined with libpod
automation - to avoid needing to maintain automation in multiple
systems/locations.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-11-12 13:38:21 -05:00
Kunal Kushwaha 472a721bdd warning added before image prune command
Warning message added before executing image prune
Added a force option, to execute without user input.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2019-11-12 14:13:49 +09:00
dependabot-preview[bot] 3dcac46026
build(deps): bump github.com/uber/jaeger-client-go
Bumps [github.com/uber/jaeger-client-go](https://github.com/uber/jaeger-client-go) from 2.20.0+incompatible to 2.20.1+incompatible.
- [Release notes](https://github.com/uber/jaeger-client-go/releases)
- [Changelog](https://github.com/jaegertracing/jaeger-client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber/jaeger-client-go/compare/v2.20.0...v2.20.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-11 10:25:54 -05:00
OpenShift Merge Robot de32b89eff
Merge pull request #4489 from lsm5/seccomp-separation
create a separate install target for seccomp
2019-11-11 15:02:19 +01:00
Lokesh Mandvekar 2785615209 create a separate install target for seccomp
podman in Fedora gets seccomp.json from containers-common while
the one in Ubuntu PPA gets seccomp.json from containers-golang.

This change will let me use install.config target unmodified
in downstream packages.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2019-11-10 13:42:29 -05:00
OpenShift Merge Robot b713e5371f
Merge pull request #4408 from slimjim2234/master
Fixed issue #4391; podman info --format '{{ json . }}'
2019-11-08 23:16:03 +01:00
OpenShift Merge Robot f456ce90f9
Merge pull request #4337 from QiWang19/check_auth_path
fix bug check nonexist authfile
2019-11-08 22:06:34 +01:00
OpenShift Merge Robot 651d6ebe52
Merge pull request #4427 from rst0git/docs-rm-v
docs: Update "podman container rm -v" description
2019-11-08 21:49:15 +01:00
Peter Hunt f920f93232 Add annotations in play kube
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-11-08 13:53:39 -05:00
Peter Hunt 900a04fcfd Add pod annotations to container
We have the annotations SandboxID, let's use them. This also allows kata containers to be created in pods and share a VM with the infra container. Note: as of now, this sharing only works if the pod has an infra container

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-11-08 13:53:38 -05:00
OpenShift Merge Robot 4ed12f9916
Merge pull request #4453 from rhatdan/vendor
Add support for make vendor-in-container
2019-11-08 15:58:50 +01:00
Daniel J Walsh 2087e92ff3
Add missing information to podman.1 man page
Add missing options.
Define the use of the TMPDIR environment variable for the storing of container images
when they are being pulled to the system.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-11-08 08:48:57 -05:00
OpenShift Merge Robot 92af260346
Merge pull request #4265 from haircommander/infra-namespaces-submit
Split up create config handling of namespaces and security
2019-11-08 12:37:49 +01:00