Commit graph

3853 commits

Author SHA1 Message Date
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
OpenShift Merge Robot eea77b5ae3
Merge pull request #3018 from jamescassell/auto-http-proxy
Auto http proxy
2019-05-01 14:51:55 +02:00
James Cassell 354d80626a auto pass http_proxy into container
Signed-off-by: James Cassell <code@james.cassell.me>
2019-04-30 17:29:29 -04:00
OpenShift Merge Robot 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
OpenShift Merge Robot e509eb25e7
Merge pull request #2995 from jwhonce/wip/cleanup
Refactor container cleanup to use latest functions
2019-04-30 20:10:27 +02:00
OpenShift Merge Robot 75189d5b97
Merge pull request #3026 from baude/remotestartattach
Fix remote-client testing reports
2019-04-30 19:48:27 +02:00
Matthew Heon 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
Jhon Honce 1b2419ceb1 Refactor container cleanup to use latest functions
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-04-30 08:21:14 -07:00
OpenShift Merge Robot 488117cb99
Merge pull request #3040 from TomSweeneyRedHat/dev/tsweeney/fixrunmd
Move --mount in run man page
2019-04-30 15:55:29 +02:00
OpenShift Merge Robot 084e4e16a1
Merge pull request #2982 from baude/remotecontainerprune
podman-remote prune containers
2019-04-30 15:16:29 +02:00
TomSweeneyRedHat 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
Matthew Heon 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
OpenShift Merge Robot a2fd2d2c32
Merge pull request #3032 from baude/remotestop
podman-remote stop
2019-04-29 14:12:28 -07:00
baude 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
OpenShift Merge Robot b5af10ce5a
Merge pull request #3036 from baude/behave
correct upstream vndr issues
2019-04-29 08:43:17 -07:00
baude 4506e4916f correct upstream vndr issues
Signed-off-by: baude <bbaude@redhat.com>
2019-04-29 10:32:22 -05:00
OpenShift Merge Robot 4e5b39650d
Merge pull request #3015 from QiWang19/credsH
fix login supports credHelpers config
2019-04-29 07:29:36 -07:00
OpenShift Merge Robot 627bfd07d2
Merge pull request #3016 from rhatdan/vendor
Vendor in latest containers/storage and containers/buildah
2019-04-29 07:11:20 -07:00
OpenShift Merge Robot e0312334cc
Merge pull request #3025 from rhatdan/read-only
Add --read-only-tmpfs options
2019-04-29 02:38:14 -07:00
OpenShift Merge Robot fe3acddcbe
Merge pull request #2950 from giuseppe/podman-system-migrate
system: add new subcommand "migrate"
2019-04-26 15:28:15 -07:00
Giuseppe Scrivano f49e0c19ed
runtime: pass down the context
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-26 22:23:49 +02:00
Giuseppe Scrivano 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
Daniel J Walsh 0a64268752
Vendor in latest buildah code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-26 14:38:25 -04:00
OpenShift Merge Robot b6e2cbad0a
Merge pull request #3028 from baude/removemanualinstall
remove manual install of libsystemd-dev
2019-04-26 11:34:25 -07:00
OpenShift Merge Robot 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
baude 499767eefd remove manual install of libsystemd-dev
Signed-off-by: baude <bbaude@redhat.com>
2019-04-26 13:05:40 -05:00
Daniel J Walsh 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
Daniel J Walsh 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
OpenShift Merge Robot a85155617f
Merge pull request #2991 from cevich/libsystemd_dev
Libsystemd dev + newer runc
2019-04-26 09:00:45 -07:00
baude 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
baude 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
Matthew Heon 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
OpenShift Merge Robot 135c8bef22
Merge pull request #3023 from vrothberg/update-psgo
update psgo to v1.2.1
2019-04-26 06:35:28 -07:00
Valentin Rothberg 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
OpenShift Merge Robot e2d7e325f4
Merge pull request #3014 from baude/remotetop
enable podman remote top
2019-04-25 15:01:39 -07:00
Matthew Heon 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
baude 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
OpenShift Merge Robot a01c62fcbd
Merge pull request #3013 from mheon/logging_for_refresh
Logging for refresh
2019-04-25 12:43:43 -07:00
OpenShift Merge Robot 01e79477ca
Merge pull request #2850 from baude/eventsjournald
journald event logging
2019-04-25 12:20:39 -07:00
OpenShift Merge Robot e900e95f9a
Merge pull request #2990 from nalind/image-parent-child
image: rework parent/child/history matching
2019-04-25 11:16:45 -07:00
Qi Wang 6f08e6c3d1 fix login supports credHelpers config
Skip the error if login can't find credentials in credHelpers with credHelpers configed in auth.json and podman login will store the credentials in credHelpers later.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-04-25 13:48:55 -04:00
Chris Evich 3d6f787d7d
Cirrus: Collect audit log on success and failure
Also rename `master_script` -> `failed_master_script` to clarify it's
"place in the line" when viewing (Cirrus WebUI)

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-25 11:32:47 -04:00
Matthew Heon 0df9f6f9fe Add a debug message indicating that a refresh occurred
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-25 11:29:16 -04:00
OpenShift Merge Robot 36f479097d
Merge pull request #3005 from rhatdan/vendor
Update vendor of container/storage
2019-04-25 08:26:13 -07:00
OpenShift Merge Robot d08efde586
Merge pull request #2975 from kunalkushwaha/containerized-podman-remote-build
build podman-remote with Dockerfile.
2019-04-25 06:28:53 -07:00