3817 Commits

Author SHA1 Message Date
86987b8038 Use the same SELinux label for CRIU log files
The SELinux label for the CRIU dump.log was explicitly set in Podman.
The label for the restore.log, however, not. This just moves the code
to label the log file into a function and calls that functions during
checkpoint and restore.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-04-12 15:17:03 +02:00
6f3d2edc2b pull: remove cryptic error message
we were printing something like:

(0x1840f00,0xc00041bba0)

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-12 14:23:52 +02:00
387d6012ba Merge pull request #2904 from rhatdan/rootless
Fix README.md -> rootless.md link
2019-04-11 19:27:25 -07:00
e197cb2ff4 Merge pull request #2889 from edsantiago/bats
BATS tests: start supporting podman-remote
2019-04-11 19:19:23 -07:00
859bda1936 new uidmap BATS test: fix
Various problems, one of which was causing the test to fail
completely (otherwise I wouldn't have caught the others):

- option is --uidmap, not --uidmapping
- run_podman cannot be piped (| grep /sys/kernel). That's
  an unfortunate limitation of BATS. Any invocation of 'run'
  saves results to $output, which then has to be tested
  in a separate step.
  - do so, using 'run' and 'grep' and 'is' to produce
    readable messages on failure
- remove "$expected_rc", that looks like a copy/paste bug
  from a few lines above.

Skip entire test if rootless. (The one without --net=host
passes, but it also passes with older podman as both root
and rootless. I don't think it's actually testing anything,
but agree with leaving it in to catch weird regressions).

We really need to get these tests running in CI.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-04-11 20:08:27 -06:00
e6fd4737ec Merge pull request #2906 from vsoch/update/ubuntu-install
adding additional apt-get update, needed for ubuntu install
2019-04-11 18:56:38 -07:00
cb2b019d5d Merge pull request #2885 from kunalkushwaha/image-dangling-filter-fix
imagefilter dangling handling corrected
2019-04-11 14:15:49 -07:00
3288cc6078 adding additional update, needed for install
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-04-11 17:14:40 -04:00
272f10f1bb Merge pull request #2902 from baude/remoteattachfixes
Fixes for podman-remote run and attach
2019-04-11 13:06:39 -07:00
095d5c05a4 Fix README.md -> rootless.md link
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-11 14:51:59 -04:00
495f2ce515 Fixes for podman-remote run and attach
Fixes the ability to run (create,start) a container and attach to its
console correctly.  We can now also exit from the console without
hanging the remote client.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-11 13:51:50 -05:00
745993b592 Merge pull request #2895 from mheon/commit_no_default_include_volumes
Add --include-volumes flag to 'podman commit'
2019-04-11 09:59:52 -07:00
ab259987ee Merge pull request #2879 from mheon/header_on_no_images
Print header for 'podman images' even with no images present
2019-04-11 09:59:44 -07:00
4b9a4a12f1 Merge pull request #2901 from mheon/improve_debug_on_cleanup_err
Expand debugging for container cleanup errors
2019-04-11 09:31:44 -07:00
b281c34b31 Merge pull request #2899 from giuseppe/prevent-sys-fs-kernel-paths-in-userns
userns: prevent /sys/kernel/* paths in the container
2019-04-11 08:30:31 -07:00
72d08d4c61 remote-client checkpoint/restore
add the ability for the remote client to be able to checkpoint and
restore containers.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-11 10:13:58 -05:00
27d56c7f15 Expand debugging for container cleanup errors
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-11 11:05:00 -04:00
4596c39655 Merge pull request #2893 from TomSweeneyRedHat/dev/tsweeney/commandsfix
Add demo script and cast to images
2019-04-11 07:17:30 -07:00
2c9c40dc82 spec: mask /sys/kernel when bind mounting /sys
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-11 15:55:34 +02:00
aef09ce031 Add --include-volumes flag to 'podman commit'
The 'docker commit' will never include a container's volumes when
committing, without an explicit request through '--change'.

Podman, however, defaulted to including user volumes as image
volumes.

Make this behavior depend on a new flag, '--include-volumes',
and make the default behavior match Docker.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-11 09:55:24 -04:00
42eb9eaf29 oci: add /sys/kernel to the masked paths
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-11 15:52:36 +02:00
b7800889fb userns: prevent /sys/kernel/* paths in the container
when we run in a user namespace, there are cases where we have not
enough privileges to mount a fresh sysfs on /sys.  To circumvent this
limitation, we rbind /sys from the host.  This carries inside of the
container also some mounts we probably don't want to.  We are also
limited by the kernel to use rbind instead of bind, as allowing a bind
would uncover paths that were not previously visible.

This is a slimmed down version of the intermediate mount namespace
logic we had before, where we only set /sys to slave, so the umounts
done to the storage by the cleanup process are propagated back to the
host.  We also don't setup any new directory, so there is no
additional cleanup to do.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-11 15:40:00 +02:00
638789fd88 Merge pull request #2896 from giuseppe/fix-segfault-reload
rootless: fix segfault on refresh if there are containers
2019-04-11 02:32:13 -07:00
f9ae2d4830 Merge pull request #2883 from baude/remoteclifixes
Initial remote flag clean up
2019-04-11 01:06:56 -07:00
034cc8a5ae imagefilter dangling handling corrected
imagefilter dangling=<value> shall not be ignored.
this PR handles the value and returns images accordingly.

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-04-11 09:18:31 +09:00
09532c8cc0 rootless: fix segfault on refresh if there are containers
create immediately a namespace if we need a refresh.  This is
necessary to access the rootless storage.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-10 23:12:37 +02:00
6cd6eb6768 Merge pull request #2892 from edsantiago/healthcheck_typo_fix
(minor): fix misspelled 'Healthcheck'
2019-04-10 11:28:57 -07:00
4665d1a112 Add demo script and cast to images
Add a pointer to the script and asciinema cast for the
images command to the commands.md file.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-04-10 13:51:52 -04:00
7f10672486 Initial remote flag clean up
The remote client should not honor most of the local podman "global"
options.  Many of them are only applicable to where the podman backend
is actually running.

Also, removing some options for push and pull that also are not
applicable to the remote client environment.

Additionally, take some of the code from main and pop it into functions
that can be called whether local or not.  This helps the remote client
and darwin builds.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-10 12:43:19 -05:00
1fb0a09591 Merge pull request #2874 from baude/varlinkterm
Add the ability to attach remotely to a container
2019-04-10 08:51:26 -07:00
a07b2c2c60 (minor): fix misspelled 'Healthcheck'
Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-04-10 09:43:56 -06:00
1701707dad Merge pull request #2880 from mheon/update_allowed_regex_error
Update invalid name errors to report the correct regex
2019-04-10 08:07:16 -07:00
7220c166d4 BATS tests: start supporting podman-remote
podman-remote now supports rm! That's what we needed to start
running BATS tests.

Although most tests don't actually work, some do, and maybe
the rest will start working over time. For now, disable them.

The only significant difference found is that podman-remote
strips fractional seconds from timestamps in JSON output.
Probably not something worth caring about.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-04-10 08:19:09 -06:00
fbcda7772d Add the ability to attach remotely to a container
Also, you can now podman-remote run -it.  There are some bugs that need
to be ironed out but I would prefer to merge this so we can make both
progress on start and exec as well as the bugs.

* when doing podman-remote run -it foo /bin/bash, you have to press
enter to get the prompt to display. with the localized podman, we had to
teach it connect to the console first and then start the container so we
did not miss anything.

* when executing "exit" in the console, we get a hard lockup likely
because nobody knows what to do.

* custom detach keys are not supported

* podman-remote run -it alpine ls does not currently work.  only
dropping to a shell works.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-10 08:59:28 -05:00
ba4a1bb9bd Print header for 'podman images' even with no images
Fixes #2877

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-10 09:55:55 -04:00
2f2c7660c3 Merge pull request #2882 from baude/remoteps
podman-remote ps
2019-04-10 04:24:56 -07:00
60ef8f8da9 Merge pull request #2663 from jwhonce/wip/remote_umount
Implement podman-remote umount and rm command
2019-04-09 17:46:28 -07:00
23cd1928ec podman-remote ps
add the ability to run ps on containers using the remote client.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-09 15:00:35 -05:00
40a1df38d1 Merge pull request #2881 from edsantiago/revert_2832
ps: now works with --size and nonroot
2019-04-09 12:51:11 -07:00
82e8453c77 Re-run (make vendor) to drop the now unnecessary collation code and tables
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-04-09 21:08:44 +02:00
97c9115c02 Potentially breaking: Make hooks sort order locale-independent
Don't sort OCI hooks using the locale collation order; it does not
make sense for the same system-wide directory to be interpreted differently
depending on the user's LC_COLLATE setting, and the language-specific
collation order can even change over time.

Besides, the current collation order determination code has never worked
with the most common LC_COLLATE values like en_US.UTF-8.

Ideally, we would like to just order based on Unicode code points
to be reliably stable, but the existing implementation is case-insensitive,
so we are forced to rely on the unicode case mapping tables at least.

(This gives up on canonicalization and width-insensitivity, potentially
breaking users who rely on these previously documented properties.)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-04-09 21:08:44 +02:00
09ff62429a Implement podman-remote rm
* refactor command output to use one function
* Add new worker pool parallel operations
* Implement podman-remote umount
* Refactored podman wait to use printCmdOutput()

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-04-09 11:55:26 -07:00
cebb7ebbee ps: now works with --size and nonroot
Revert the error check from #2832. This is not strictly
necessary, since 'podman ps --size' now works perfectly
fine in nonroot because some recent change (Giuseppe's,
presumably) masked os.Geteuid() return 0... but removing
for maintainability's sake.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-04-09 12:55:19 -06:00
e2f0a785a4 Update invalid name errors to report the correct regex
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-09 14:20:07 -04:00
fe79bdd07e Merge pull request #2820 from rhatdan/rootless
Document shortcomings with rootless podman
2019-04-09 06:38:10 -07:00
d744d9e303 Merge pull request #2859 from giuseppe/enable-userns-tests-rootless
test: enable userns and remote e2e tests for rootless
2019-04-09 01:36:53 -07:00
0fdbf1d306 Merge pull request #2873 from edsantiago/podman_command_check_usability
CI check for --help vs man pages: usability fix
2019-04-09 00:48:36 -07:00
ce82e19a37 cirrus: enable remote tests for rootless
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-08 22:16:56 +02:00
ae10f55362 test: fix remote tests for rootless
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-08 22:16:55 +02:00
6b9c1e2857 test: enable userns e2e tests for rootless
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-08 21:23:43 +02:00