Commit graph

5776 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Daniel J Walsh 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
Peter Hunt 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
OpenShift Merge Robot 3463a7194c
Merge pull request #4444 from TomSweeneyRedHat/dev/tsweeney/readthedocs
Add links to readthedocs on docs/readme
2019-11-08 01:25:14 +01:00
OpenShift Merge Robot 3ec9ee090e
Merge pull request #4466 from giuseppe/notmpcopyup
mount: add new options nocopyup|copyup for tmpfs
2019-11-07 21:23:54 +01:00
OpenShift Merge Robot d919961f62
Merge pull request #4451 from giuseppe/set-mac
podman: add support for specifying MAC
2019-11-07 20:26:14 +01:00
OpenShift Merge Robot 347499778c
Merge pull request #4378 from containers/dependabot/go_modules/github.com/json-iterator/go-1.1.8
Bump github.com/json-iterator/go from 1.1.7 to 1.1.8
2019-11-07 18:49:19 +01:00
Giuseppe Scrivano 82e4116e57
test: add tests for --mac-address
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-07 18:38:02 +01:00
OpenShift Merge Robot 20c8a01af1
Merge pull request #4413 from containers/dependabot/go_modules/github.com/onsi/gomega-1.7.1
Bump github.com/onsi/gomega from 1.7.0 to 1.7.1
2019-11-07 18:34:33 +01:00
Giuseppe Scrivano 4e5e9dbec2
mount: add new options nocopyup|copyup for tmpfs
add a way to disable tmpcopyup for tmpfs.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-07 18:24:02 +01:00
OpenShift Merge Robot 8f3b0f0d9e
Merge pull request #4471 from containers/dependabot/go_modules/github.com/uber/jaeger-client-go-2.20.0+incompatible
Bump github.com/uber/jaeger-client-go from 2.19.0+incompatible to 2.20.0+incompatible
2019-11-07 18:16:49 +01:00
OpenShift Merge Robot 769d4218ff
Merge pull request #4468 from nalind/image-digests
podman images --digest: always list a digest
2019-11-07 18:16:41 +01:00
OpenShift Merge Robot 24efb5e4eb
Merge pull request #4470 from vrothberg/fix-4463
libpod/config: default: use `crun` on Cgroups v2
2019-11-07 16:26:22 +01:00
OpenShift Merge Robot b4a83bf9ae
Merge pull request #4447 from rhatdan/runasuser
Add support for RunAsUser and RunAsGroup
2019-11-07 16:05:03 +01:00
OpenShift Merge Robot a889fd397a
Merge pull request #4441 from rhatdan/detach
Allow users to disable detach keys
2019-11-07 15:16:36 +01:00
dependabot-preview[bot] 75d67c4920 Bump github.com/uber/jaeger-client-go
Bumps [github.com/uber/jaeger-client-go](https://github.com/uber/jaeger-client-go) from 2.19.0+incompatible to 2.20.0+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.19.0...v2.20.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-07 14:05:10 +00:00
OpenShift Merge Robot aad2904553
Merge pull request #4308 from openSUSE/kata
Add Kata Containers runtimes to libpod.conf
2019-11-07 14:58:57 +01:00
Valentin Rothberg 709ad91035 libpod/config: default: use crun on Cgroups v2
When running on a node with Cgroups v2, default to using `crun` instead
of `runc`.  Note that this only impacts the hard-coded default config.
No user config will be over-written.

Fixes: #4463
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-07 13:55:41 +00:00
Nalin Dahyabhai 5e3e41daee podman images --digest: always list a digest
When we're asked to display image digests, always provide them if we
have values that we can provide.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-11-06 17:36:04 -05:00
OpenShift Merge Robot 2e2d82ce76
Merge pull request #4461 from giuseppe/fix-hang
events: make sure the write channel is always closed
2019-11-06 22:10:11 +01:00
Giuseppe Scrivano 276d68c8f5
events: make sure the write channel is always closed
in case of errors, the channel is not closed, blocking the reader
indefinitely.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1767663

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-06 17:14:44 +01:00
Daniel J Walsh a6108f1c19
Add support for RunAsUser and RunAsGroup
Currently podman generate kube does not generate the correct RunAsUser and RunAsGroup
options in the yaml file.  This patch fixes this.

This patch also make `podman play kube` use the RunAdUser and RunAsGroup options if
they are specified in the yaml file.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-11-06 10:35:37 -05:00
OpenShift Merge Robot 581a7ec298
Merge pull request #4459 from giuseppe/fix-renameat-definition
rootless: use SYS_renameat2 instead of __NR_renameat2
2019-11-06 16:28:46 +01:00
Giuseppe Scrivano e379f7eda1
cni: enable tuning plugin
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-06 16:22:20 +01:00
Jakub Filak 2497b6c77b
podman: add support for specifying MAC
I basically copied and adapted the statements for setting IP.

Closes #1136

Signed-off-by: Jakub Filak <jakub.filak@sap.com>
2019-11-06 16:22:19 +01:00
Jakub Filak 455f5b7616
vendor: updated ocicni for MAC address
`go get github.com/cri-o/ocicni@deac903fd99b6c52d781c9f42b8db3af7dcfd00a`

I had to fix compilation errors in libpod/networking_linux.go

---

ocicni.Networks has changed from string to the structure NetAttachment
with the member Name (the former string value) and the member Ifname
(optional).

I don't think we can make use of Ifname here, so I just map the array of
structures to array of strings - e.g. dropping Ifname.

---

The function GetPodNetworkStatus no longer returns Result but it returns
the wrapper structure NetResult which contains the former Result plus
NetAttachment (Network name and Interface name).

Again, I don't think we can make use of that information here, so I
just added `.Result` to fix the build.

---

Issue: #1136

Signed-off-by: Jakub Filak <jakub.filak@sap.com>
2019-11-06 16:22:18 +01:00
Giuseppe Scrivano 16cb2b38a8
Makefile: add vendor-in-container
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-06 16:22:17 +01:00
Giuseppe Scrivano 0a8dcd7112
rootless: provide workaround for missing renameat2
on RHEL 7.7 renameat2 is not implemented for s390x, provide a
workaround.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1768519

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-06 15:27:46 +01:00
Giuseppe Scrivano a114e9059a
rootless: use SYS_renameat2 instead of __NR_renameat2
use the correct definition for the syscall number.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-06 13:41:15 +01:00
OpenShift Merge Robot 6f7c290f70
Merge pull request #4439 from junaruga/feature/install-ubuntu
Update installation - Ubuntu. [skip ci]
2019-11-06 13:10:30 +01:00