summaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
* Merge pull request #5427 from containers/systemd-defaultMatthew Heon2020-03-09
|\ | | | | generate systemd: add `default.target` to INSTALL
| * generate systemd: add `default.target` to INSTALLValentin Rothberg2020-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When enabling a systemd service we can specify which target will start it by specifying it in the `[INSTALL]` section. In case of root, this is commonly set to `multi-user.target` which is used to start other essential system services such as the network manager, D-BUS and more. However, the `multi-user.target` is not enough on all systems, especially when running rootless and enabling user services. Multiple users have reported issues that there isn't even an attempt to start the service. Setting the INSTALL target to `default.target` will fix the rootless case. However, `default.target` may vary among systems. Fedora Workstation, for instance, sets the `default.target` to the graphical target (i.e., runlevel 5) while Fedora Server sets it to `multi-user.target` which is on runlevel 2 and hence way earlier in the startup sequence. As INSTALL allows for specifying multiple INSTALL targets, we can set it to `multi-user.target` to continue supporting existing workloads AND to `default.target` which MAY redundantly attempt to start it at a later point; effectively a NOP for the root case and essential for rootless. Fixes: #5423 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | use storage/pkg/ioutilsValentin Rothberg2020-03-09
|/ | | | Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #5412 from rhatdan/tmpdirOpenShift Merge Robot2020-03-08
|\ | | | | Allow users to set TMPDIR environment
| * Allow users to set TMPDIR environmentDaniel J Walsh2020-03-06
| | | | | | | | | | | | | | Some users have small /var/tmp directories and need to be able to specify a different location for temporary files, which includes more space. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Fix spelling mistakes in code found by codespellDaniel J Walsh2020-03-07
| | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #5374 from baude/createOpenShift Merge Robot2020-03-07
|\ \ | | | | | | add default network for apiv2 create
| * | add default network for apiv2 createBrent Baude2020-03-06
| |/ | | | | | | | | | | | | | | | | | | | | | | | | during container creation, if no network is provided, we need to add a default value so the container can be later started. use apiv2 container creation for RunTopContainer instead of an exec to the system podman. RunTopContainer now also returns the container id and an error. added a libpod commit endpoint. also, changed the use of the connections and bindings slightly to make it more convenient to write tests. Fixes: 5366 Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #5410 from st1971/api-fixesOpenShift Merge Robot2020-03-06
|\ \ | |/ |/| APIv2: compatible api fixes
| * Removed extraneous comments and defaults plus amended variable declarationSteve Taylor2020-03-06
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Removed the unnecessary codeSteve Taylor2020-03-06
| | | | | | | | | | | | | | removed defaulting of query.Size amended types.LibpodToContainer, removed hard coded true from inspect call Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Implemented size parameter on GetContainerSteve Taylor2020-03-05
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Implement size parameter on ListContainersSteve Taylor2020-03-05
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Map configured status to created to match docker API statesSteve Taylor2020-03-05
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Fix to remove null entry from end of images jsonSteve Taylor2020-03-05
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
| * Register handlers without version to align with docker APISteve Taylor2020-03-05
| | | | | | | | Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
* | golangci: enable goimportsValentin Rothberg2020-03-05
|/ | | | | | Enable the goimports linter and fix reports. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* generate systemd: remove leading slashesValentin Rothberg2020-03-05
| | | | | | | | | Remove leading slashes from the run-dir paths. It was meant to make it explicit that we're dealing with an absolute path but user feedback has shown that most are aware. It also cleans up the path in the systemctl status output. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #5382 from vrothberg/systemd-networkOpenShift Merge Robot2020-03-05
|\ | | | | generate systemd: add network dependencies
| * generate systemd: add network dependenciesValentin Rothberg2020-03-03
| | | | | | | | | | | | | | | | Add network dependencies to generated systemd services to allow for enabling them at system startup and have a working network if needed. Fixes: #4130 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #5381 from vrothberg/ENVFIXOpenShift Merge Robot2020-03-04
|\ \ | | | | | | env: set "container" to current binary
| * | env: don't set "container" envValentin Rothberg2020-03-04
| | | | | | | | | | | | | | | | | | | | | | | | Leave setting the "container" variable to consumers of pkg/env. Podman is now hard-setting it to "podman" while "libpod" will set it internally to "libpod" if it's unset. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #5385 from baude/makemapOpenShift Merge Robot2020-03-04
|\ \ \ | | | | | | | | avoid adding to nil map
| * | | avoid adding to nil mapBrent Baude2020-03-03
| | |/ | |/| | | | | | | | | | | | | we need to make the environment map to avoid throwing an error when trying to add an environment value from file. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #4772 from boaz0/closes_4628OpenShift Merge Robot2020-03-04
|\ \ \ | |/ / |/| | Add the rmi flag to podman-run to delete container image
| * | Add the rmi flag to podman-run to delete container imageBoaz Shuster2020-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --rmi flag will delete the container image after its execution unless that image is already been used by another container(s). This is useful when one wants to execute a container once and remove any resources attached to it. Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
* | | Merge pull request #5206 from rhatdan/capabilitiesOpenShift Merge Robot2020-03-03
|\ \ \ | |_|/ |/| | Allow devs to set labels in container images for default capabilities.
| * | Allow devs to set labels in container images for default capabilities.Daniel J Walsh2020-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows users to specify the list of capabilities required to run their container image. Setting a image/container label "io.containers.capabilities=setuid,setgid" tells podman that the contained image should work fine with just these two capabilties, instead of running with the default capabilities, podman will launch the container with just these capabilties. If the user or image specified capabilities that are not in the default set, the container will print an error message and will continue to run with the default capabilities. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | consolidate env handling into pkg/envValentin Rothberg2020-03-03
| |/ |/| | | | | | | | | | | | | | | Env-variable related code is scattered across several packages making it hard to maintain and extend. Consolidate the code into a new pkg/env package. Signed-off-by: Valentin Rothberg <rothberg@redhat.com> Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #5371 from edsantiago/apiv2_fixesOpenShift Merge Robot2020-03-02
|\ \ | |/ |/| more swagger fixes
| * more swagger fixesEd Santiago2020-03-02
| | | | | | | | Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #5347 from baude/apiv2waitOpenShift Merge Robot2020-03-02
|\ \ | |/ |/| rework apiv2 wait endpoint|binding
| * rework apiv2 wait endpoint|bindingBrent Baude2020-02-28
| | | | | | | | | | | | | | | | added the ability to wait on a condition (stopped, running, paused...) for a container. if a condition is not provided, wait will default to the stopped condition which uses the original wait code paths. if the condition is stopped, the container exit code will be returned. also, correct a mux issue we discovered. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #5343 from lsm5/fix-exists-urlOpenShift Merge Robot2020-03-02
|\ \ | | | | | | container Exists: fix URL
| * | container Exists: fix URLLokesh Mandvekar2020-02-27
| | | | | | | | | | | | Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
* | | Merge pull request #5320 from sujil02/podtestOpenShift Merge Robot2020-03-02
|\ \ \ | | | | | | | | Add test to validate prune pod apiv2 binding.
| * | | Update pod bindings and Add test to validate prune pod apiv2 binding.Sujil022020-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify the pod inspect bindings to hold current pod status. Includes test to validate on pod status and added test to check no or few pods are pruned,if the pods are in exited state. Signed-off-by: Sujil02 <sushah@redhat.com>
* | | | Fix wrong condition in bindings testChris Evich2020-02-28
| |_|/ |/| | | | | | | | | | | | | | Thanks for Brent Baude <bbaude@redhat.com> for the fix. Signed-off-by: Chris Evich <cevich@redhat.com>
* | | Merge pull request #5348 from baude/cninetfixOpenShift Merge Robot2020-02-27
|\ \ \ | | | | | | | | Cninetfix
| * | | network create should use firewall pluginBrent Baude2020-02-27
| | |/ | |/| | | | | | | | | | | | | when creating a network, podman should add the firewall plugin to the config but not specify a backend. this will allow cni to determine whether it should use an iptables|firewalld backend. Signed-off-by: Brent Baude <bbaude@redhat.com>
* / | binding tests for volumesBrent Baude2020-02-27
|/ / | | | | | | | | | | | | | | add binding tests for volumes: inspect(get), create, remove, prune, and list implement filters ability for volumes Signed-off-by: Brent Baude <bbaude@redhat.com>
* | spec: allow container alias name in lookupGiuseppe Scrivano2020-02-26
| | | | | | | | | | | | | | | | Previously --uts=container: expected the full container ID. Closes: https://github.com/containers/libpod/issues/5289 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #5328 from lsm5/trivial-typo-correctionOpenShift Merge Robot2020-02-25
|\ \ | | | | | | fix trivial typo
| * | fix trivial typoLokesh Mandvekar2020-02-25
| | | | | | | | | | | | Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
* | | Merge pull request #5326 from jwhonce/issues/5311OpenShift Merge Robot2020-02-25
|\ \ \ | | | | | | | | Remove 1 sec delay
| * | | Remove 1 sec delayJhon Honce2020-02-25
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | * Stop closing net.Listener() twice on interrupt * Do not report error if closing server twice Fixes #5311 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | Merge pull request #3901 from cevich/support_f31OpenShift Merge Robot2020-02-25
|\ \ \ | | | | | | | | Cirrus: Support testing with F31
| * | | Temp. skip "remove pause by id" bindings testChris Evich2020-02-25
| |/ / | | | | | | | | | Signed-off-by: Chris Evich <cevich@redhat.com>
* | | Merge pull request #5324 from giuseppe/fix-running-no-pauseOpenShift Merge Robot2020-02-25
|\ \ \ | | | | | | | | rootless: raise error if the process is not found
| * | | rootless: become root only if the pause file is specifiedGiuseppe Scrivano2020-02-25
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we need to store the pause process PID file so that it can be re-used later. commit e9dc2120925d9bc32b87ed3c4122aa40f7413db5 introduced this regression. Closes: https://github.com/containers/libpod/issues/5246 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>