3214 Commits

Author SHA1 Message Date
5a0a9dfa23 Add debug information when overriding paths with the DB
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 09:38:02 -05:00
0d697573a6 Add path for named volumes to podman info
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 09:38:02 -05:00
5fcbe5baab Add volume path to default libpod.conf (and manpage)
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 09:38:02 -05:00
d41d8d090e Validate VolumePath against DB configuration
If this doesn't match, we end up not being able to access named
volumes mounted into containers, which is bad. Use the same
validation that we use for other critical paths to ensure this
one also matches.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 09:37:00 -05:00
da70c9db6f When location of c/storage root changes, set VolumePath
We want named volumes to be created in a subdirectory of the
c/storage graph root, the same as the libpod root directory is
now. As such, we need to adjust its location when the graph root
changes location.

Also, make a change to how we set the default. There's no need to
explicitly set it every time we initialize via an option - that
might conflict with WithStorageConfig setting it based on graph
root changes. Instead, just initialize it in the default config
like our other settings.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 09:37:00 -05:00
8a5e103876 Merge pull request #2438 from vrothberg/scope-v2
[skip ci] readme/docs update
2019-02-26 15:27:11 +01:00
7fea0d7077 docs: cross-reference podman-{generate,play}-kube
Addresses: https://github.com/containers/libpod/pull/2428#discussion_r260200694
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-26 15:07:05 +01:00
2ce8a1c890 README: refine "Out of scope" section
Based on user feedback, refine the "Out of scope" section regarding
`docker-compose`:

* Explain why Podman uses Kubernetes YAML.
* Explain how `podman-play-kube` and `podman-generate-kube` fit into the
  picture.

Addresses: https://github.com/containers/libpod/pull/2428#discussion_r259996507
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-26 15:02:40 +01:00
02988f17f6 Merge pull request #2382 from adrianreber/selinux
Fix one (of two) SELinux denials during checkpointing
2019-02-26 14:26:48 +01:00
865fc27075 Merge pull request #2437 from giuseppe/runtime-nice-error
oci: improve error message when the OCI runtime is not found
2019-02-26 14:09:15 +01:00
446d333783 oci: improve error message when the OCI runtime is not found
We were previously returning the not so nice error directly from
conmon.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-26 11:40:34 +01:00
0a8a1deed1 Label CRIU log files correctly
CRIU creates a log file during checkpointing in .../userdata/dump.log.
The problem with this file is, is that CRIU injects a parasite code into
the container processes and this parasite code also writes to the same
log file. At this point a process from the inside of the container is
trying to access the log file on the outside of the container and
SELinux prohibits this. To enable writing to the log file from the
injected parasite code, this commit creates an empty log file and labels
the log file with c.MountLabel(). CRIU uses existing files when writing
it logs so the log file label persists and now, with the correct label,
SELinux no longer blocks access to the log file.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-02-26 11:28:54 +01:00
05450f3162 Merge pull request #2428 from vrothberg/docker-compose-out-of-scope
README: update "out of scope" section
2019-02-26 10:38:04 +01:00
f9ef82ee7c Merge pull request #2362 from mheon/add_locks_to_config
Add num_locks to the default libpod config
2019-02-26 10:37:59 +01:00
993b3a17c5 Merge pull request #2436 from baude/remotepodpause
podman-remote pod pause|unpause|restart
2019-02-26 10:14:35 +01:00
5b010ee58b Add num_locks to the default libpod config
Allow adjusting number of locks in libpod.conf via an already
available knob we previously didn't expose in the default config
file.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-25 17:43:25 -05:00
0416b3afc4 podman-remote pod pause|unpause|restart
enable the ability for the remote client to pause, unpause, and
restart pods.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-25 16:14:06 -06:00
cf521449e5 Merge pull request #2422 from baude/remotepodcreate
podman-remote create|ps
2019-02-25 21:57:42 +01:00
e45c442080 Merge pull request #2358 from rhatdan/namespace
Fix up handling of user defined network namespaces
2019-02-25 21:31:50 +01:00
6fc18e7d07 Merge pull request #2432 from giuseppe/fix-read-only-bind-mounts
podman: fix ro bind mounts if no* opts are on the source
2019-02-25 20:23:08 +01:00
26ce470e7f Merge pull request #2424 from vrothberg/update-buildah-description
[skip-ci] README.md: rephrase Buildah description
2019-02-25 20:23:03 +01:00
bf3b68b128 Merge pull request #2421 from rhatdan/rmi
Change exit code to 1 on podman rmi nosuch image
2019-02-25 19:48:47 +01:00
0f5ae3c5af podman: fix ro bind mounts if no* opts are on the source
This is a workaround for the runc issue:

https://github.com/opencontainers/runc/issues/1247

If the source of a bind mount has any of nosuid, noexec or nodev, be
sure to propagate them to the bind mount so that when runc tries to
remount using MS_RDONLY, these options are also used.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-25 18:56:09 +01:00
fe4c0c3780 Change exit code to 1 on podman rmi nosuch image
Make it easy for scripts to determine if an image removal
failure.   If only errors were no such image exit with 1
versus 125.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-25 12:49:27 -05:00
5d9c34d97c README.md: rephrase Buildah description
Rephrase the description of Buildah to make some core attributes
(e.g., rootless, Dockerfile-less build, etc.) more obvious.

Addresses: [#1349 (comment)](https://github.com/containers/buildah/issues/1349#issuecomment-466096550)
Cherry-pick-from: https://github.com/containers/buildah/pull/1362
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-25 18:26:00 +01:00
73cfb9f127 Merge pull request #2423 from rhatdan/rm
Change exit code to 1 on podman rm nosuch container
2019-02-25 18:16:50 +01:00
ed08352dfa Merge pull request #2417 from rhatdan/resolv.conf
In shared networkNS /etc/resolv.conf&/etc/hosts should be shared
2019-02-25 17:58:18 +01:00
af8f29b677 README: update "out of scope" section
Also mention that Podman does/will not support `docker-compose`.

Fixes: https://github.com/containers/libpod/issues/746#issuecomment-467011211
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-25 17:03:32 +01:00
12e2e6e702 Merge pull request #2429 from baude/maindups
remove duplicate commands in main
2019-02-25 16:50:40 +01:00
e41279b902 Change exit code to 1 on podman rm nosuch container
Make it easy for scripts to determine if a container removal
fails versus the container did not exist.

If only errors were no such container exit with 1 versus 125.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-25 10:31:04 -05:00
43a1686598 podman-remote create|ps
enable the podman-remote client to be able to create and list
pods on a remote system.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-25 09:10:09 -06:00
06cbf60d41 remove duplicate commands in main
kube was erronously being added as main subcommand multiple
times. it should not be a subcommand as it should live under
either play or generate.

also removing the addition of the volume command from the commands.go
to eliminate a duplicate.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-25 08:54:11 -06:00
9e70411ffc Merge pull request #2425 from vrothberg/update-issue-template
issue template: run `podman info --debug`
2019-02-25 15:31:27 +01:00
8505c39d25 issue template: run podman info --debug
Ask users to run podman-info with `--debug` to the exact git commit,
compiler and go version.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-25 11:57:02 +01:00
553ac800c8 Merge pull request #2419 from rhatdan/play
Fix play to show up in podman help
2019-02-24 21:33:15 +01:00
53b147d215 Merge pull request #2416 from rhatdan/network
Allow dns settings with --net=host
2019-02-24 21:33:05 +01:00
cc4adddeb7 Merge pull request #2413 from baude/remotepodstop
Enable more podman-remote pod commands
2019-02-24 03:13:25 +01:00
8e4be923b8 Merge pull request #2400 from rhatdan/pull
Switch defaults for podman build versus buildah
2019-02-23 23:01:07 +01:00
3642ce837f Fix play to show up in podman help
Also change generate cli calls to match other commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 16:16:41 -05:00
3825db5aee Merge pull request #2404 from baude/remoteerrors
make remote-client error messaging more robust
2019-02-23 22:10:03 +01:00
bcc6b773e6 Switch defaults for podman build versus buildah
Switch defaults for --layers, --force-rm and --pull-always
from buildah to podman.

Only override default values.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 15:57:24 -05:00
c83e78277a In shared networkNS /etc/resolv.conf&/etc/hosts should be shared
We should just bind mount the original containers /etc/resolv.conf and /etchosts
into the new container.  Changes in the resolv.conf and hosts should be seen
by all containers,  This matches Docker behaviour.

In order to make this work the labels on these files need to have a shared
SELinux label.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 07:52:10 -05:00
ba62683cbf Allow dns settings with --net=host
This seems to be a needless restriction.  We make a copy of the
hosts /etc/resolv.conf file, so these changes to not modify the
host.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 07:19:30 -05:00
0969d725a3 Merge pull request #2393 from giuseppe/reexec-into-same-wd
rootless: force same cwd when re-execing
2019-02-23 11:49:07 +01:00
b87bdced1f Fix up handling of user defined network namespaces
If user specifies network namespace and the /etc/netns/XXX/resolv.conf
exists, we should use this rather then /etc/resolv.conf

Also fail cleaner if the user specifies an invalid Network Namespace.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 05:47:27 -05:00
4bf973a9f6 Enable more podman-remote pod commands
enable pod start, stop, and kill subcommands for the remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-22 17:00:24 -06:00
b223d4e136 Merge pull request #2401 from TomSweeneyRedHat/dev/tsweeney/buildah1.7
Vendor Buildah v1.7
2019-02-22 23:56:06 +01:00
7e920e4865 tests, rootless: use relative path for export test
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-22 23:55:22 +01:00
8984ba7461 rootless: force same cwd when re-execing
when joining an existing namespace, we were not maintaining the
current working directory, causing commands like export -o to fail
when they weren't referring to absolute paths.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-22 23:55:21 +01:00
c00bf28f24 Merge pull request #2406 from rhatdan/errors
Exit with errors not just logging error
2019-02-22 23:30:13 +01:00