576 Commits

Author SHA1 Message Date
e3240daa47 Merge pull request #3551 from mheon/fix_memory_leak
Fix memory leak with exit files
2019-08-02 03:44:43 +02:00
e48dc506d1 Merge pull request #3693 from QiWang19/search
fix search output limit
2019-08-02 01:22:44 +02:00
619a39f7bb fix search output limit
close https://bugzilla.redhat.com/show_bug.cgi?id=1732280
From the bug Podman search returns 25 results even when limit option `--limit` is larger than 25(maxQueries). They want Podman to return `--limit` results.

This PR fixes the number of output result.
if --limit not set, return MIN(maxQueries, len(res))
if --limit is set, return MIN(option, len(res))

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-01 16:15:15 -04:00
8da24f2f7d Use "none" instead of "null" for the null eventer
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-01 15:01:54 -04:00
6f62dac163 Merge pull request #3341 from rhatdan/exit
Add new exit codes to rm & rmi for running containers & dependencies
2019-08-01 13:37:19 +02:00
5370d9cb76 Add new exit codes to rm & rmi for running containers & dependencies
This enables programs and scripts wrapping the podman command to handle
'podman rm' and 'podman rmi' failures caused by paused or running
containers or due to images having other child images or dependent
containers. These errors are common enough that it makes sense to have
a more machine readable way of detecting them than parsing the standard
error output.

Signed-off-by: Ondrej Zoder <ozoder@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-08-01 03:40:29 -04:00
7dfaef7766 Add runtime and conmon path discovery
The `$PATH` environment variable will now used as fallback if no valid
runtime or conmon path matches. The debug logs has been updated to state
the used executable.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-01 08:32:25 +02:00
cdd5639d56 Expose Null eventer and allow its use in the Podman CLI
We need this specifically for tests, but others may find it
useful if they don't explicitly need events and don't want the
performance implications of using them.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-31 17:28:42 -04:00
8e8d1ac193 Add a flag to set events logger type
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-31 17:28:42 -04:00
e84ed3c1bc Merge pull request #3665 from QiWang19/env
Set -env variables as appropriate
2019-07-30 21:20:34 +02:00
2da86bdc3a Set -env variables as appropriate
close #3648

podman create and podman run do not set --env variable if the environment is not present with a value

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-07-30 12:02:18 -04:00
e46d9b2e45 Fix the syntax in the podman export documentation example
Signed-off-by: Laszlo Gombos <laszlo.gombos@gmail.com>
2019-07-29 11:14:31 -04:00
0c4dfcfe57 Merge pull request #3639 from giuseppe/user-ns-container
podman: support --userns=ns|container
2019-07-26 15:06:06 +02:00
eca157fb54 Merge pull request #3627 from ashley-cui/rmdocs
Documenation & make tar.gz for remote
2019-07-26 11:37:10 +02:00
1d72f651e4 podman: support --userns=ns|container
allow to join the user namespace of another container.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-25 23:04:55 +02:00
ce0132a45e Documenation & build automation for remote darwin
Created shell script to automatically compile remote-only docs & rename
Added make brew-pkg to automatically package files needed for homebrew
Add missing docs

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-07-25 15:36:39 -04:00
e2067836a4 Document SELinux label requirements for the rootfs argument
When using the rootfs argument, SELinux systems fails silently
when the files are not properly labeled.

Related #3628

Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
2019-07-24 08:25:36 -04:00
a1a79c08b7 Implement conmon exec
This includes:
	Implement exec -i and fix some typos in description of -i docs
	pass failed runtime status to caller
	Add resize handling for a terminal connection
	Customize exec systemd-cgroup slice
	fix healthcheck
	fix top
	add --detach-keys
	Implement podman-remote exec (jhonce)
	* Cleanup some orphaned code (jhonce)
	adapt remote exec for conmon exec (pehunt)
	Fix healthcheck and exec to match docs
		Introduce two new OCIRuntime errors to more comprehensively describe situations in which the runtime can error
		Use these different errors in branching for exit code in healthcheck and exec
	Set conmon to use new api version

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-22 15:57:23 -04:00
8ae97b2f57 Add support for listing read/only and read/write images
When removing --all images prune images only attempt to remove read/write images,
ignore read/only images

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-19 06:59:49 -04:00
deb087d7b1 Merge pull request #3443 from adrianreber/rootfs-changes-migration
Include changes to the container's root file-system in the checkpoint archive
2019-07-19 02:38:26 +02:00
b59abdc1b1 Merge pull request #3579 from QiWang19/dns_net
fix --dns and --network conflict
2019-07-19 02:22:28 +02:00
3f721f8b17 fix --dns* and --network not set to host conflict
Close #3553
This PR makes --dns, --dns-option, --dns-search, and --network not set to host flag mutually exclusive for podman build and create. Returns conflict error if both flags are set.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-07-18 09:39:31 -04:00
0b57e77d7c libpod: support for cgroup namespace
allow a container to run in a new cgroup namespace.

When running in a new cgroup namespace, the current cgroup appears to
be the root, so that there is no way for the container to access
cgroups outside of its own subtree.

By default it uses --cgroup=host to keep the previous behavior.

To create a new namespace, --cgroup=private must be provided.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-18 10:32:25 +02:00
3e53bfe36e Make the healthcheck flags compatible with Docker CLI
Docker CLI calls the healthcheck flags "--health-*", instead of
"--healthcheck-*".

Introduce the former, in order to keep compatibility, and alias
the later, in order to avoid breaking current usage.

Change "--healthcheck-*" to "--health-*" in the docs and tests.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-07-16 06:15:28 +02:00
e4cba7d36a create: improve parser for --healthcheck-command
Fix Docker CLI compatibility issue: the "--healthcheck-command" option
value should not be split but instead be passed as single string to
"CMD-SHELL", i.e. "/bin/sh -c <opt>".

On the other hand implement the same extension as is already available
for "--entrypoint", i.e. allow the option value to be a JSON array of
strings. This will make life easier for tools like podman-compose.

Updated "--healthcheck-command" option values in tests accordingly.

Continuation of #3455 & #3507

Signed-off-by: Stefan Becker <chemobejk@gmail.com>
2019-07-14 10:33:01 +03:00
6f3e7f7ecc Merge pull request #3557 from rhatdan/env
Add support for --env-host
2019-07-12 10:33:18 +02:00
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
2b64f88446 Merge pull request #3491 from giuseppe/rlimit-host
podman: add --ulimit host
2019-07-11 21:35:37 +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
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
e053e0e05e first pass of corrections for golangci-lint
Signed-off-by: baude <bbaude@redhat.com>
2019-07-10 15:52:17 -05: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
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
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
a54429cf87 Use conmon pidfile in generated systemd unit as PIDFile.
By default, podman points PIDFile in generated unit file to non-existent
location. As a result, the unit file, generated by podman, is broken:
an attempt to start this unit without prior modification results in a crash,
because systemd can not find the pidfile of service's main process.

Fix the value of "PIDFile" and add a system test for this case.

Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-07-04 03:58:37 +03:00
827ac0859f lock: new lock type "file"
it is a wrapper around containers/storage file locking.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 16:41:10 +02:00
7e3f1c21b0 libpod: specify a detach keys sequence in libpod.conf
Add the ability of specifying a detach keys sequence in libpod.conf

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-06-26 10:12:34 +02:00
21978c9908 Merge pull request #3332 from rhatdan/cgroupmanager
Correctly identify the defaults for cgroup-manager
2019-06-25 14:54:28 +02:00
80440408ad Fix configs location in rootless tutorial.
Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-06-22 02:20:44 +03:00
a1a70ff5e0 Merge pull request #3197 from TomSweeneyRedHat/dev/tsweeney/rootlesstutorial
First pass rootless tutorial
2019-06-20 13:20:29 +02:00
00f266393e Merge pull request #3356 from giuseppe/system-migrate-add-doc
docs: add note to system migrate
2019-06-20 12:30:23 +02:00
300025359e docs: add note to system migrate
add a note explaining how it can be used to recreate the rootless user
namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-19 22:58:37 +02:00
47e2ad8ec3 Fix documentation for log-driver
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-19 12:50:05 -04:00
292a48cab4 cmd, docs, test: fix some typos
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-18 10:52:19 +02:00
8bcfd24397 Merge pull request #3338 from jwhonce/issue/3299
Add remote client log to file
2019-06-18 01:03:38 +02:00
7d0e77de94 Merge pull request #3296 from arkamar/typos
Fix some typos in few *.md files
2019-06-17 21:26:25 +02:00
9588eea3a1 First pass rootless tutorial
First pass of the rootless tutorial.  This may be come the basis
for a User Guide of the same.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-06-17 15:00:45 -04:00
0003be1e0e Add remote client logging to a file
Logging messages from the dependency libraries should not log onto the
screen when using the remote client.  This patch writes logging to
~/.config/containers/podman-remote.log

Fixes #3299

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-06-17 08:01:39 -07:00
0d341170d5 Fix subgidname option in docs for podman run
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2019-06-17 15:48:29 +03:00