4595 Commits

Author SHA1 Message Date
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
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
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
eae377d6e8 Merge pull request #3517 from stefanb2/topic-doc-fix-healthcheck-command
docs: fix --healthcheck-command option
2019-07-08 19:39:34 +02:00
2f29c56542 rootless.md: Include GPFS as a parallel filesystem
Per @rhatdan's request in #3478, this commit makes a note of supporting
General Parallel File System by IBM since it shares the same root issue
as NFS for rootless containers.

Signed-off-by: Justin W. Flory <git@jwf.io>
2019-07-08 12:33:35 -05:00
c187da23c4 speed up rootless tests
when running integrations tests as rootless, several tests still
unnecessarily pull images which is costly in terms of time.

Signed-off-by: baude <bbaude@redhat.com>
2019-07-08 12:31:31 -05:00
3fdf1a2c44 Merge pull request #3377 from TomSweeneyRedHat/dev/tsweeney/gate
Add RUN priv'd test for build
2019-07-08 19:25:29 +02:00
69a229b24b docs: fix --healthcheck-command option
Make the documentation agree with the code.

Related #3507

Signed-off-by: Stefan Becker <chemobejk@gmail.com>
2019-07-08 19:06:01 +03:00
ed3acaecbf Merge pull request #3496 from baude/golandcodeinspect
code cleanup
2019-07-08 18:00:11 +02:00
1055b22e9b Merge pull request #3514 from baude/cornflakes
fix integration flake tests
2019-07-08 17:14:08 +02:00
4157a7219c Merge pull request #3512 from vrothberg/fix-contributing
CONTRIBUTING.md: fix project paths
2019-07-08 17:01:28 +02:00
61c000a1d3 Merge pull request #3505 from baude/getlastevent
get last container event
2019-07-08 16:23:22 +02:00
1d36501f96 code cleanup
clean up code identified as problematic by golands inspection

Signed-off-by: baude <bbaude@redhat.com>
2019-07-08 09:18:11 -05:00
3dee49f131 fix integration flake tests
attempts to correct three of our flakey integration tests

Signed-off-by: baude <bbaude@redhat.com>
2019-07-08 09:06:40 -05:00
2d1e52d3e9 CONTRIBUTING.md: fix project paths
The paths to the local libpod tree where missing the `./src` part which
ultimately lead to compilation errors.  Also place the git trees into
containers/libpod and not into the user's GitHub root.

Reported in #podman on IRC.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-07-08 14:25:51 +02:00
d252100c94 get last container event
an internal change in libpod will soon required the ability to lookup
the last container event using the continer name or id and the type of
event.  this pr is in preperation for that need.

Signed-off-by: baude <bbaude@redhat.com>
2019-07-07 08:54:20 -05:00
2bfade4391 Do not hardcode podman binary location in generate systemd.
It is not correct to rely on specific location of the podman binary.
In most cases it is /usr/bin/podman, but sometimes is not (e.g. in
system tests). Use /proc/self/exe instead of hardcoded path.

Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-07-07 11:20:41 +03:00
8fde4194b6 Move skipping systemd tests to early setup.
There is no meaning of performing setup/teardown for these tests
when we even can not work with systemd.

Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-07-06 20:45:26 +03:00
1f435bf92c Reload systemd daemon on creation of units location dir in tests.
Systemd manager drops non-existent directories from the units search
path during initialization, thus, creation of UNIT_DIR, if it did not
exist before, requres reloading the daemon.

Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-07-06 17:41:29 +03:00
c490754ff7 Add debug information to "generate systemd" test.
Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-07-06 01:35:46 +03:00