10445 Commits

Author SHA1 Message Date
1215bd9ffd test: Add checkpoint/restore with volumes
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-01-07 07:51:22 +00:00
288ccc4c84 Include named volumes in container migration
When migrating a container with associated volumes, the content of
these volumes should be made available on the destination machine.

This patch enables container checkpoint/restore with named volumes
by including the content of volumes in checkpoint file. On restore,
volumes associated with container are created and their content is
restored.

The --ignore-volumes option is introduced to disable this feature.

Example:

 # podman container checkpoint --export checkpoint.tar.gz <container>

The content of all volumes associated with the container are included
in `checkpoint.tar.gz`

 # podman container checkpoint --export checkpoint.tar.gz --ignore-volumes <container>

The content of volumes is not included in `checkpoint.tar.gz`. This is
useful, for example, when the checkpoint/restore is performed on the
same machine.

 # podman container restore --import checkpoint.tar.gz

The associated volumes will be created and their content will be
restored. Podman will exit with an error if volumes with the same
name already exist on the system or the content of volumes is not
included in checkpoint.tar.gz

 # podman container restore --ignore-volumes --import checkpoint.tar.gz

Volumes associated with container must already exist. Podman will not
create them or restore their content.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-01-07 07:51:19 +00:00
2b35876c8d Use Options as CRImportCheckpoint() argument
Instead of specifying restore option arguments individually from
RestoreOptions, provide the 'options' object to the CRImportCheckpoint
method. This change makes the code in CRImportCheckpoint easier to
extend as it doesn't require excessive number of function parameters.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-01-07 07:48:41 +00:00
17f50fb4bf Use Options as exportCheckpoint() argument
Instead of individual values from ContainerCheckpointOptions,
provide the options object.

This is a preparation for the next patch where one more value
of the options object is required in exportCheckpoint().

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-01-07 07:48:41 +00:00
355e387692 Merge pull request #8832 from hshiina/logfile
Fix e2e test for `podman build --logfile`
2021-01-06 20:19:34 -05:00
bb82c37b73 Merge pull request #8805 from giuseppe/single-user-mapped-root
libpod: handle single user mapped as root
2021-01-06 15:41:36 -05:00
8e4613ab0a Merge pull request #8892 from mheon/fix_8886
Ensure that user-specified HOSTNAME is honored
2021-01-06 15:26:55 -05:00
9198ed40e1 Merge pull request #8901 from mheon/reenable_cevich_tests
Revert e6fbc15f26b2a609936dfc11732037c70ee14cba and reenable tests
2021-01-06 15:20:09 -05:00
9494249f4b Merge pull request #8899 from cevich/new_2021_images
Cirrus: Update Fedora & Ubuntu images
2021-01-06 15:14:01 -05:00
fc44ac2ef2 Revert e6fbc15f26b2a609936dfc11732037c70ee14cba
The issue requiring these tests be disabled should be resolved.
Reenable the tests as such.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-01-06 11:48:06 -05:00
e467400eb1 Cirrus: Update Fedora & Ubuntu images
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-06 10:08:48 -05:00
8f844a66d5 Ensure that user-specified HOSTNAME is honored
When adding the HOSTNAME environment variable, only do so if it
is not already present in the spec. If it is already present, it
was likely added by the user, and we should honor their requested
value.

Fixes #8886

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-01-06 09:46:21 -05:00
ffe2b1e95a Merge pull request #8685 from mheon/ignore_containersconf_sysctls_shared_net
Ignore containers.conf sysctls when sharing namespaces
2021-01-05 17:08:31 -05:00
1f59276998 Merge pull request #8889 from vrothberg/run-1138
generate systemd: do not set `KillMode`
2021-01-05 14:16:47 -05:00
b84b7c89bb Merge pull request #8831 from bblenard/issue-8658-system-prune-reclaimed-space
Rework pruning to report reclaimed space
2021-01-05 11:35:18 -05:00
bc21fabbd7 Merge pull request #8885 from vrothberg/vendor-psgo
vendor containers/psgo@v1.5.2
2021-01-05 10:53:36 -05:00
219c69ef03 generate systemd: do not set KillMode
`KillMode=none` has been deprecated in systemd and is now throwing big
warnings when being used.  Users have reported the issues upstream
(see #8615) and on the mailing list.

This deprecation was mainly motivated by an abusive use of third-party
vendors causing all kinds of undesired side-effects.  For instance, busy
mounts that delay reboot.

After talking to the systemd team, we came up with the following plan:

 **Short term**: we can use TimeoutStopSec and remove KillMode=none which
 will default to cgroup.

 **Long term**: we want to change the type to sdnotify. The plumbing for
 Podman is done but we need it for conmon. Once sdnotify is working, we
 can get rid of the pidfile handling etc. and let Podman handle it.
 Michal Seklatar came up with a nice idea that Podman increase the time
 out on demand. That's a much cleaner way than hard-coding the time out
 in the unit as suggest in the short-term solution.

This change is executing the short-term plan and sets a minimum timeout
of 60 seconds.  User-specified timeouts are added to that.

Fixes: #8615
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-05 16:37:24 +01:00
21f5154399 vendor containers/psgo@v1.5.2
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-05 10:44:16 +01:00
1b9366d650 Merge pull request #8873 from baude/issue8864
close journald when reading
2021-01-05 04:34:24 -05:00
618c35570d Merge pull request #8878 from mheon/no_edit_config
Ensure we do not edit container config in Exec
2021-01-04 21:11:27 -05:00
ced7c0ab7f Merge pull request #8875 from rhatdan/image
Allow image errors to bubble up from lower level functions.
2021-01-04 17:30:22 -05:00
864592c746 Add default sysctls for pod infra containers
Ensure that infra containers for pods will grab default sysctls
from containers.conf, to match how other containers are created.
This mostly affects the other containers in the pod, which will
inherit those sysctls when they join the pod's namespaces.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-01-04 15:29:18 -05:00
960607a4cd Ensure we do not edit container config in Exec
The existing code grabs the base container's process, and then
modifies it for use with the exec session. This could cause
errors in `podman inspect` or similar on the container, as the
definition of its OCI spec has been changed by the exec session.
The change never propagates to the DB, so it's limited to a
single process, but we should still avoid it when possible - so
deep-copy it before use.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-01-04 14:36:41 -05:00
002d0d6ee6 close journald when reading
when reading from journald, we need to close the journal handler for
events and logging.

Fixes: #8864

Signed-off-by: baude <bbaude@redhat.com>
2021-01-04 13:27:38 -06:00
b5028541cf Merge pull request #8876 from vrothberg/fix-8870
libpod API: pull: fix channel race
2021-01-04 13:41:28 -05:00
6a1fbe7a56 Merge pull request #8869 from giuseppe/make-rundir-accessible
systemd: make rundir always accessible
2021-01-04 12:22:52 -05:00
acbec396fd libpod API: pull: fix channel race
Fix a race condition in the pull endpoint caused by buffered channels.
Using buffered channels can lead to the context's cancel function to be
executed prior to the items being read from the channel.

Fixes: #8870
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-04 17:46:24 +01:00
d0093026a2 Allow image errors to bubble up from lower level functions.
Currently we ignore ErrMultipleImages being returned from findImageInRepoTags.

Fixes: https://github.com/containers/podman/issues/8868

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-04 10:51:54 -05:00
f261bfc549 Merge pull request #8859 from containers/dependabot/go_modules/github.com/google/uuid-1.1.3
Bump github.com/google/uuid from 1.1.2 to 1.1.3
2021-01-04 15:16:41 +01:00
8e4d19da15 Merge pull request #8863 from mgoltzsche/fix_seccomp_when_privileged
Disable seccomp by default when creating a privileged container.
2021-01-04 14:49:41 +01:00
8c6bbfbc42 test: fix variable name
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-01-04 14:19:59 +01:00
898f57c4c1 systemd: make rundir always accessible
so that the PIDFile can be accessed also without being in the rootless
user namespace.

Closes: https://github.com/containers/podman/issues/8506

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-01-04 14:19:58 +01:00
23f25b8261 Merge pull request #8823 from giuseppe/exec-honor-privileged
exec: honor --privileged
2021-01-04 10:53:44 +01:00
142b4ac966 Merge pull request #8862 from Luap99/compat-list-filter
Compat api containers/json add support for filters
2021-01-03 00:04:23 +01:00
bd35792b0c fix: disable seccomp by default when privileged.
When running a privileged container and `SeccompProfilePath` is empty no seccomp profile should be applied.
(Previously this was the case only if `SeccompProfilePath` was set to a non-empty default path.)

Closes #8849

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
2021-01-02 01:38:19 +01:00
f471fb4ce9 Compat api containers/json add support for filters
Fixes #8860

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-01 22:43:31 +01:00
39b1cb4967 Merge pull request #8858 from jwhonce/issues/7102
Expose Height/Width fields to decoder
2020-12-31 13:14:25 +01:00
b5e4ab0faa Bump github.com/google/uuid from 1.1.2 to 1.1.3
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/google/uuid/releases)
- [Commits](https://github.com/google/uuid/compare/v1.1.2...v1.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-31 07:04:14 -05:00
a0bfd953c2 Expose Height/Width fields to decoder
Fixes #7102

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-30 19:27:48 -07:00
b90f7f9095 Rework pruning to report reclaimed space
This change adds code to report the reclaimed space after a prune.
Reclaimed space from volumes, images, and containers is recorded
during the prune call in a PruneReport struct. These structs are
collected into a slice during a system prune and processed afterwards
to calculate the total reclaimed space.

Closes #8658

Signed-off-by: Baron Lenardson <lenardson.baron@gmail.com>
2020-12-30 19:57:35 -06:00
c6c9b45985 Merge pull request #8852 from afbjorklund/slirp_sandbox-no_pivot_root
The slirp4netns sandbox requires pivot_root
2020-12-30 16:03:28 +01:00
a84383297c Merge pull request #8853 from jubalh/gentoo
Add support for Gentoo file to package query
2020-12-30 15:57:55 +01:00
ef12e36df0 Merge pull request #8850 from alvistack/master-linux-amd64
Update nix pin with `make nixpkgs`
2020-12-30 13:34:22 +01:00
7f0771fa94 Merge pull request #8809 from bblenard/bblenard-dev
Consolidate filter logic to pkg subdirectory
2020-12-30 05:13:49 +01:00
904dec2164 Add support for Gentoo file to package query
On Gentoo systems where `app-portage/gentoolkit` is installed the binary
`equery` is used to query for information on which package a file
belongs to.

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
2020-12-29 20:33:27 +01:00
25b7198441 The slirp4netns sandbox requires pivot_root
Disable the sandbox, when running on rootfs

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-29 18:03:49 +01:00
17cf6b7267 Update nix pin with make nixpkgs
Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2020-12-29 12:37:44 +08:00
9c9f02aad7 Merge pull request #8835 from rst0git/readme-fix
readme: Remove broken link
2020-12-25 23:46:13 +01:00
7b3ad6d892 readme: Remove broken link
The file `varlink_remote_client.md` has been removed in commit:

f62a356515e387b0bbcf1f08b4831d139c2039b7
Remove varlink support from Podman

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2020-12-25 17:10:19 +00:00
eeb4c129be Fix e2e test for podman build --logfile
Type casting is necessary to see if the logfile size is not equal to 0.

Signed-off-by: Hironori Shiina <Hironori.Shiina@fujitsu.com>
2020-12-24 21:00:16 -05:00