summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* tests: enable --cgroups=disabled test for rootlessGiuseppe Scrivano2021-09-16
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* tests: simplify --cgroups=disabled testGiuseppe Scrivano2021-09-16
| | | | | | read the cgroup directly from the container. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Enhance bindings for IDE hintsJhon Honce2021-09-16
| | | | | | | | | | | * Follow https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source for leading comment * Add godoc strings for all exposed methods for IDE support * Copy field godoc strings into generated code as function godoc string * Remove unused/unnecessary fields from generator.go structures * Cleanup code regarding template usage Signed-off-by: Jhon Honce <jhonce@redhat.com>
* fix restart always with rootlessportPaul Holzinger2021-09-16
| | | | | | | | When a container is automatically restarted due its restart policy and the container uses rootless cni networking with ports forwarded we have to start a new rootlessport process since it exits with conmon. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* test: enable --cgroup-parent testGiuseppe Scrivano2021-09-16
| | | | | | | | and fix it for running with runc. Closes: https://github.com/containers/podman/issues/11165 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Add deprecated fields for 1.22+ clients that still expect themJason T. Greene2021-09-16
| | | | Signed-off-by: Jason Greene <jason.greene@redhat.com>
* If container exits with 125 podman should exit with 125Daniel J Walsh2021-09-16
| | | | | | fixes: https://github.com/containers/podman/issues/11540 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #11517 from jwhonce/issues/10053OpenShift Merge Robot2021-09-12
|\ | | | | Refactor API server emphasis on logging
| * Refacter API server emphasis on loggingJhon Honce2021-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * To aid in debugging log API request and response bodies at trace level. Events can be correlated using the X-Reference-Id. * Server now echos X-Reference-Id from client if set, otherwise generates an unique id. * Move logic for X-Reference-Id into middleware * Change uses of Header.Add() to Set() when setting Content-Type * Log API operations in Apache format using gorilla middleware * Port server code to use BaseContext and ConnContext Fixes #10053 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #11525 from rhatdan/healthcheckOpenShift Merge Robot2021-09-11
|\ \ | | | | | | Stop outputting 'healthy' on healthcheck
| * | Stop outputting 'healthy' on healthcheckDaniel J Walsh2021-09-10
| |/ | | | | | | | | | | | | | | | | We should only print unhealthy if the check fails. Currently this is filling logs when users are running lots of healthchecks. Improves: https://github.com/containers/podman/issues/11157 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #11513 from Luap99/unshareOpenShift Merge Robot2021-09-11
|\ \ | | | | | | podman unshare keep exit code
| * | podman unshare keep exit codePaul Holzinger2021-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the command inside the podman unshare env failed podman unshare always exits with 125 and prints `Error: exit status 125`. This is a bad user experience and makes it difficult to use in scripts which could expect certain exit codes. This commit makes sure podman unshare uses the same exit code as the command and does not print the useless `exit status X` message. Also to match podman run/exec it should return 126 for EPERM and 127 for ENOENT. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #11323 from umohnani8/initOpenShift Merge Robot2021-09-10
|\ \ \ | |_|/ |/| | Add init containers to generate and play kube
| * | Add init containers to generate and play kubeUrvashi Mohnani2021-09-10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kubernetes has a concept of init containers that run and exit before the regular containers in a pod are started. We added init containers to podman pods as well. This patch adds support for generating init containers in the kube yaml when a pod we are converting had init containers. When playing a kube yaml, it detects an init container and creates such a container in podman accordingly. Note, only init containers created with the init type set to "always" will be generated as the "once" option deletes the init container after it has run and exited. Play kube will always creates init containers with the "always" init container type. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* / stats: allow to read stats for paused containersGiuseppe Scrivano2021-09-10
|/ | | | | | paused containers still a cgroup we can use to grab the stats. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Merge pull request #11426 from fj-tsubasa/system-test-scenarioOpenShift Merge Robot2021-09-09
|\ | | | | Add a system test to modify and import an exported container
| * Add a system test to modify and import an exported container.Tsubasa Watanabe2021-09-10
| | | | | | | | | | | | | | This test has completed one of TODO items in test/system/TODO.md. The item is "Implied pull, build, export, modify, import, tag, run, kill" Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
* | Fix conmon attach socket buffer sizePaul Holzinger2021-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conmon buffer size is 8192, however the attach socket needs two extra bytes. The first byte of each message will be the STREAM type. The last byte is a null byte. So when we want to read 8192 message bytes we need to read 8193 bytes since the first one is special. check https://github.com/containers/conmon/blob/1ef246896b4f6566964ed861b98cd32d0e7bf7a2/src/ctr_stdio.c#L101-L107 This problem can be seen in podman-remote run/exec when it prints output with 8192 or more bytes. The output will miss the 8192 byte. Fixes #11496 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #11502 from vrothberg/vendor-mpbOpenShift Merge Robot2021-09-09
|\ \ | | | | | | vendor mpb@v7.1.4
| * | test/e2e/search_test.go - relax testsValentin Rothberg2021-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some search tests were looking for an explicit amount of images to match. Since images are moving targets on these registries, make sure to use lower bounds instead of exact matches. Fixes CI which started to break when Red Hat images changed. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #11447 from chenzhiwei/respect-configOpenShift Merge Robot2021-09-09
|\ \ \ | | | | | | | | fix play kube can't use infra_image in config file
| * | | fix play kube can't use infra_image in config fileChen Zhiwei2021-09-08
| | | | | | | | | | | | | | | | Signed-off-by: Chen Zhiwei <zhiweik@gmail.com>
* | | | Merge pull request #11499 from flouthoc/inspect-tmpl-flush-writerOpenShift Merge Robot2021-09-09
|\ \ \ \ | |_|/ / |/| | | inspect: printTmpl must Flush writer
| * | | inspect: printTmpl must Flush writerAditya Rajan2021-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Flush should be called after the last call to Write to ensure that any data buffered in the Writer is written to output. Any incomplete escape sequence at the end is considered complete for formatting purposes. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* | | | Merge pull request #11485 from Luap99/network-upgrade-testOpenShift Merge Robot2021-09-09
|\ \ \ \ | |/ / / |/| | | podman upgrade tests for networking
| * | | podman upgrade tests for networkingPaul Holzinger2021-09-09
| | | | | | | | | | | | | | | | | | | | | | | | Test basic networking functionality in the upgrade tests. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | Add logDriver to podman infoDaniel J Walsh2021-09-08
|/ / / | | | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | system tests: new random_free_port helperEd Santiago2021-09-08
| | | | | | | | | | | | | | | | | | | | | Picks a pseudorandom open port within a range. Refactor existing instances of such code. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #11468 from Luap99/play-kube-slirpOpenShift Merge Robot2021-09-08
|\ \ \ | | | | | | | | fix play kube --network options
| * | | fix play kube --network optionsPaul Holzinger2021-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 092902b45555 introduced advanced network options for podman play kube. However this never worked because it unconditionally set the network mode to bridge after it parsed the network option. Added a test to ensure the correct mode is set. Truly fixes #10807 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | test/testvol/main.go: Fix missing arguments to Errorf()Raoul Bhatia2021-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | go test -v -p 1 -tags apparmor,ostree,seccomp,selinux,systemd github.com/containers/podman/v2/test/testvol results in the following error: > test/testvol/main.go:227:10: Errorf format %s reads arg #1, but call has 0 args > test/testvol/main.go:233:10: Errorf format %s reads arg #1, but call has 0 args This patch passes req.Name as an argument to the Errorf() call Signed-off-by: Raoul Bhatia <raoul.bhatia@radarcs.com>
* | | | Merge pull request #11471 from mheon/checkpointedOpenShift Merge Robot2021-09-08
|\ \ \ \ | | | | | | | | | | Add Checkpointed bool to Inspect
| * | | | Add Checkpointed bool to InspectMatthew Heon2021-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When inspecting a container, we now report whether the container was stopped by a `podman checkpoint` operation via a new bool in the State portion of inspected, `Checkpointed`. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | | | pkg/bindings/images.nTar(): set ownership of build context to 0:0Nalin Dahyabhai2021-09-07
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When attempting to run remote builds, users with UID/GID values that were high enough that they wouldn't be mapped into their default user namespace configurations would see their builds fail when the server attempted to extract the build contexts that they supplied, and failed to set ownership of the build context content to the UID/GID that were originally assigned to them. When archiving the build context at the client, set ownership of everything to 0:0, which we know is always mapped. Both ADD and COPY require that we set the ownership of newly-added content to 0:0 (unless the --chown flag is used), so throwing away the original ownership information doesn't hurt, anyway. As usual, tarballs that we extract as part of ADD aren't going to be affected. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* | | | Merge pull request #11431 from jmguzik/secrets-ls-filtersOpenShift Merge Robot2021-09-07
|\ \ \ \ | | | | | | | | | | Add filtering functionality to http api secrets list
| * | | | Add filtering functionality to http api secrets listJakub Guzik2021-09-03
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Filtering is missing in both compat API and libpod API, while docker has filtering functinality. This commit enables filtering option using name and id in both libpod and http API. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* | | | Merge pull request #11427 from flouthoc/kube-pod-logsOpenShift Merge Robot2021-09-07
|\ \ \ \ | |_|/ / |/| | | kube: Add support for `podman pod logs`.
| * | | kube: Add support for podman pod logsAditya Rajan2021-09-05
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following PR adds support for `kubectl` like `pod logs` to podman. Usage `podman pod logs <podIDorName` gives a stream of logs for all the containers within the pod with **containername** as a field. Just like **`kubectl`** also supports `podman pod logs -c ctrIDorName podIDorName` to limit the log stream to any of the specificied container which belongs to pod. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* | | Merge pull request #11459 from vrothberg/fix-11438OpenShift Merge Robot2021-09-07
|\ \ \ | | | | | | | | generate systemd: handle --restart
| * | | generate systemd: handle --restartValentin Rothberg2021-09-07
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Handle custom restart policies of containers when generating the unit files; those should be set on the unit level and removed from ExecStart flags. Fixes: #11438 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* / | logs -f: file: fix dead lockValentin Rothberg2021-09-07
|/ / | | | | | | | | | | | | | | Fix a dead lock in the file log driver where one goroutine would wait on the tail to hit EOF but reading is blocked for the function to return. Fixes: 11461 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* / auto-update systemd test: skip on RHELEd Santiago2021-09-02
|/ | | | | | | | | | | | The "auto-update using systemd" test is failing on RHEL rootless. Reason: it uses journalctl, which does not work on RHEL rootless. Solution: add skip_if_journald_unavailable. ALSO: add debugging info to test failure. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #11406 from flouthoc/manifest-rm-only-manifestOpenShift Merge Robot2021-09-02
|\ | | | | manifest: `rm` should not remove referenced images.
| * manifest: rm should not remove referenced images.Aditya Rajan2021-09-02
| | | | | | | | | | | | | | | | | | | | Following PR makes sure that `podman manifest rm <list>` only removes the named manifest list and not referenced images. Bumping and squashing c/common to v0.43.3-0.20210902095222-a7acc160fb25 in same commit in order to make sure build commit test passes. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* | make podman run --systemd case insensitivePaul Holzinger2021-09-02
|/ | | | | | | | | Since boolean flags accept `True` and `False` the systemd flag should do this as well. Fixes #11387 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* System tests: add cleanup & debugging outputEd Santiago2021-09-01
| | | | | | | | | | | | Cleanup: the final 'play' test wasn't cleaning up after itself, leading to angry warning messages when rerunning tests (in my environment; never in CI) Debug: I'm seeing a lot of "Could not parse READY=1 as MAINPID=nnn" flakes in the sdnotify:container test (nine in the past month). Add debug traces to help diagnose in future flakes. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #11376 from ashley-cui/envsecOpenShift Merge Robot2021-09-01
|\ | | | | Make secret env var available to exec session
| * Make secret env var available to exec sessionAshley Cui2021-08-31
| | | | | | | | | | | | | | Secret environment variables were only available to a podman run/start. This commit makes sure that exec sessions can see them as well. Signed-off-by: Ashley Cui <acui@redhat.com>
* | pass LISTEN_* environment into containerValentin Rothberg2021-08-31
|/ | | | | | | | | | | | | | | Make sure that Podman passes the LISTEN_* environment into containers. Similar to runc, LISTEN_PID is set to 1. Also remove conditionally passing the LISTEN_FDS as extra files. The condition was wrong (inverted) and introduced to fix #3572 which related to running under varlink which has been dropped entirely with Podman 3.0. Note that the NOTIFY_SOCKET and LISTEN_* variables are cleared when running `system service`. Fixes: #10443 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>