5803 Commits

Author SHA1 Message Date
a3d13fb286 podman {pod,} rm/stop: add --ignore flag
Add an --ignore flag to podman rm and stop. When specified, Podman will
ignore "no such {container,pod}" errors that occur when a specified
container/pod is not present in the store (anymore).  The motivation
behind adding this flag is to write more robust systemd services using
Podman.  A user might have manually decided to remove a container/pod
which would lead to a failure during the `ExecStop` directive of a
systemd service referencing that container/pod.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-25 09:48:13 +01:00
6187e72435 Merge pull request #4544 from containers/dependabot/go_modules/github.com/pkg/profile-1.4.0
build(deps): bump github.com/pkg/profile from 1.3.0 to 1.4.0
2019-11-22 23:31:01 +01:00
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
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
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
35605c02fd Merge pull request #4528 from haircommander/kube-seccomp
Handle seccomp annotations in play kube
2019-11-22 21:09:05 +01:00
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
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
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
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
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
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
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
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
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
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
c673ff8cb6 Merge pull request #4464 from TomSweeneyRedHat/dev/tsweeney/buildtest
Add new test suite for build
2019-11-19 23:15:57 +01:00
f3f219a67c Merge pull request #4523 from vrothberg/systemd-improvements
podman rm/stop --cidfile
2019-11-19 13:13:51 +01:00
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
741b90c2b9 Merge pull request #4502 from vrothberg/fix-3359
history: rewrite mappings
2019-11-18 15:10:09 +01:00
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
db32ed1ae8 Merge pull request #4521 from haircommander/winsz-fix
Also delete winsz fifo
2019-11-17 17:05:07 +01:00
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
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
c6f2383213 Merge pull request #4505 from vrothberg/arch
container create: os/arch check
2019-11-16 17:36:12 +01:00
51c08f3be6 Merge pull request #4368 from haircommander/pod-annotations
Add pod annotations to container
2019-11-15 19:41:39 +01:00
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
d7ed9fa188 Merge pull request #4518 from baude/alpinetopause
use pause image for check all
2019-11-14 22:40:18 +01:00
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
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
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
15220af08c Merge pull request #4497 from onlyjob/master
codespell: spelling corrections
2019-11-13 18:01:52 +01:00
7a693a1946 Merge pull request #4503 from cevich/fix_branch_images
Cirrus: Use branch-specific container tags
2019-11-13 17:47:55 +01:00
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
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
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
8d928d525f codespell: spelling corrections
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2019-11-13 08:15:00 +11:00
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
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
de32b89eff Merge pull request #4489 from lsm5/seccomp-separation
create a separate install target for seccomp
2019-11-11 15:02:19 +01:00
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
b713e5371f Merge pull request #4408 from slimjim2234/master
Fixed issue #4391; podman info --format '{{ json . }}'
2019-11-08 23:16:03 +01:00
f456ce90f9 Merge pull request #4337 from QiWang19/check_auth_path
fix bug check nonexist authfile
2019-11-08 22:06:34 +01:00
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
f920f93232 Add annotations in play kube
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-11-08 13:53:39 -05:00
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
4ed12f9916 Merge pull request #4453 from rhatdan/vendor
Add support for make vendor-in-container
2019-11-08 15:58:50 +01:00
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
5f3a61ed42 Add support for make vendor-in-container
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-11-08 06:27:17 -05:00
dcf3c742b1 Split up create config handling of namespaces and security
As it stands, createconfig is a huge struct. This works fine when the only caller is when we create a container with a fully created config. However, if we wish to share code for security and namespace configuration, a single large struct becomes unweildy, as well as difficult to configure with the single createConfigToOCISpec function.

This PR breaks up namespace and security configuration into their own structs, with the eventual goal of allowing the namespace/security fields to be configured by the pod create cli, and allow the infra container to share this with the pod's containers.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-11-07 21:23:23 -05:00