summaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
* Merge pull request #9178 from Luap99/fix-9176OpenShift Merge Robot2021-02-01
|\ | | | | Fix podman generate systemd --new special char handling
| * Fix podman generate systemd --new special char handlingPaul Holzinger2021-02-01
| | | | | | | | | | | | | | | | | | | | In a systemd unit dollar and percent signs are used for variables. A backslash is used for escape sequences. If any of these characters are used in the create command we have to properly escape them so systemd does not try to interpret them. Fixes #9176 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Merge pull request #9051 from rhatdan/rmOpenShift Merge Robot2021-02-01
|\ \ | |/ |/| Switch podman stop/kill/wait handlers to use abi
| * Switch podman stop/kill/wait handlers to use abiDaniel J Walsh2021-01-29
| | | | | | | | | | | | | | | | | | | | | | | | Change API Handlers to use the same functions that the local podman uses. At the same time: implement remote API for --all and --ignore flags for podman stop implement remote API for --all flags for podman stop Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #9173 from mlegenovic/api_fixesOpenShift Merge Robot2021-02-01
|\ \ | | | | | | Endpoint that lists containers does not return correct Status value
| * | Endpoint that lists containers does not return correct Status valueMilivoje Legenovic2021-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Eclipse and Intellij Docker plugin determines the state of the container via the Status field, returned from /containers/json call. Podman always returns empty string, and because of that, both IDEs show the wrong state of the container. Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
* | | Docker ignores mount flags that begin with constencyDaniel J Walsh2021-01-30
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1915332 ``` According to the Docker docs, the consistency option should be ignored on Linux. the possible values are 'cached', 'delegated', and 'consistent', but they should be ignored equally. This is a widely used option in scripts run by developer machines, as this makes file I/O less horribly slow on MacOS. ``` Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #9150 from baude/playkubednsOpenShift Merge Robot2021-01-29
|\ \ | |/ |/| Honor custom DNS in play|generate kube
| * Honor custom DNS in play|generate kubebaude2021-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when creating kubernetes yaml from containers and pods, we should honor any custom dns settings the user provided. in the case of generate kube, these would be provided by --dns, --dns-search, and --dns-opt. if multiple containers are involved in the generate, the options will be cumulative and unique with the exception of dns-opt. when replaying a kube file that has kubernetes dns information, we now also add that information to the pod creation. the options for dnspolicy is not enabled as there seemed to be no direct correlation between kubernetes and podman. Fixes: #9132 Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #9149 from rhatdan/docsOpenShift Merge Robot2021-01-29
|\ \ | | | | | | Podman-remote push can support --format
| * | Podman-remote push can support --formatDaniel J Walsh2021-01-29
| | | | | | | | | | | | | | | | | | | | | | | | Fix man page to document podman push --format fully. Also found that push was not handling the tlsverify so fixed this. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #9133 from rhatdan/pull1OpenShift Merge Robot2021-01-29
|\ \ \ | |/ / |/| | Cleanup bindings for image pull
| * | Cleanup bindings for image pullDaniel J Walsh2021-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove bindings that are not handled over the API. Leaving this one to not use image pull, since this would break progress handling. We should revisit this in the future. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #9110 from rhatdan/cgroupsOpenShift Merge Robot2021-01-28
|\ \ \ | |_|/ |/| | Don't fail if one of the cgroups is not setup
| * | Don't fail if one of the cgroups is not setupDaniel J Walsh2021-01-27
| |/ | | | | | | | | | | | | | | | | | | | | It is fairly common for certain cgroups controllers to not be enabled on a system. We should Warn when this happens versus failing, when doing podman stats command. This way users can get information from the other controllers. Fixes: https://github.com/containers/podman/issues/8588 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #9115 from rhatdan/pullOpenShift Merge Robot2021-01-28
|\ \ | | | | | | Switch podman image push handlers to use abi
| * | Switch podman image push handlers to use abiDaniel J Walsh2021-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change API Handlers to use the same functions that the local podman uses. At the same time: Cleanup and pass proper bindings. Remove cli options from podman-remote push. Cleanup manifest push. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Allow static ip and mac with rootless cni networkPaul Holzinger2021-01-27
| |/ |/| | | | | | | | | | | | | Make sure we pass the ip and mac address as CNI_ARGS to the cnitool which is executed in the rootless-cni-infra container. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | podman-remote ps --external --pod --sort do not work.Daniel J Walsh2021-01-27
|/ | | | | | | | | | Fixup the bindings and the handling of the --external --por and --sort flags. The --storage option was renamed --external, make sure we use external up and down the stack. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #9101 from gbraad/console-mode-messageOpenShift Merge Robot2021-01-27
|\ | | | | Fix #9100 Change console mode message to debug
| * Fix #9100 Change console mode message to debugGerard Braad2021-01-27
| | | | | | | | | | | | [NO TESTS NEEDED] Signed-off-by: Gerard Braad <me@gbraad.nl>
* | Merge pull request #9029 from mergetb/masterOpenShift Merge Robot2021-01-26
|\ \ | | | | | | [CI:DOCS] api: fix import image swagger definition
| * | api: fix import image swagger definitionRyan Goodfellow2021-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | The podman API implementation only accepts image uploads with the applicatoin/x-tar content type, however the generated swagger documentation currently states this should be a form encoded file with the content type application/x-www-form-urlencoded which does not work. Signed-off-by: Ryan Goodfellow <rgoodfel@isi.edu>
* | | Merge pull request #9054 from vrothberg/fix-9040OpenShift Merge Robot2021-01-26
|\ \ \ | | | | | | | | make sure the workdir exists on container mount
| * | | workdir presence checksValentin Rothberg2021-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A container's workdir can be specified via the CLI via `--workdir` and via an image config with the CLI having precedence. Since images have a tendency to specify workdirs without necessarily shipping the paths with the root FS, make sure that Podman creates the workdir. When specified via the CLI, do not create the path, but check for its existence and return a human-friendly error. NOTE: `crun` is performing a similar check that would yield exit code 127. With this change, however, Podman performs the check and yields exit code 126. Since this is specific to `crun`, I do not consider it to be a breaking change of Podman. Fixes: #9040 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | libpod: add (*Container).ResolvePath()Valentin Rothberg2021-01-26
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Add an API to libpod to resolve a path on the container. We can refactor the code that was originally written for copy. Other functions are requiring a proper path resolution, so libpod seems like a reasonable home for sharing that code. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #9070 from rhatdan/searchOpenShift Merge Robot2021-01-26
|\ \ \ | | | | | | | | Fixup search
| * | | Fixup searchDaniel J Walsh2021-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | podman-remote search had some FIXMEs in tests that were failing. So I reworked the search handler to use the local abi. This means the podman search and podman-remote search will use the same functions. While doing this, I noticed we were just outputing errors via logrus.Error rather then returning them, which works ok for podman but the messages get lost on podman-remote. Changed the code to actually return the error messages to the caller. This allows us to turn on the remaining podman-remote FIXME tests. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #9084 from rhatdan/overrideOpenShift Merge Robot2021-01-26
|\ \ \ \ | |_|/ / |/| | | Fix --arch and --os flags to work correctly
| * | | Fix --arch and --os flags to work correctlyDaniel J Walsh2021-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently podman implements --override-arch and --overide-os But Podman has made these aliases for --arch and --os. No reason to have to specify --override, since it is clear what the user intends. Currently if the user specifies an --override-arch field but the image was previously pulled for a different Arch, podman run uses the different arch. This PR also fixes this issue. Fixes: https://github.com/containers/podman/issues/8001 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Ensure shutdown handler access is syncronizedMatthew Heon2021-01-25
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a potential race where two handlers could be added at the same time. Go Maps are not thread-safe, so that could do unpleasant things. Add a mutex to keep things safe. Also, swap the order or Register and Start for the handlers in Libpod runtime created. As written, there was a small gap between Start and Register where SIGTERM/SIGINT would be completely ignored, instead of stopping Podman. Swapping the two closes this gap. Signed-off-by: Matthew Heon <mheon@redhat.com>
* / / swagger.go: Fix compilation errorReinhard Tartler2021-01-24
|/ / | | | | | | | | | | | | | | | | | | | | Error looks like: # github.com/containers/podman/pkg/api/handlers/swagger src/github.com/containers/podman/pkg/api/handlers/swagger/swagger.go:169:3: undefined: libpod.InspectVolumeData [NO TESTS NEEDED] Signed-off-by: Reinhard Tartler <siretart@tauware.de>
* | Merge pull request #9028 from mlegenovic/masterOpenShift Merge Robot2021-01-23
|\ \ | | | | | | Accept and ignore 'null' as value for X-Registry-Auth
| * | Accept and ignore 'null' as value for X-Registry-AuthMilivoje Legenovic2021-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | docker-client is a library written in Java and used in Eclipse to speak with Docker API. When endpoint /images/search is called, HTTP header attribute X-Registry-Auth has value "null". This is for sure wrong but Docker tolerates this value, and call works. With this patch call works also with Podman. #7857 Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
* | | podman manifest existsPaul Holzinger2021-01-22
|/ / | | | | | | | | | | Add podman manifest exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* / rootlessport: set source IP to slirp4netns deviceGiuseppe Scrivano2021-01-22
|/ | | | | | | | | set the source IP to the slirp4netns address instead of 127.0.0.1 when using rootlesskit. Closes: https://github.com/containers/podman/issues/5138 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Merge pull request #9027 from Luap99/podman-volume-existsOpenShift Merge Robot2021-01-21
|\ | | | | Podman volume exists
| * podman volume existsPaul Holzinger2021-01-21
| | | | | | | | | | | | Add podman volume exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Merge pull request #9036 from baude/composelogOpenShift Merge Robot2021-01-21
|\ \ | | | | | | Set log driver for compatibility containers
| * | Set log driver for compatability containersbaude2021-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when using the compatibility api to create containers, now reflect the use of k8s-file as json-file so that clients, which are unaware of k8s-file, can work. specifically, if the container is using k8s-file as the log driver, we change the log type in container inspection to json-file. These terms are used interchangably in other locations in libpod/podman. this fixes log messages in compose as well. [NO TESTS NEEDED] Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #9014 from rhatdan/rmOpenShift Merge Robot2021-01-20
|\ \ \ | |/ / |/| | Fix handling of container remove
| * | Fix handling of container removeDaniel J Walsh2021-01-20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found several problems with container remove podman-remote rm --all Was not handled podman-remote rm --ignore Was not handled Return better errors when attempting to remove an --external container. Currently we return the container does not exists, as opposed to container is an external container that is being used. This patch also consolidates the tunnel code to use the same code for removing the container, as the local API, removing duplication of code and potential problems. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* / Make generate systemd --new robust against double curly bracesPaul Holzinger2021-01-20
|/ | | | | | | | | | | If the container create command contains an argument with double curly braces the golang template parsing can fail since it tries to interpret the value as variable. To fix this change the default delimiter for the internal template to `{{{{`. Fixes #9034 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #9021 from Luap99/podman-network-existsOpenShift Merge Robot2021-01-19
|\ | | | | podman network exists
| * podman network existsPaul Holzinger2021-01-19
| | | | | | | | | | | | Add podman network exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Add binding options for container|pod existsbaude2021-01-18
|/ | | | | | | | It turns out an options was added to container exists so it makes sense to have pods and container exists calls have an optional structure for options. Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #8942 from rhatdan/pushOpenShift Merge Robot2021-01-17
|\ | | | | Allow podman push to push manifest lists
| * Allow podman push to push manifest listsDaniel J Walsh2021-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a podman images, manifests lists look just like images, so it is logical that users would assume that they can just podman push them to a registry. The problem is we throw out weird errors when this happens and users need to somehow figure out this is a manifest list rather then an image, and frankly the user will not understand the difference. This PR will make podman push just do the right thing, by failing over and attempting to push the manifest if it fails to push the image. Fix up handling of manifest push Protocol should bring back a digest string, which can either be printed or stored in a file. We should not reimplement the manifest push setup code in the tunnel code but take advantage of the api path, to make sure remote and local work the same way. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #8986 from baude/bindingreadmeOpenShift Merge Robot2021-01-15
|\ \ | | | | | | [CI:DOCS]Add README.md for golang bindings
| * | [CI:DOCS]Add README.md for golang bindingsbaude2021-01-15
| | | | | | | | | | | | | | | | | | | | | Add a brief description of the golang bindings and provide examples on how to use them Signed-off-by: baude <bbaude@redhat.com>