3860 Commits

Author SHA1 Message Date
c86647d203 Begin adding volume tests
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:19:05 -04:00
30257cf073 Ensure that named volumes have their options parsed
This involves moving some code out of pkg/spec/ into util/ so it
can also be used by libpod.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:19:05 -04:00
2698c82240 Add options parsing for tmpfs mounts
This ensures that all tmpfs mounts added by the user, even with
the --mount flag, share a few common options (nosuid, noexec,
nodev), and options for tmpfs mounts are properly validated to
ensure they are correct.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:19:05 -04:00
7a421a807c Use EqualValues instead of reflect equality
Same result, but notably better error messages when things go
wrong.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:19:05 -04:00
13451cab5c Hit a number of to-do comments in unified volumes code
As part of this, move bind mount option validity parsing and
modification (adding e.g. rbind on bind mounts that are missing
it), which requires test changes (expected values have changed).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:19:05 -04:00
70beb57faa Fix options for non-bind and non-tmpfs volumes
We were unconditionally resetting volume mount options for all
mount points (and by the looks of things, completely dropping
tmpfs mounts), which was causing runc to refuse to run containers
and all the tests to consequently fail.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:19:05 -04:00
2e00d417dd Migrate unit tests from cmd/podman into pkg/spec
Several changes made in the interface of pkg/spec make
interacting with it without a runtime difficult to impossible,
so move the existing limited testing from cmd/podman (which
mostly tested pkg/spec) into pkg/spec itself where we can call
individual functions that don't break things.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:19:05 -04:00
9ee50fe2c7 Migrate to unified volume handling code
Unify handling for the --volume, --mount, --volumes-from, --tmpfs
and --init flags into a single file and set of functions. This
will greatly improve readability and maintainability.

Further, properly handle superceding and conflicting mounts. Our
current patchwork has serious issues when mounts conflict, or
when a mount from --volumes-from or an image volume should be
overwritten by a user volume or named volume.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:19:05 -04:00
71f65ab07f Always pass pod into MakeContainerConfig
Play kube was passing the pod, but CreateConfig was not. Unify it
so they both do, so we can remove some unnecessary duplicate
lookup code.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:16:23 -04:00
4540458a5e Remove non-config fields from CreateConfig
The goal here is to keep only the configuration directly used to
build the container in CreateConfig, and scrub temporary state
and helpers that we need to generate. We'll keep those internally
in MakeContainerConfig.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:16:23 -04:00
869466eb25 Add a new function for converting a CreateConfig
Right now, there are two major API calls necessary to turn a
filled-in CreateConfig into the options and OCI spec necessary to
make a libpod Container. I'm intending on refactoring both of
these extensively to unify a few things, so make a common
frontend to both that will prevent API changes from leaking out
of the package.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:16:23 -04:00
eea77b5ae3 Merge pull request #3018 from jamescassell/auto-http-proxy
Auto http proxy
2019-05-01 14:51:55 +02:00
354d80626a auto pass http_proxy into container
Signed-off-by: James Cassell <code@james.cassell.me>
2019-04-30 17:29:29 -04:00
39c937ee45 Merge pull request #3038 from mheon/update_readme_rootless
Add details on rootless Podman to the readme
2019-04-30 21:08:27 +02:00
c0d3c51309 Merge pull request #3043 from mheon/sudo_tee
Use 'sudo tee' in tutorial so install works as non-root
2019-04-30 20:59:27 +02:00
8e84291643 Merge pull request #2992 from cevich/collect_audit_log
Cirrus: Collect audit log on success and failure
2019-04-30 20:41:29 +02:00
e509eb25e7 Merge pull request #2995 from jwhonce/wip/cleanup
Refactor container cleanup to use latest functions
2019-04-30 20:10:27 +02:00
75189d5b97 Merge pull request #3026 from baude/remotestartattach
Fix remote-client testing reports
2019-04-30 19:48:27 +02:00
3cdb98a282 Use 'sudo tee' in tutorial so install works as non-root
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-30 13:26:57 -04:00
1b2419ceb1 Refactor container cleanup to use latest functions
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-04-30 08:21:14 -07:00
488117cb99 Merge pull request #3040 from TomSweeneyRedHat/dev/tsweeney/fixrunmd
Move --mount in run man page
2019-04-30 15:55:29 +02:00
084e4e16a1 Merge pull request #2982 from baude/remotecontainerprune
podman-remote prune containers
2019-04-30 15:16:29 +02:00
ce848375ec Move --mount in run man page
The `--mount` options was after the `--uts` option in the man page
for run.  This moves it up into alphabetical order.  No other changes
to the text.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-04-29 19:38:00 -04:00
6e3f300fd3 Add details on rootless Podman to the readme
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-29 17:16:36 -04:00
a2fd2d2c32 Merge pull request #3032 from baude/remotestop
podman-remote stop
2019-04-29 14:12:28 -07:00
151c8487a3 podman-remote stop
add stop to the container subcommands for the remote client. the stop
function is already done.  this is a graphical change only.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-29 12:18:11 -05:00
b5af10ce5a Merge pull request #3036 from baude/behave
correct upstream vndr issues
2019-04-29 08:43:17 -07:00
4506e4916f correct upstream vndr issues
Signed-off-by: baude <bbaude@redhat.com>
2019-04-29 10:32:22 -05:00
4e5b39650d Merge pull request #3015 from QiWang19/credsH
fix login supports credHelpers config
2019-04-29 07:29:36 -07:00
627bfd07d2 Merge pull request #3016 from rhatdan/vendor
Vendor in latest containers/storage and containers/buildah
2019-04-29 07:11:20 -07:00
e0312334cc Merge pull request #3025 from rhatdan/read-only
Add --read-only-tmpfs options
2019-04-29 02:38:14 -07:00
fe3acddcbe Merge pull request #2950 from giuseppe/podman-system-migrate
system: add new subcommand "migrate"
2019-04-26 15:28:15 -07:00
f49e0c19ed runtime: pass down the context
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-26 22:23:49 +02:00
525f0b30ac system: add new subcommand "migrate"
it is useful to migrate existing containers to a new version of
podman.  Currently, it is needed to migrate rootless containers that
were created with podman <= 1.2 to a newer version which requires all
containers to be running in the same user namespace.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-26 22:23:45 +02:00
0a64268752 Vendor in latest buildah code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-26 14:38:25 -04:00
b6e2cbad0a Merge pull request #3028 from baude/removemanualinstall
remove manual install of libsystemd-dev
2019-04-26 11:34:25 -07:00
e8ede74f5e Merge pull request #3019 from mheon/system_events
Add System event type and renumber, refresh events
2019-04-26 11:16:27 -07:00
499767eefd remove manual install of libsystemd-dev
Signed-off-by: baude <bbaude@redhat.com>
2019-04-26 13:05:40 -05:00
29c65d0ae4 Vendor in latest containers/storage
Should fix the issue on Windows platform.

Lots of other fixes and enhancements.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-26 13:06:27 -04:00
3a4be4b66c Add --read-only-tmpfs options
The --read-only-tmpfs option caused podman to mount tmpfs on /run, /tmp, /var/tmp
if the container is running int read-only mode.

The default is true, so you would need to execute a command like

--read-only --read-only-tmpfs=false to turn off this behaviour.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-26 12:29:10 -04:00
a85155617f Merge pull request #2991 from cevich/libsystemd_dev
Libsystemd dev + newer runc
2019-04-26 09:00:45 -07:00
4f2666bec0 Fix remote-client testing reports
Ensure when using remote attach --no-stdin a mock device is used to
prevent stdin and not nil.  This fixes issue #3009.

When starting a container with the remote client, if the container is
already running and the user asks to attach, we should just attach.
This fixes issue #3011

Signed-off-by: baude <bbaude@redhat.com>
2019-04-26 10:39:29 -05:00
2e800d63aa podman-remote prune containers
enable the ability to prune containers from the remote-command.  this
also includes the system prune command.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-26 10:15:09 -05:00
e05af78329 Do not hard fail on non-decodable events
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-26 10:50:57 -04:00
135c8bef22 Merge pull request #3023 from vrothberg/update-psgo
update psgo to v1.2.1
2019-04-26 06:35:28 -07:00
01ae700a17 update psgo to v1.2.1
* move to go modules
* fix ErrUnkownDescriptor typo
* catch errors of Setns()

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-04-26 12:47:02 +02:00
e2d7e325f4 Merge pull request #3014 from baude/remotetop
enable podman remote top
2019-04-25 15:01:39 -07:00
04d6ff0582 Add System event type and renumber, refresh events
Also, re-add locking to file eventer Write() to protect against
concurrent events.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-25 16:23:09 -04:00
c4dd7c5813 enable podman remote top
add the ability for the remote client to display a container's running
processes.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-25 14:44:14 -05:00
a01c62fcbd Merge pull request #3013 from mheon/logging_for_refresh
Logging for refresh
2019-04-25 12:43:43 -07:00