summaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
* search endpoint failure correctionBrent Baude2020-02-21
| | | | | | | | when returning an invalid search, a return was omitted triggering a null on the consumer end. Fixes: #5228 Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #5213 from mheon/remove_db_imagevolOpenShift Merge Robot2020-02-21
|\ | | | | Remove ImageVolumes from database
| * Remove ImageVolumes from databaseMatthew Heon2020-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before Libpod supported named volumes, we approximated image volumes by bind-mounting in per-container temporary directories. This was handled by Libpod, and had a corresponding database entry to enable/disable it. However, when we enabled named volumes, we completely rewrote the old implementation; none of the old bind mount implementation still exists, save one flag in the database. With nothing remaining to use it, it has no further purpose. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | Merge pull request #5263 from baude/logsizeOpenShift Merge Robot2020-02-21
|\ \ | | | | | | implement reverse reader for log reads
| * | implement reverse reader for log readsBrent Baude2020-02-20
| | | | | | | | | | | | | | | | | | | | | | | | in cases where the log file exceeds the available memory of a system, we had a bug that triggered an oom because the entire logfile was being read when the tail parameter was given. this reads in chunks and is more or less memory safe. fixes: #5131 Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #5236 from marusak/filter_by_idOpenShift Merge Robot2020-02-21
|\ \ \ | | | | | | | | apiv2: Image filtering and fixup docs
| * | | apiv2: Fixup /containers/json filters documentationMatej Marusak2020-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Mention what is the input format plus put literals into quotation marks for better readability (plus it seems that some tags were not rendered). Signed-off-by: Matej Marusak <mmarusak@redhat.com>
| * | | apiv2: Enable filtering images by IDMatej Marusak2020-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is more practical for API usage and also it is more in sync how filtering of containers works. Signed-off-by: Matej Marusak <mmarusak@redhat.com>
* | | | Merge pull request #5178 from marusak/expose_cpuOpenShift Merge Robot2020-02-21
|\ \ \ \ | | | | | | | | | | stats: Expose CPU usage in API
| * | | | stats: Expose CPU usage in APIMatej Marusak2020-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `stats.CPU` is a number representing CPU usage in percents. It is possible to calculate it from other exposed fields (once they are implemented correctly) but why to do it, when this is already calculated. This does not break API, it just adds another field. Signed-off-by: Matej Marusak <mmarusak@redhat.com>
* | | | | Merge pull request #5279 from edsantiago/swagger_fixesOpenShift Merge Robot2020-02-21
|\ \ \ \ \ | |_|_|_|/ |/| | | | Swagger: yet more fixes
| * | | | Swagger: yet more fixesEd Santiago2020-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR #5204 added /libpod/containers/create but with the wrong swagger comment. Fix that. Also fix some other inconsistencies: missing 'libpod' prefix, missing 'Container' suffix, and change 'ContainerCreate' to 'CreateContainer'; all of these changes preserve consistency with both the invoked function as well as the overall naming conventions used in this module. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | | Merge pull request #5262 from schubter/signal-decodeOpenShift Merge Robot2020-02-21
|\ \ \ \ \ | | | | | | | | | | | | APIv2: Fixed syscall.Signal not convertable by decoder
| * | | | | Fixed syscall.Signal not convertable by decoderAndreas Schubert2020-02-19
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andreas Schubert <schubter@gmail.com>
* | | | | | Merge pull request #5222 from mheon/fix_5219OpenShift Merge Robot2020-02-20
|\ \ \ \ \ \ | | | | | | | | | | | | | | Use cleaned destination path for indexing image volumes
| * | | | | | Use cleaned destination path for indexing image volumesMatthew Heon2020-02-17
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use filepath.Clean() to remove trailing slashes to ensure that when we supercede image mounts with mounts from --volume and --mount, paths are consistent when we compare. Unfortunately, while we used the cleaned path for the destination in the mount, it was accidentally not used to index the maps that we use to identify what to supercede, so our comparisons might be thrown off by trailing slashes and similar. Fixes #5219 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | | | | Add support for ssh:// and unix:// podman clientsJhon Honce2020-02-20
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make context keys package safe * Add support for PODMAN_HOST and PODMAN_SSHKEY * Add slight increasing delay when client connections fail * Remove usages of path.Join(), added JoinURL(). '/' is not OS dependent. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | | | Merge pull request #5251 from sujil02/pod-testOpenShift Merge Robot2020-02-20
|\ \ \ \ \ | | | | | | | | | | | | Add test to validate the pod bindings api
| * | | | | Add test to validate the pod bindings apiSujil022020-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include test to validate pod create, start, stop, restart, pause, unpause, list, and inspect api bindings. Also includes bug fixes that resulted in invalid api responses. Signed-off-by: Sujil02 <sushah@redhat.com>
* | | | | | Merge pull request #5241 from mheon/pod_network_opts_addOpenShift Merge Robot2020-02-20
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add network opts to pods
| * | | | | | Add network options to podman pod createMatthew Heon2020-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables most of the network-related functionality from `podman run` in `podman pod create`. Custom CNI networks can be specified, host networking is supported, DNS options can be configured. Also enables host networking in `podman play kube`. Fixes #2808 Fixes #3837 Fixes #4432 Fixes #4718 Fixes #4770 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | | | | | Swagger: fix one incorrect commentEd Santiago2020-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR #5235 updated a bunch of entrypoints from {name} to {name:.*}, requiring matching changes to swagger comments. Looks like one got missed due to the manual nature of this work. Have I mentioned lately that manual maintenance of duplicate information is not a great idea? Discrepancy caught by my script, which I would really like to look into getting into CI, but is gating on #5238. (I would actually not like to get this script into CI, I would prefer to have the duplicate information be autogenerated from the function calls themselves, but I seem to have lost that battle) Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | | | | apiv2 container create using specgenBrent Baude2020-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this uses the specgen structure to create containers rather than the outdated createconfig. right now, only the apiv2 create is wired up. eventually the cli will also have to be done. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | | | | | Merge pull request #5259 from schubter/apiv2-create-imageOpenShift Merge Robot2020-02-19
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | APIv2: Fixed CreateImageFromImage not respecting supplied Tag parameter
| * | | | | | | Fixed CreateImageFromImage not respecting supplied Tag parameterAndreas Schubert2020-02-19
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | Signed-off-by: Andreas Schubert <schubter@gmail.com>
* | | | | | | Merge pull request #5225 from vrothberg/fix-5087OpenShift Merge Robot2020-02-19
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | config: use built-in TOML merge and adhere to label setting
| * | | | | | set process labels in pkg/specValentin Rothberg2020-02-19
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the (default) process labels in `pkg/spec`. This way, we can also query libpod.conf and disable labeling if needed. Fixes: #5087 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* / / / / / Fixed typo in KillContainerAndreas Schubert2020-02-19
|/ / / / / | | | | | | | | | | | | | | | Signed-off-by: Andreas Schubert <schubter@gmail.com>
* | | | | Merge pull request #5247 from schubter/5242OpenShift Merge Robot2020-02-19
|\ \ \ \ \ | |_|/ / / |/| | | | APIv2: fixes decoder issue
| * | | | adds missing query struct tags and exports the fieldsAndreas Schubert2020-02-18
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andreas Schubert <schubter@gmail.com>
* | | | | Swagger: fix inconsistencies (try #2)Ed Santiago2020-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As I've mentioned once or twice, hand-maintained swagger docs are evil. This commit attempts to fix: * Inconsistent methods (swagger says POST but code signature says GET) * Inconsistent capitalization * Typos ("Mounter", "pood") * Completely wrong paths (/inspect vs /json) * Missing .Method() registrations * Missing /libpod in some /volumes paths * Incorrect method declaration: /libpod/containers/.../kill was correct (POST) in swagger but wrong in the code itself (http.MethodGet). Correct the latter to MethodPost This is two hours' work, even with a script I have that tries to cross-check everything. Swagger docs should not be human-maintained. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | | Update mux rules to allow slashes in image namesJhon Honce2020-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | %2F escaping is also supported. Return better response on bad search terms Fixes #5229 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | | | Merge pull request #5158 from jwhonce/issues/5151OpenShift Merge Robot2020-02-18
|\ \ \ \ \ | |/ / / / |/| | | | Fix handler and systemd activation errors
| * | | | Fix handler and systemd activation errorsJhon Honce2020-02-17
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On panic from handler: log warning and stack trace, report InternalServerError to client When using `podman system service` make determining the listening endpoint deterministic. // When determining _*THE*_ listening endpoint -- // 1) User input wins always // 2) systemd socket activation // 3) rootless honors XDG_RUNTIME_DIR // 4) if varlink -- adapter.DefaultVarlinkAddress // 5) lastly adapter.DefaultAPIAddress Fixes #5150 Fixes #5151 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | | Merge pull request #5237 from giuseppe/check-for-valid-conmon-processOpenShift Merge Robot2020-02-17
|\ \ \ \ | |/ / / |/| | | rootless: check if the conmon process is valid
| * | | rootless: check if the conmon process is validGiuseppe Scrivano2020-02-17
| |/ / | | | | | | | | | | | | | | | | | | | | | if the pause process doesn't exist and we try to join a conmon namespace, make sure the process still exists. Otherwise re-create the user namespace. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* / / Refactor image tree for API usageSascha Grunert2020-02-17
|/ / | | | | | | Signed-off-by: Sascha Grunert <sgrunert@suse.com>
* | Merge pull request #5217 from mheon/rework_label_parsingOpenShift Merge Robot2020-02-15
|\ \ | | | | | | Rework label parsing
| * | Rework label parsingMatthew Heon2020-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We attempted to share all logic for parsing labels and environment variables, which on the surface makes lots of sense (both are formatted key=value so parsing logic should be identical) but has begun to fall apart now that we have added additional logic to environment variable handling. Environment variables that are unset, for example, are looked up against environment variables set for the process. We don't want this for labels, so we have to split parsing logic. Fixes #3854 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Merge pull request #5214 from baude/apiv2loglibpodOpenShift Merge Robot2020-02-14
|\ \ \ | |/ / |/| | apiv2 libpod container logs
| * | apiv2 libpod container logsBrent Baude2020-02-14
| | | | | | | | | | | | | | | | | | wire up containers logs for libpod side of the house, same as compat. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #5216 from baude/bindingstestcacheOpenShift Merge Robot2020-02-14
|\ \ \ | | | | | | | | add caching for binding tests
| * | | add caching for binding testsBrent Baude2020-02-14
| |/ / | | | | | | | | | | | | | | | | | | | | | add the ability to cache images instead of pull them. makes tests faster and less network use when we flip on CI. Also added list images with filter test Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #5207 from rhatdan/selinuxOpenShift Merge Robot2020-02-14
|\ \ \ | | | | | | | | Fix SELinux labels of volumes
| * | | Fix SELinux labels of volumesDaniel J Walsh2020-02-13
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we attempt to label a volume and the file system does not support labeling, then just warn. SELinux may or may not work, on the volume. There is no way to setup a private label on a newly created volume without using the container mountlabel. If we don't have a mount label at the time of creation of the volume, the only option we have is to create a shared label. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #5209 from vrothberg/un-dockerOpenShift Merge Robot2020-02-14
|\ \ \ | | | | | | | | Undocker part 1)
| * | | add pkg/signalValentin Rothberg2020-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pkg/signal to deal with parts of signal processing and translating signals from string to numeric representations. The code has been copied from docker/docker (and attributed with the copyright) but been reduced to only what libpod needs (on Linux). Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | add pkg/capabilitiesValentin Rothberg2020-02-14
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Add pkg/capabibilities to deal with capabilities. The code has been copied from Docker (and attributed with the copyright) but changed significantly to only do what we really need. The code has also been simplified and will perform better due to removed redundancy. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #5203 from QiWang19/disable-detach-keyOpenShift Merge Robot2020-02-14
|\ \ \ | |/ / |/| | fix bug "" disable detach keys
| * | fix bug "" disable detach keysQi Wang2020-02-13
| |/ | | | | | | | | | | | | fix #5166 This patch enables `--detach-keys ""` to disable the feature. "ctrl-p, ctrl-q" will not work after this command. Signed-off-by: Qi Wang <qiwan@redhat.com>