summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi
Commit message (Collapse)AuthorAge
* remove runlabel test for global optsValentin Rothberg2021-12-08
| | | | | | | | | GLOBAL_OPTS haven't been supported for at least two major versions of Podman. The runlabel code is extremely fragile and I think it should be rewritten before adding new features. Fixes: #12436 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Update vendor or containers/common moving pkg/cgroups thereDaniel J Walsh2021-12-07
| | | | | | | [NO NEW TESTS NEEDED] This is just moving pkg/cgroups out so existing tests should be fine. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #12466 from ↵OpenShift Merge Robot2021-12-03
|\ | | | | | | | | dispensable/respect_pod_yaml_spec_hostname_when_play Hostname in `spec.hostname` should be passed to infra ctr init opt
| * Hostname in `spec.hostname` should be passed to infra ctr init optwangqiang2021-12-01
| | | | | | | | | | | | Fixes https://github.com/containers/podman/issues/12393 Signed-off-by: Qiang Wang <sunsetmask@gmail.com>
* | Merge pull request #12440 from umohnani8/cmOpenShift Merge Robot2021-12-03
|\ \ | | | | | | Add support for configmap volumes to play kube
| * | Add support for configmap volumes to play kubeUrvashi Mohnani2021-12-02
| |/ | | | | | | | | | | | | | | | | | | If the k8s yaml has volumes from a configmap, play kube will now create a volume based on the data from the configmap and volume source and set it to the right path in the container accordingly. Add tests for this and update some test for ENV from configmap. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* | Merge pull request #12486 from giuseppe/use-configured-compression-formatOpenShift Merge Robot2021-12-03
|\ \ | | | | | | cmd, push: use the configured compression format
| * | cmd, push: use the configured compression formatGiuseppe Scrivano2021-12-02
| | | | | | | | | | | | | | | | | | [NO NEW TESTS NEEDED] I am just changing the default value Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Merge pull request #12365 from mtrmac/randomOpenShift Merge Robot2021-12-02
|\ \ \ | | | | | | | | Don't use a global RNG, and avoid conflicts, when generating NodePorts
| * | | Allow containerPortsToServicePorts to failMiloslav Trmač2021-11-30
| | |/ | |/| | | | | | | | | | | | | | | | | | | Add an error return to it and affected callers. Should not affect behavior, the function can't currently fail. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
* | | Merge pull request #12469 from Luap99/ns-teardown-flakeOpenShift Merge Robot2021-12-02
|\ \ \ | |_|/ |/| | Fix possible rootless netns cleanup race
| * | Fix possible rootless netns cleanup racePaul Holzinger2021-12-01
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rootlessNetNS.Cleanup() has an issue with how it detects if cleanup is needed, reading the container state is not good ebough because containers are first stopped and than cleanup will be called. So at one time two containers could wait for cleanup but the second one will fail because the first one triggered already the cleanup thus making rootless netns unavailable for the second container resulting in an teardown error. Instead of checking the container state we need to check the netns state. Secondly, podman unshare --rootless-netns should not do the cleanup. This causes more issues than it is worth fixing. Users also might want to use this to setup the namespace in a special way. If unshare also cleans this up right away we cannot do this. [NO NEW TESTS NEEDED] Fixes #12459 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* / podman, push: expose --compression-formatGiuseppe Scrivano2021-12-01
|/ | | | | | support overriding the compression format at push time. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Support env variables based on ConfigMaps sent in payloadJakub Dzon2021-11-23
| | | | | | Fixes #12363 Signed-off-by: Jakub Dzon <jdzon@redhat.com>
* Add note about volume with unprivileged containerUrvashi Mohnani2021-11-21
| | | | | | | | | | | | | Add a note to the generated kube yaml if we detect a volume is being mounted. The note lets the user know what needs to be done to avoid permission denied error when trying to access the volume for an unprivileged container. Add the same note to the man pages. NO NEW TESTS NEEDED Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* Merge pull request #12354 from Luap99/exit-commandOpenShift Merge Robot2021-11-18
|\ | | | | Do not store the exit command in container config
| * Do not store the exit command in container configPaul Holzinger2021-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a problem with creating and storing the exit command when the container was created. It only contains the options the container was created with but NOT the options the container is started with. One example would be a CNI network config. If I start a container once, then change the cni config dir with `--cni-config-dir` ans start it a second time it will start successfully. However the exit command still contains the wrong `--cni-config-dir` because it was not updated. To fix this we do not want to store the exit command at all. Instead we create it every time the conmon process for the container is startet. This guarantees us that the container cleanup process is startet with the correct settings. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Add --file-locks checkpoint/restore optionRadostin Stoyanov2021-11-18
|/ | | | | | | | CRIU supports checkpoint/restore of file locks. This feature is required to checkpoint/restore containers running applications such as MySQL. Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
* Added optional container restore statisticsAdrian Reber2021-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the parameter '--print-stats' to 'podman container restore'. With '--print-stats' Podman will measure how long Podman itself, the OCI runtime and CRIU requires to restore a checkpoint and print out these information. CRIU already creates process restore statistics which are just read in addition to the added measurements. In contrast to just printing out the ID of the restored container, Podman will now print out JSON: # podman container restore --latest --print-stats { "podman_restore_duration": 305871, "container_statistics": [ { "Id": "47b02e1d474b5d5fe917825e91ac653efa757c91e5a81a368d771a78f6b5ed20", "runtime_restore_duration": 140614, "criu_statistics": { "forking_time": 5, "restore_time": 67672, "pages_restored": 14 } } ] } The output contains 'podman_restore_duration' which contains the number of microseconds Podman required to restore the checkpoint. The output also includes 'runtime_restore_duration' which is the time the runtime needed to restore that specific container. Each container also includes 'criu_statistics' which displays the timing information collected by CRIU. Signed-off-by: Adrian Reber <areber@redhat.com>
* Added optional container checkpointing statisticsAdrian Reber2021-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the parameter '--print-stats' to 'podman container checkpoint'. With '--print-stats' Podman will measure how long Podman itself, the OCI runtime and CRIU requires to create a checkpoint and print out these information. CRIU already creates checkpointing statistics which are just read in addition to the added measurements. In contrast to just printing out the ID of the checkpointed container, Podman will now print out JSON: # podman container checkpoint --latest --print-stats { "podman_checkpoint_duration": 360749, "container_statistics": [ { "Id": "25244244bf2efbef30fb6857ddea8cb2e5489f07eb6659e20dda117f0c466808", "runtime_checkpoint_duration": 177222, "criu_statistics": { "freezing_time": 100657, "frozen_time": 60700, "memdump_time": 8162, "memwrite_time": 4224, "pages_scanned": 20561, "pages_written": 2129 } } ] } The output contains 'podman_checkpoint_duration' which contains the number of microseconds Podman required to create the checkpoint. The output also includes 'runtime_checkpoint_duration' which is the time the runtime needed to checkpoint that specific container. Each container also includes 'criu_statistics' which displays the timing information collected by CRIU. Signed-off-by: Adrian Reber <areber@redhat.com>
* Merge pull request #12272 from hshiina/memory-swappinessOpenShift Merge Robot2021-11-13
|\ | | | | Enable 'podman run --memory-swappiness=0'
| * Enable 'podman run --memory-swappiness=0'Hironori Shiina2021-11-12
| | | | | | | | | | | | | | | | '--memory-swappiness=0' used to work. This patch fixes the regression issue, which was caused by the change of infra container creation process. Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
* | Merge pull request #12270 from rhatdan/authOpenShift Merge Robot2021-11-13
|\ \ | |/ |/| --authfile command line argument for image sign command.
| * --authfile command line argument for image sign command.José Guilherme Vanz2021-11-11
| | | | | | | | | | | | | | | | | | | | | | Adds the --authfile command line argument to allow users to use alternative authfile paths when signing images. Replaces: https://github.com/containers/podman/pull/10975 Fixes: https://github.com/containers/podman/issues/10866 Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | play kube: don't force-pull infra imageValentin Rothberg2021-11-12
|/ | | | | | | | | Do not force-pull the infra image in `play kube` but let the backend take care of that when creating the pod(s) which may build a local `podman-pause` image instead of using the default infra image. Fixes: #12254 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #12195 from boaz0/closes_11998OpenShift Merge Robot2021-11-09
|\ | | | | podman-generate-kube - remove empty structs from YAML
| * podman-generate-kube - remove empty structs from YAMLBoaz Shuster2021-11-07
| | | | | | | | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
* | Merge pull request #11958 from cdoern/scpOpenShift Merge Robot2021-11-08
|\ \ | |/ |/| Podman Image SCP rootful to rootless transfer
| * Podman Image SCP rootful to rootless transfercdoern2021-11-05
| | | | | | | | | | | | | | | | | | | | | | Added functionality for users to transfer images from root storage to rootless storage without using sshd. This is done through rootful podman by running `sudo podman image scp root@localhost::image user@localhost:: the user is needed in order to find and use their uid/gid to exec a new process. added necessary tests, and functions for this implementation. Created new image function Transfer so that the underlying code is majorly removed from CLI Signed-off-by: cdoern <cdoern@redhat.com>
* | rename rootless cni ns to rootless netnsPaul Holzinger2021-11-05
| | | | | | | | | | | | | | | | | | | | | | | | Since we want to use the rootless cni ns also for netavark we should pick a more generic name. The name is now "rootless network namespace" or short "rootless netns". The rename might cause some issues after the update but when the all containers are restarted or the host is rebooted it should work correctly. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Fix libpod API conformance to swaggerMatej Vasek2021-11-01
|/ | | | | | | * Return empty array when nothing has been pruned. * Use correct return type swagger doc-comment. Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Add support to play kube for --log-optDaniel J Walsh2021-10-25
| | | | | | Fixes: https://github.com/containers/podman/issues/11727 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* tag: Support tagging manifest list instead of resolving to imagesAditya Rajan2021-10-21
| | | | | | | | | | Following commit makes sure when buildah tag is invoked on a manifest list, it tags the same manifest list instead of resolving to an image and tagging it. Port of: https://github.com/containers/buildah/pull/3483 Signed-off-by: Aditya Rajan <arajan@redhat.com>
* Refactor podman search to be more code friendlyJhon Honce2021-10-12
| | | | | | | | | | | * JSON and API description fields are no longer truncated. Formatting moved to client, better support of MVP. * --no-trunc now defaults to true * Updated tests for changes Closes #11894 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* podman stats: move cgroup validation to serverPaul Holzinger2021-10-11
| | | | | | | | | | | | Podman stats is not supported for rootless cgroupv1 setups. The check for this must be on the server side and not the client. [NO NEW TESTS NEEDED] we cannot test this because remote and server are always on the same machine in CI Fixes #11909 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* faster image inspectionValentin Rothberg2021-10-08
| | | | | | | | | | | | | | Vendor the latest HEAD in c/common to pull in changes for a faster inspection of images. Previously, only the size computation was optional, now the one for the parent image is as well. In many cases, the parent image is not needed but it takes around 10ms on my local machine. With this change, we cut off 10ms from many code paths, most importantly, container creation. [NO NEW TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Add --time out for podman * rm -f commandsDaniel J Walsh2021-10-04
| | | | | | | | | Add --time flag to podman container rm Add --time flag to podman pod rm Add --time flag to podman volume rm Add --time flag to podman network rm Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Add podman play kube --no-hosts optionsDaniel J Walsh2021-10-01
| | | | | | | | | This option will setup the containers to not modify their /etc/hosts file and just use the one from the image. Fixes: https://github.com/containers/podman/issues/9500 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Support selinux options with bind mounts play/genBrent Baude2021-09-30
| | | | | | | | | | | | When using play kube and generate kube, we need to support if bind mounts have selinux options. As kubernetes does not support selinux in this way, we tuck the selinux values into a pod annotation for generation of the kube yaml. Then on play, we check annotations to see if a value for the mount exists and apply it. Fixes BZ #1984081 Signed-off-by: Brent Baude <bbaude@redhat.com>
* libpod: add GetConfigNoCopy()Valentin Rothberg2021-09-29
| | | | | | | | | | | | | | | | Add a new function to libpod to directly access the runtime configuration without creating an expensive deep copy. Further migrate a number of callers to this new function. This drops the number of calls to JSONDeepCopy from 4 to 1 in a simple `podman run --rm -d busybox top`. Future work: Please note that there are more callers of GetConfig() that can me migrated to GetConfigNoCopy(). [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* image prune: support removing external containersValentin Rothberg2021-09-28
| | | | | | | | Support removing external containers (e.g., build containers) during image prune. Fixes: #11472 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* stop: Do nothing if container was never created in runtimeAditya Rajan2021-09-27
| | | | | | | | | Following commit ensures we silently return container id on `stop` if container was never created in OCI runtime. Following behaviour ensures that we are in parity with docker. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* Set context dir for play kube buildBrent Baude2021-09-23
| | | | | | | | When performing an image build with play kube, we need to set the context directory so things like file copies have the correct input path. Signed-off-by: Brent Baude <bbaude@redhat.com>
* podman save: enforce signature removalValentin Rothberg2021-09-23
| | | | | | | | | | | | | | Enforce the removal of signatures in `podman save` to restore behavior prior to the migration to libimage. We may consider improving on that in the future. For details, please refer to the excellent summary by @mtrmac [1]. [NO TESTS NEEDED] - manually verified but exisiting tests need some further investigation (see [1]). [1] https://github.com/containers/podman/pull/11669#issuecomment-925250264 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #11704 from rhatdan/kubeOpenShift Merge Robot2021-09-23
|\ | | | | podman generate kube should not include images command
| * podman generate kube should not include images commandDaniel J Walsh2021-09-22
| | | | | | | | | | | | | | | | | | If the command came from the underlying image, then we should not include it in the generate yaml file. Fixes: https://github.com/containers/podman/issues/11672 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | standardize logrus messages to upper caseDaniel J Walsh2021-09-22
|/ | | | | | | | Remove ERROR: Error stutter from logrus messages also. [ NO TESTS NEEDED] This is just code cleanup. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* podman save: add `--uncompressed`Valentin Rothberg2021-09-22
| | | | | | | | | | Add an option to `podman save` to allow uncompressed layers when copying OCI images. Do the neccessary plumbing for the remote client, add tests and vendor in the latest commit from c/common to fetch the neccessary changes in libimage. Closes: #11613 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Add a backoff and retries to retrieving exited eventMatthew Heon2021-09-21
| | | | | | | | | | | | | | | | | | There's a potential race around extremely short-running containers and events with journald. Events may not be written for some time (small, but appreciable) after they are received, and as such we can fail to retrieve it if there is a sufficiently short time between us writing the event and trying to read it. Work around this by just retrying, with a 0.25 second delay between retries, up to 4 times. [NO TESTS NEEDED] because I have no idea how to reproduce this race in CI. Fixes #11633 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* Remove references to kube being developmentBrent Baude2021-09-20
| | | | | | | | | | At this point and even though we are always improving the play and generate kube functions, I would say it no longers needs to be denoted as under development. [NO TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>