Commit Graph

6355 Commits

Author SHA1 Message Date
OpenShift Merge Robot 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
Matthew Heon 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
baude 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
Adrian Reber 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
Adrian Reber 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
Adrian Reber 1a32074884
Fix typo in checkpoint/restore related texts
Signed-off-by: Adrian Reber <areber@redhat.com>
2019-07-11 14:43:35 +02:00
Adrian Reber 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
Adrian Reber 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
OpenShift Merge Robot 144567b42d
Merge pull request #3527 from adrianreber/finish
Correctly set FinishedTime for checkpointed container
2019-07-11 10:23:19 +02:00
Adrian Reber 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
OpenShift Merge Robot e2e8477f83
Merge pull request #3521 from baude/golangcilint1
first pass of corrections for golangci-lint
2019-07-11 01:22:30 +02:00
baude e053e0e05e first pass of corrections for golangci-lint
Signed-off-by: baude <bbaude@redhat.com>
2019-07-10 15:52:17 -05:00
OpenShift Merge Robot df3f5afad1
Merge pull request #3538 from giuseppe/fix-some-regressions
runtime: drop spurious message log
2019-07-10 17:27:53 +02:00
OpenShift Merge Robot de2ecfe59c
Merge pull request #3367 from baude/varlinkmore
account for varlink calls that dont use more
2019-07-10 16:50:45 +02:00
Chris Evich 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
Qi Wang 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
Chris Evich 61b20df9e6
Cirrus: Fix 473d06045 / enable build_without_cgo
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-10 09:52:31 -04:00
baude 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
Giuseppe Scrivano 18c4d73867
runtime: drop spurious message log
fix a regression introduced by 1d36501f96

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-10 15:47:38 +02:00
OpenShift Merge Robot 81e722d086
Merge pull request #3106 from cevich/cirrus_release
Cirrus: Automate releasing of tested binaries
2019-07-10 15:08:03 +02:00
Matthew Heon 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
OpenShift Merge Robot cef566306c
Merge pull request #3506 from giuseppe/cgroup2-improvements
cgroups: support creating cgroupsv2 paths
2019-07-10 14:50:04 +02:00
Giuseppe Scrivano 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
Giuseppe Scrivano 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
OpenShift Merge Robot 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
Ed Santiago 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
OpenShift Merge Robot 76aa8f6d2d
Merge pull request #3529 from giuseppe/healthcheck-rootless
healthcheck: support rootless mode
2019-07-09 16:09:37 +02:00
OpenShift Merge Robot 5786a3a7dc
Merge pull request #3501 from adrianreber/random
Randomize IP addresses during checkpoint/restore tests
2019-07-09 15:59:02 +02:00
OpenShift Merge Robot 2843d0dc86
Merge pull request #3480 from mheon/potential_ps_test_fix
Restart failed containers in tests
2019-07-09 15:58:50 +02:00
OpenShift Merge Robot 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
Giuseppe Scrivano 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
Giuseppe Scrivano 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
OpenShift Merge Robot 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
Adrian Reber 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
OpenShift Merge Robot 7633bd3b1b
Merge pull request #1936 from cevich/cirrus_packaged_deps
Cirrus: Use packaged-based dependencies
2019-07-09 00:16:45 +02:00
OpenShift Merge Robot 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
OpenShift Merge Robot 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
OpenShift Merge Robot 8d37c2073f
Merge pull request #3515 from baude/rootlessintegrationtests
speed up rootless tests
2019-07-08 21:16:04 +02:00
OpenShift Merge Robot 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
Ashley Cui 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
OpenShift Merge Robot 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
Justin W. Flory 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
baude 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
OpenShift Merge Robot 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
Giuseppe Scrivano fb88074e68
podman: add --ulimit host
add a simple way to copy ulimit values from the host.

if --ulimit host is used then the current ulimits in place are copied
to the container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-08 19:22:54 +02:00
Stefan Becker 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
OpenShift Merge Robot ed3acaecbf
Merge pull request #3496 from baude/golandcodeinspect
code cleanup
2019-07-08 18:00:11 +02:00
OpenShift Merge Robot 1055b22e9b
Merge pull request #3514 from baude/cornflakes
fix integration flake tests
2019-07-08 17:14:08 +02:00
OpenShift Merge Robot 4157a7219c
Merge pull request #3512 from vrothberg/fix-contributing
CONTRIBUTING.md: fix project paths
2019-07-08 17:01:28 +02:00
OpenShift Merge Robot 61c000a1d3
Merge pull request #3505 from baude/getlastevent
get last container event
2019-07-08 16:23:22 +02:00