Commit graph

3120 commits

Author SHA1 Message Date
Matthew Heon 83db80ce17 Only remove image volumes when removing containers
When removing volumes with rm --volumes we want to only remove
volumes that were created with the container. Volumes created
separately via 'podman volume create' should not be removed.

Also ensure that --rm implies volumes will be removed.

Fixes #2441

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 12:16:58 -05:00
OpenShift Merge Robot 0e252f0437
Merge pull request #2439 from vrothberg/vendor-image
vendor containers/image v1.5
2019-02-26 17:20:44 +01:00
OpenShift Merge Robot 36df2e7073
Merge pull request #2397 from mheon/volume_path_fixes
Volume path fixes
2019-02-26 17:02:03 +01:00
Daniel J Walsh 507ab29cfe
Merge pull request #2289 from 4383/improve-hacking
[skip ci]Introduce how to start to hack on libpod.
2019-02-26 10:10:05 -05:00
Valentin Rothberg ffe7e49698 vendor containers/image v1.5
Fixes are race condition in the blobinfocache when copying images
leading to a panic().

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-26 15:55:20 +01:00
Matthew Heon ba6f1acf07 Record when volume path is explicitly set in config
This ensures we won't overwrite it when it's set in the config we
load from disk.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 09:38:02 -05:00
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
OpenShift Merge Robot 8a5e103876
Merge pull request #2438 from vrothberg/scope-v2
[skip ci] readme/docs update
2019-02-26 15:27:11 +01:00
Valentin Rothberg 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
Valentin Rothberg 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
OpenShift Merge Robot 02988f17f6
Merge pull request #2382 from adrianreber/selinux
Fix one (of two) SELinux denials during checkpointing
2019-02-26 14:26:48 +01:00
OpenShift Merge Robot 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
Giuseppe Scrivano 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
Adrian Reber 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
OpenShift Merge Robot 993b3a17c5
Merge pull request #2436 from baude/remotepodpause
podman-remote pod pause|unpause|restart
2019-02-26 10:14:35 +01:00
Matthew Heon 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
baude 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
OpenShift Merge Robot cf521449e5
Merge pull request #2422 from baude/remotepodcreate
podman-remote create|ps
2019-02-25 21:57:42 +01:00
OpenShift Merge Robot e45c442080
Merge pull request #2358 from rhatdan/namespace
Fix up handling of user defined network namespaces
2019-02-25 21:31:50 +01:00
OpenShift Merge Robot 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
Giuseppe Scrivano 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
Daniel J Walsh 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
Valentin Rothberg 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
Valentin Rothberg 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
OpenShift Merge Robot 12e2e6e702
Merge pull request #2429 from baude/maindups
remove duplicate commands in main
2019-02-25 16:50:40 +01:00
Daniel J Walsh 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
baude 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
baude 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
OpenShift Merge Robot 9e70411ffc
Merge pull request #2425 from vrothberg/update-issue-template
issue template: run `podman info --debug`
2019-02-25 15:31:27 +01:00
Valentin Rothberg 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
OpenShift Merge Robot 553ac800c8
Merge pull request #2419 from rhatdan/play
Fix play to show up in podman help
2019-02-24 21:33:15 +01:00
OpenShift Merge Robot 53b147d215
Merge pull request #2416 from rhatdan/network
Allow dns settings with --net=host
2019-02-24 21:33:05 +01:00
OpenShift Merge Robot cc4adddeb7
Merge pull request #2413 from baude/remotepodstop
Enable more podman-remote pod commands
2019-02-24 03:13:25 +01:00
OpenShift Merge Robot 8e4be923b8
Merge pull request #2400 from rhatdan/pull
Switch defaults for podman build versus buildah
2019-02-23 23:01:07 +01:00
Daniel J Walsh 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
OpenShift Merge Robot 3825db5aee
Merge pull request #2404 from baude/remoteerrors
make remote-client error messaging more robust
2019-02-23 22:10:03 +01:00
Daniel J Walsh 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
Daniel J Walsh 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
Daniel J Walsh 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
OpenShift Merge Robot 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