4714 Commits

Author SHA1 Message Date
369f8b8862 Fix spelling mistakes in man pages and other docs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-11 17:56:54 -04:00
efe9c5b0e7 Add glob parsing for --env flag
Sometimes you want to add a few environmen variables based on the last field being a "*".

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-11 17:15:20 -04:00
20f11718de Merge pull request #3558 from mheon/fix_pod_remove
Fix a bug where ctrs could not be removed from pods
2019-07-11 21:35:53 +02:00
d614372c2f Merge pull request #3552 from baude/golangcilint2
golangci-lint pass number 2
2019-07-11 21:35:45 +02:00
2b64f88446 Merge pull request #3491 from giuseppe/rlimit-host
podman: add --ulimit host
2019-07-11 21:35:37 +02:00
24409daa36 Merge pull request #3470 from QazerLab/docs/system-tests
Update the testing documentation with system tests.
2019-07-11 21:35:30 +02:00
e065612701 Merge pull request #3554 from giuseppe/fix-cgroupfs-cleanup
cgroups: fix a leak when using cgroupfs
2019-07-11 21:23:29 +02:00
df75fc62c8 Add support for -env-host
This flag passes the host environment into the container.  The basic idea is to
leak all environment variables from the host into the container.

Environment variables from the image, and passed in via --env and --env-file
will override the host environment.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-11 13:25:47 -04:00
7b75796a60 cgroups: fix a leak when using cgroupfs
be sure to load all the existing handlers, so that they can also be
freed in addition to the handlers we treat differently.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-11 18:07:49 +02:00
1601100b3e cgroups: attempt a recursive rmdir
if the cgroup cannot be deleted, then attempt to delete all its
subdirectories and try again.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-11 18:07:48 +02:00
6db2745406 Merge pull request #3545 from cevich/fix_binary_release
Cirrus: Fix #3543: Failure in 'release' task
2019-07-11 16:29:42 +02:00
8713483362 Fix a bug where ctrs could not be removed from pods
Using pod removal worked, but container removal was missing the
most critical step - the actual removal. Must have been
accidentally removed during a refactor.

Fixes #3556

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-11 10:17:33 -04:00
a78c885397 golangci-lint pass number 2
clean up and prepare to migrate to the golangci-linter

Signed-off-by: baude <bbaude@redhat.com>
2019-07-11 09:13:06 -05:00
c70657a6d1 Add tests for --ignore-rootfs checkpoint/restore option
This adds three tests for the --ignore-rootfs option to verify that it
works in all combination.

1. Not used at all
2. Only used during restore
3. Only used during checkpoint

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-07-11 15:27:38 +02:00
05549e8b29 Add --ignore-rootfs option for checkpoint/restore
The newly added functionality to include the container's root
file-system changes into the checkpoint archive can now be explicitly
disabled. Either during checkpoint or during restore.

If a container changes a lot of files during its runtime it might be
more effective to migrated the root file-system changes in some other
way and to not needlessly increase the size of the checkpoint archive.

If a checkpoint archive does not contain the root file-system changes
information it will automatically be skipped. If the root file-system
changes are part of the checkpoint archive it is also possible to tell
Podman to ignore these changes.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-07-11 14:43:35 +02:00
1a32074884 Fix typo in checkpoint/restore related texts
Signed-off-by: Adrian Reber <areber@redhat.com>
2019-07-11 14:43:35 +02:00
217f2e77f8 Include root file-system changes in container migration
One of the last limitations when migrating a container using Podman's
'podman container checkpoint --export=/path/to/archive.tar.gz' was
that it was necessary to manually handle changes to the container's root
file-system. The recommendation was to mount everything as --tmpfs where
the root file-system was changed.

This extends the checkpoint export functionality to also include all
changes to the root file-system in the checkpoint archive. The
checkpoint archive now includes a tarstream of the result from 'podman
diff'. This tarstream will be applied to the restored container before
restoring the container.

With this any container can now be migrated, even it there are changes
to the root file-system.

There was some discussion before implementing this to base the root
file-system migration on 'podman commit', but it seemed wrong to do
a 'podman commit' before the migration as that would change the parent
layer the restored container is referencing. Probably not really a
problem, but it would have meant that a migrated container will always
reference another storage top layer than it used to reference during
initial creation.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-07-11 14:43:34 +02:00
d5f1caaf50 Add function to get a filtered tarstream diff
The newly added function GetDiffTarStream() mirrors the GetDiff()
function. It tries to get the correct layer ID from getLayerID()
and it filters out containerMounts from the tarstream. Thus the
behavior is the same as GetDiff(), but it returns a tarstream.

This also adds the function ApplyDiffTarStream() to apply the tarstream
generated by GetDiffTarStream().

These functions are targeted to support container migration with
root file-system changes.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-07-11 14:43:34 +02:00
144567b42d Merge pull request #3527 from adrianreber/finish
Correctly set FinishedTime for checkpointed container
2019-07-11 10:23:19 +02:00
f187bab497 Correctly set FinishedTime for checkpointed container
During 'podman container checkpoint' the finished time was not set. This
resulted in a strange container status after checkpointing:

 Exited (0) 292 years ago

During checkpointing FinishedTime is now set to time.now().

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-07-11 07:35:38 +02:00
e2e8477f83 Merge pull request #3521 from baude/golangcilint1
first pass of corrections for golangci-lint
2019-07-11 01:22:30 +02:00
e053e0e05e first pass of corrections for golangci-lint
Signed-off-by: baude <bbaude@redhat.com>
2019-07-10 15:52:17 -05:00
df3f5afad1 Merge pull request #3538 from giuseppe/fix-some-regressions
runtime: drop spurious message log
2019-07-10 17:27:53 +02:00
de2ecfe59c Merge pull request #3367 from baude/varlinkmore
account for varlink calls that dont use more
2019-07-10 16:50:45 +02:00
7678a1ef90 Cirrus: Fix #3543: Failure in 'release' task
Normally when testing PRs, the final task to run is 'success'.  It's
purpose is three-fold:

- Notify on IRC that a PR passed all testing.
- Block merging of a PR unless all dependent tasks are successful.
- When successful, publish cached binary release archives.

Mistakenly, the 'release' task was not made dependent upon the 'success'
task.  Since 'success' only runs for PRs, this was causing post-merge
failures due to the 'release' task not finding any release archives -
the tasks which generate them are still running.

Fix this by making the 'release' task depend upon the same items as
the 'success' task.  This will ensure it only runs as the very last
step, for both PRs and on branches (post-merge).

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-10 10:32:48 -04:00
f50f91079a fix bug convert volume host path to absolute
fix #3504 If --volume host:dest host is not a named volume, convert the host to a absolute directory path.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-07-10 10:26:57 -04:00
61b20df9e6 Cirrus: Fix 473d06045 / enable build_without_cgo
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-10 09:52:31 -04:00
780b05610e account for varlink calls that dont use more
the commit and pull varlink endpoints were not working correctly when
'more' was not being specified.

Fixes: #3317
Fixes: #3318
Fixes: #3526

Signed-off-by: baude <bbaude@redhat.com>
2019-07-10 08:50:05 -05:00
18c4d73867 runtime: drop spurious message log
fix a regression introduced by 1d36501f961889f554daf3c696fe95443ef211b6

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-10 15:47:38 +02:00
81e722d086 Merge pull request #3106 from cevich/cirrus_release
Cirrus: Automate releasing of tested binaries
2019-07-10 15:08:03 +02:00
5ef972d87b Ensure we have a valid store when we refresh
Fixes #3520

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-10 08:55:48 -04:00
cef566306c Merge pull request #3506 from giuseppe/cgroup2-improvements
cgroups: support creating cgroupsv2 paths
2019-07-10 14:50:04 +02:00
b0c2bb9962 cgroups: skip not existing cpuacct files
if the cpuacct file doesn't exist, ignore it instead of erroring out.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-10 10:54:36 +02:00
bbe03e61a3 cgroups: support creating cgroupsv2 paths
drop the limitation of not supporting creating new cgroups v2 paths.
Every controller enabled /sys/fs/cgroup will be propagated down to the
created path.  This won't work for rootless cgroupsv2, but it is not
an issue for now, as this code is used only by CRI-O.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-10 10:54:35 +02:00
551edd287e Merge pull request #3536 from edsantiago/tabularasa_before_system_test
make localsystem: wipe all user config state
2019-07-10 00:38:03 +02:00
b205e044d6 make localsystem: wipe all user config state
CI is experiencing failures in the system_test step, caused by
podman commands issuing the following warning:

   time="2019-07-09T13:30:19-04:00" level=error msg="User-selected graph driver \"overlay\" overwritten by graph driver \"vfs\" from database - delete libpod local files to resolve

Hypothesis: integration tests, which run just before us, are
leaving user config files in an unstable state.

Workaround: delete all user cache and config and db before
running system tests. This should be safe, and should be
a NOP when running as root.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-07-09 13:33:30 -06:00
76aa8f6d2d Merge pull request #3529 from giuseppe/healthcheck-rootless
healthcheck: support rootless mode
2019-07-09 16:09:37 +02:00
5786a3a7dc Merge pull request #3501 from adrianreber/random
Randomize IP addresses during checkpoint/restore tests
2019-07-09 15:59:02 +02:00
2843d0dc86 Merge pull request #3480 from mheon/potential_ps_test_fix
Restart failed containers in tests
2019-07-09 15:58:50 +02:00
eb4b7ed12b Merge pull request #3528 from giuseppe/fix-auth-location
podman: create and run honors auth file location
2019-07-09 15:33:16 +02:00
714d36b088 podman: create and run honors auth file location
if the auth file was overriden, be sure create and run honors it.

Closes: https://github.com/containers/libpod/issues/3524

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-09 14:21:15 +02:00
c6c637da00 healthcheck: support rootless mode
now that dbus authentication works fine from a user namespace (systemd
241 works fine), we can enable rootless healthchecks.

It uses "systemd-run --user" for creating the healthcheck timer and
communicates with the user instance of systemd listening at
$XDG_RUNTIME_DIR/systemd/private.

Closes: https://github.com/containers/libpod/issues/3523

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-09 14:20:20 +02:00
cea0e93a65 Merge pull request #3518 from jwflory/change/rootless-gpfs
rootless.md: Include GPFS as a parallel filesystem
2019-07-09 11:19:45 +02:00
d0f540e24d Use random IP addresses during checkpoint/restore tests
This tries to reduce CI errors which might happen due to parallel CI
runs which all are using the same IP addresses. Using random addresses
should reduce the possibility of parallel tests using the same IP address.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-07-09 08:04:19 +02:00
7633bd3b1b Merge pull request #1936 from cevich/cirrus_packaged_deps
Cirrus: Use packaged-based dependencies
2019-07-09 00:16:45 +02:00
f4fec6ce71 Merge pull request #3519 from ashley-cui/remoteusage
Podman-remote usage message to display `podman-remote` instead of `podman`
2019-07-08 23:58:11 +02:00
fce2e6577e Merge pull request #3497 from QazerLab/bugfix/systemd-generate-pidfile
Use conmon pidfile in generated systemd unit as PIDFile.
2019-07-08 23:39:42 +02:00
8d37c2073f Merge pull request #3515 from baude/rootlessintegrationtests
speed up rootless tests
2019-07-08 21:16:04 +02:00
edc7f52c95 Merge pull request #3425 from adrianreber/restore-mount-label
Set correct SELinux label on restored containers
2019-07-08 20:31:59 +02:00
e9f812ddfc Fix podman-remote usage message to display podman-remote instead of podman
When the user uses remote client, the message prompts the user to use `podman-remote`. This does not apply for Mac usage.

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-07-08 14:25:49 -04:00