summaryrefslogtreecommitdiff
path: root/libpod
Commit message (Collapse)AuthorAge
* Ensure that user-specified HOSTNAME is honoredMatthew Heon2021-01-06
| | | | | | | | | | | When adding the HOSTNAME environment variable, only do so if it is not already present in the spec. If it is already present, it was likely added by the user, and we should honor their requested value. Fixes #8886 Signed-off-by: Matthew Heon <mheon@redhat.com>
* Merge pull request #8873 from baude/issue8864OpenShift Merge Robot2021-01-05
|\ | | | | close journald when reading
| * close journald when readingbaude2021-01-04
| | | | | | | | | | | | | | | | | | when reading from journald, we need to close the journal handler for events and logging. Fixes: #8864 Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #8878 from mheon/no_edit_configOpenShift Merge Robot2021-01-04
|\ \ | | | | | | Ensure we do not edit container config in Exec
| * | Ensure we do not edit container config in ExecMatthew Heon2021-01-04
| |/ | | | | | | | | | | | | | | | | | | | | | | The existing code grabs the base container's process, and then modifies it for use with the exec session. This could cause errors in `podman inspect` or similar on the container, as the definition of its OCI spec has been changed by the exec session. The change never propagates to the DB, so it's limited to a single process, but we should still avoid it when possible - so deep-copy it before use. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | Merge pull request #8875 from rhatdan/imageOpenShift Merge Robot2021-01-04
|\ \ | | | | | | Allow image errors to bubble up from lower level functions.
| * | Allow image errors to bubble up from lower level functions.Daniel J Walsh2021-01-04
| |/ | | | | | | | | | | | | | | Currently we ignore ErrMultipleImages being returned from findImageInRepoTags. Fixes: https://github.com/containers/podman/issues/8868 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* / systemd: make rundir always accessibleGiuseppe Scrivano2021-01-04
|/ | | | | | | | | so that the PIDFile can be accessed also without being in the rootless user namespace. Closes: https://github.com/containers/podman/issues/8506 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Merge pull request #8823 from giuseppe/exec-honor-privilegedOpenShift Merge Robot2021-01-04
|\ | | | | exec: honor --privileged
| * exec: honor --privilegedGiuseppe Scrivano2020-12-24
| | | | | | | | | | | | | | write the capabilities to the configuration passed to the OCI runtime. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
| * libpod: change function to accept ExecOptionsGiuseppe Scrivano2020-12-24
| | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #8852 from afbjorklund/slirp_sandbox-no_pivot_rootOpenShift Merge Robot2020-12-30
|\ \ | | | | | | The slirp4netns sandbox requires pivot_root
| * | The slirp4netns sandbox requires pivot_rootAnders F Björklund2020-12-29
| |/ | | | | | | | | | | Disable the sandbox, when running on rootfs Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* | Merge pull request #8853 from jubalh/gentooOpenShift Merge Robot2020-12-30
|\ \ | | | | | | Add support for Gentoo file to package query
| * | Add support for Gentoo file to package queryMichael Vetter2020-12-29
| |/ | | | | | | | | | | | | | | On Gentoo systems where `app-portage/gentoolkit` is installed the binary `equery` is used to query for information on which package a file belongs to. Signed-off-by: Michael Vetter <jubalh@iodoru.org>
* / Consolidate filter logic to pkg subdirectoryBaron Lenardson2020-12-24
|/ | | | | | | Per the conversation on pull/8724 I am consolidating filter logic and helper functions under the pkg/domain/filters dir. Signed-off-by: Baron Lenardson <lenardson.baron@gmail.com>
* Merge pull request #8822 from baude/issue8733OpenShift Merge Robot2020-12-24
|\ | | | | re-open container log files
| * re-open container log filesbaude2020-12-23
| | | | | | | | | | | | | | | | | | when following container log files, if the file gets rotated due to something like size limit, re-open it and keep following. Fixes: #8733 Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #8806 from rhatdan/keyringOpenShift Merge Robot2020-12-23
|\ \ | | | | | | Pass down EnableKeyring from containers.conf to conmon
| * | Pass down EnableKeyring from containers.conf to conmonDaniel J Walsh2020-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a new field in containers.conf that tells whether or not we want to generate a new keyring in a container. This field was being ignored. It now will be followed and passed down to conmon. Fixes: https://github.com/containers/podman/issues/8384 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #8609 from rhatdan/imageOpenShift Merge Robot2020-12-23
|\ \ \ | |_|/ |/| | Prefer read/write images over read/only images
| * | Prefer read/write images over read/only imagesDaniel J Walsh2020-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With additional stores there is a risk that you could have multiple images with the same name. IE An older image in a read/only store versus a newer version in the read/write store. This patch will ignore multiple images with the same name iff one is read/write and all of the others are read/only. Fixes: https://github.com/containers/podman/issues/8176 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #8787 from jsoref/spellingOpenShift Merge Robot2020-12-23
|\ \ \ | | | | | | | | Spelling
| * | | SpellingJosh Soref2020-12-22
| | |/ | |/| | | | | | | Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* | | Merge pull request #8793 from zhangguanzhang/vol-opOpenShift Merge Robot2020-12-23
|\ \ \ | | | | | | | | Fix missing options in volume's display while setting uid and gid
| * | | Fix missing options in volumes display while setting uid and gidzhangguanzhang2020-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` $ podman volume create testvol --opt o=uid=1001,gid=1001 $ ./bin/podman volume create testvol2 --opt o=uid=1001,gid=1001 $ podman volume inspect testvol "Options": {}, $ podman volume inspect testvol2 "Options": { "GID": "1001", "UID": "1001", "o": "uid=1001,gid=1001" }, ``` Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
* | | | Merge pull request #8804 from baude/issue8512Daniel J Walsh2020-12-23
|\ \ \ \ | |_|/ / |/| | | add pod filter for ps
| * | | add pod filter for psbaude2020-12-22
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | adds the ability to filter containers based on the filter "pod". the value can be a pod name or its full or partial id. Fixes: #8512 Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #8724 from bblenard/support-volume-filters-in-system-pruneOpenShift Merge Robot2020-12-22
|\ \ \ | |_|/ |/| | Add volume filters to system prune
| * | Add volume filters to system pruneBaron Lenardson2020-12-21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This change was missed in pull/8689. Now that volume pruneing supports filters system pruneing can pass its filters down to the volume pruneing. Additionally this change adds tests for the following components * podman system prune subcommand with `--volumes` & `--filter` options * apiv2 api tests for `/system/` and `/libpod/system` endpoints Relates to #8453, #8672 Signed-off-by: Baron Lenardson <lenardson.baron@gmail.com>
* / Add Security information to podman infoDaniel J Walsh2020-12-22
|/ | | | | | | | When debugging issues, it would be helpful to know the security settings of the system running into the problem. Adding security info to `podman info` is also useful to users. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #8750 from rhatdan/resetOpenShift Merge Robot2020-12-17
|\ | | | | Don't accidently remove XDG_RUNTIME_DIR when reseting storage
| * Don't accidently remove XDG_RUNTIME_DIR when reseting storageDaniel J Walsh2020-12-16
| | | | | | | | | | | | | | | | | | | | In certain cases XDG_RUNTIME_DIR was deleted by accident based on settings in the storage.conf. This patch verifies that when doing a storage reset, we don't accidently remove XDG_RUNTIME_DIR. Fixes: https://github.com/containers/podman/issues/8680 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #8756 from Luap99/fix-8748OpenShift Merge Robot2020-12-16
|\ \ | | | | | | Always add the default gateway to the cni config file
| * | Always add the default gateway to the cni config filePaul Holzinger2020-12-16
| |/ | | | | | | | | | | | | | | | | | | | | | | `podman network create` should always add a gateway to the cni config. If no gateway is given use the first ip in the subnet. CNI does not require the gateway field but we need it because of network inspect. This worked with previous version but was dropped in Commit(e7a72d72fd59). Fixes #8748 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* / Add support for pacman package version queryxatier2020-12-16
|/ | | | | | | | | | - refactor package query logic to be package manager agnostic. - `pacman -Qo` is the equivalent to `rpm -qf` [1]. [1] https://wiki.archlinux.org/index.php/Pacman/Rosetta#Querying_specific_packages Signed-off-by: xatier <xatierlike@gmail.com>
* Add LogSize to container inspectDaniel J Walsh2020-12-15
| | | | | | | Other log options are available so we need to add ability to look up LogSize. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* libpod, conmon: change log level for rootlessGiuseppe Scrivano2020-12-15
| | | | | | | | | Change the log level when running as rootless when moving conmon to a different cgroup. Closes: https://github.com/containers/podman/issues/8721 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Merge pull request #8696 from Luap99/podman-events-untilOpenShift Merge Robot2020-12-14
|\ | | | | podman events allow future time for --until
| * podman events allow future time for --untilPaul Holzinger2020-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The podman events aren't read until the given timestamp if the timestamp is in the future. It just reads all events until now and exits afterwards. This does not make sense and does not match docker. The correct behavior is to read all events until the given time is reached. This fixes a bug where the wrong event log file path was used when running first time with a new storage location. Fixes #8694 This also fixes the events api endpoint which only exited when an error occurred. Otherwise it just hung after reading all events. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Merge pull request #8693 from giuseppe/drop-valid-id-in-userns-checkOpenShift Merge Robot2020-12-14
|\ \ | | | | | | podman: drop checking valid rootless UID
| * | podman: drop checking valid rootless UIDGiuseppe Scrivano2020-12-11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | do not check whether the specified ID is valid in the user namespace. crun handles this case[1], so the check in Podman prevents to get to the OCI runtime at all. $ podman run --user 10:0 --uidmap 0:0:1 --rm -ti fedora:33 sh -c 'id; cat /proc/self/uid_map' uid=10(10) gid=0(root) groups=0(root),65534(nobody) 10 0 1 [1] https://github.com/containers/crun/pull/556 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #8689 from bblenard/issue-8672-volume-pruneOpenShift Merge Robot2020-12-14
|\ \ | | | | | | Add volume prune --filter support
| * | Add volume prune --filter supportBaron Lenardson2020-12-12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds support for the `--filter` / `?filters` arguments on the `podman volume prune` subcommand. * Adds ParseFilterArgumentsIntoFilters helper for consistent Filter string slice handling * Adds `--filter` support to podman volume prune cli * Adds `?filters...` support to podman volume prune api * Updates apiv2 / e2e tests Closes #8672 Signed-off-by: Baron Lenardson <lenardson.baron@gmail.com>
* / podman logs honor stderr correctlyPaul Holzinger2020-12-10
|/ | | | | | | | Make the ContainerLogsOptions support two io.Writers, one for stdout and the other for stderr. The logline already includes the information to which Writer it has to be written. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #8611 from vrothberg/short-namesOpenShift Merge Robot2020-12-09
|\ | | | | enable short-name aliasing
| * enable short-name aliasingValentin Rothberg2020-12-05
| | | | | | | | | | | | | | | | | | | | | | | | Short-name aliasing was introduced with Podman 2.2 as an opt-in preview by enabling an environment variable. Now, as we're preparing for the 3.0 release, we can enable short-name aliasing by default. Opting out can be done by configuring the `registries.conf` config file. Please refer to the following blog post for more details: https://www.redhat.com/sysadmin/container-image-short-names Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Make `podman stats` slirp check more robustMatthew Heon2020-12-08
| | | | | | | | | | | | | | | | | | | | | | Just checking for `rootless.IsRootless()` does not catch all the cases where slirp4netns is in use - we actually allow it to be used as root as well. Fortify the conditional here so we don't fail in the root + slirp case. Fixes #7883 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #8571 from Luap99/podman-network-reloadOpenShift Merge Robot2020-12-08
|\ \ | | | | | | Implement pod-network-reload
| * | Implement pod-network-reloadMatthew Heon2020-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new command, 'podman network reload', to reload the networks of existing containers, forcing recreation of firewall rules after e.g. `firewall-cmd --reload` wipes them out. Under the hood, this works by calling CNI to tear down the existing network, then recreate it using identical settings. We request that CNI preserve the old IP and MAC address in most cases (where the container only had 1 IP/MAC), but there will be some downtime inherent to the teardown/bring-up approach. The architecture of CNI doesn't really make doing this without downtime easy (or maybe even possible...). At present, this only works for root Podman, and only locally. I don't think there is much of a point to adding remote support (this is very much a local debugging command), but I think adding rootless support (to kill/recreate slirp4netns) could be valuable. Signed-off-by: Matthew Heon <matthew.heon@pm.me> Signed-off-by: Paul Holzinger <paul.holzinger@web.de>