summaryrefslogtreecommitdiff
path: root/test/system
Commit message (Collapse)AuthorAge
* System tests: new checkpoint testsEd Santiago2021-11-17
| | | | | | | | | Includes a test for the stdout-goes-away bug (crun #756). Skip on Ubuntu due to a many-months-old kernel bug that keeps getting fixed and then un-fixed. Signed-off-by: Ed Santiago <santiago@redhat.com>
* hack/bats: deal with new bin helpersEd Santiago2021-11-16
| | | | | | | | | | | | | | | | | | | | | Some time in the last month, podman started to depend on a bunch of external helper binaries: rootlessport, pause, catatonit. System tests fail without these. Update the hack/bats script to pass $CONTAINERS_HELPER_BINARIES_DIR (set to ./bin); podman will then use locally-built helpers. (This requires https://github.com/containers/common/pull/823 , which as of this PR is not yet vendored into podman. There is no harm in merging this while we wait.) Also: if bats helper is invoked as root, run only once; i.e., skip the "rootless" step. Also (piggybacked): the name of the podman pause image has changed, from pause to podman-pause. Adjust that in our teardown so we don't leave droppings. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #12100 from rhatdan/envOpenShift Merge Robot2021-11-16
|\ | | | | Add option --unsetenv to remove default environment variables
| * Add --unsetenv & --unsetenv-all to remove def environment variablesDaniel J Walsh2021-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Podman adds a few environment variables by default, and currently there is no way to get rid of them from your container. This option will allow you to specify which defaults you don't want. --unsetenv-all will remove all default environment variables. Default environment variables can come from podman builtin, containers.conf or from the container image. Fixes: https://github.com/containers/podman/issues/11836 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #12285 from nalind/journal-follow-not-earlyOpenShift Merge Robot2021-11-15
|\ \ | |/ |/| journald logs: keep reading until the journal's end
| * journald logs: keep reading until the journal's endNalin Dahyabhai2021-11-15
| | | | | | | | | | | | | | | | | | | | | | When reading logs from the journal, keep going after the container exits, in case it gets restarted. Events logged to the journal via the normal paths don't include CONTAINER_ID_FULL, so don't bother adding it to the "history" event we use to force at least one entry for the container to show up in the log. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* | Merge pull request #12130 from rhatdan/journalOpenShift Merge Robot2021-11-15
|\ \ | |/ |/| Error logs --follow if events-backend != journald, event-logger=journald
| * Error logs --follow if events-backend != journald, event-logger=journaldDaniel J Walsh2021-11-13
| | | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/11255 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #12297 from edsantiago/no_remote_unshareOpenShift Merge Robot2021-11-15
|\ \ | | | | | | Network test: fix podman-remote-rootless corner case
| * | Network test: fix podman-remote-rootless corner caseEd Santiago2021-11-15
| |/ | | | | | | | | | | | | | | Followup to #12229, in which I added a podman unshare for flake debugging. Turns out that doesn't work in podman-remote. It was not caught because CI doesn't run podman-remote rootless. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #11076 from boaz0/closes_10275OpenShift Merge Robot2021-11-15
|\ \ | |/ |/| Support template unit files in podman generate systemd
| * change from run to create in 250-systemd.batsBoaz Shuster2021-11-09
| | | | | | | | Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
| * Use systemctl in local system testBoaz Shuster2021-10-29
| | | | | | | | Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
| * Support template unit files in podman generate systemdBoaz Shuster2021-10-22
| | | | | | | | Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.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 #12240 from umohnani8/tableOpenShift Merge Robot2021-11-10
|\ \ | | | | | | Print headers for system connection ls
| * | Print headers for system connection lsUrvashi Mohnani2021-11-10
| | | | | | | | | | | | | | | | | | | | | Print out the headers even if the system connection list is empty to match the behavior of other list commands. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* | | network reload without ports should not reload portsPaul Holzinger2021-11-10
|/ / | | | | | | | | | | | | | | | | When run as rootless the podman network reload command tries to reload the rootlessport ports because the childIP could have changed. However if the containers has no ports we should skip this instead of printing a warning. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #12255 from vrothberg/fix-11970OpenShift Merge Robot2021-11-10
|\ \ | | | | | | podman load: support downloading files
| * | podman load: support downloading filesValentin Rothberg2021-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support downloading files, for instance via `podman load -i server.com/image.tar`. The specified URL is downloaded in the frontend and stored as a temp file that gets passed down to the backend. Also vendor in c/common@main to use the new `pkg/download`. Fixes: #11970 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | pod create: read infra image from containers.confValentin Rothberg2021-11-10
|/ / | | | | | | | | | | | | | | | | Fix a bug where pods would be created with the hard-coded default infra image instead of the custom one from containers.conf. Add a simple regression test. Fixes: #12245 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #12227 from Luap99/net-setupOpenShift Merge Robot2021-11-09
|\ \ | | | | | | Fix rootless networking with userns and ports
| * | Fix rootless networking with userns and portsPaul Holzinger2021-11-09
| | | | | | | | | | | | | | | | | | | | | | | | A rootless container created with a custom userns and forwarded ports did not work. I refactored the network setup to make the setup logic more clear. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Minor test tweaksEd Santiago2021-11-08
|/ / | | | | | | | | | | | | | | | | | | - remove 'NO TESTS NEEDED' as a valid bypass string. Henceforth only 'NO NEW TESTS NEEDED' will work. - add a debugging aid for #11871, in which bodhi tests time out in nslookup. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #11953 from markusthoemmes/help-defaultOpenShift Merge Robot2021-11-08
|\ \ | | | | | | Display help text on empty subcommand by default
| * | Keep error semantics intactMarkus Thömmes2021-11-05
| | | | | | | | | | | | Signed-off-by: Markus Thömmes <markusthoemmes@me.com>
| * | Adjust tests to verify all subcommands show the help messageMarkus Thömmes2021-10-14
| | | | | | | | | | | | Signed-off-by: Markus Thömmes <markusthoemmes@me.com>
* | | system: Adds support for removing all named destination via --allAditya Rajan2021-11-08
| | | | | | | | | | | | | | | | | | | | | | | | Adds support of dropping all named destination from system connections via `--all`. Closes: https://github.com/containers/podman/issues/12018 Signed-off-by: Aditya Rajan <arajan@redhat.com>
* | | Merge pull request #12158 from edsantiago/more_batsOpenShift Merge Robot2021-11-02
|\ \ \ | | | | | | | | System tests: enhance volume test, add debug prints
| * | | System tests: enhance volume test, add debug printsEd Santiago2021-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Volume test: add a sequence of stat()s to confirm that volumes are mounted as a different device than root. Network test: add debugging code for #11825 (dnsmasq inotify failure in bodhi only). Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | Merge pull request #12118 from hshiina/log-f-journaldOpenShift Merge Robot2021-11-02
|\ \ \ \ | |/ / / |/| | | Set flags to test 'logs -f' with journald driver
| * | | Set flags to test 'logs -f' with journald driverHironori Shiina2021-10-27
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | `logs -f` with `journald` is supported only when `journald` events backend is used. To pass system tests using `logs -f` in an environment where `events_logger` is not set to `journald` in `containers.conf`, this fix sets `--events-backend` or `--log-driver` temporally. Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
* | | volumes: be more tolerant and fix infinite loopValentin Rothberg2021-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make Podman more tolerant when parsing image volumes during container creation and further fix an infinite loop when checking them. Consider `VOLUME ['/etc/foo', '/etc/bar']` in a Containerfile. While it looks correct to the human eye, the single quotes are wrong and yield the two volumes to be `[/etc/foo,` and `/etc/bar]` in Podman and Docker. When running the container, it'll create a directory `bar]` in `/etc` and a directory `[` in `/` with two subdirectories `etc/foo,`. This behavior is surprising to me but how Docker behaves. We may improve on that in the future. Note that the correct way to syntax for volumes in a Containerfile is `VOLUME /A /B /C` or `VOLUME ["/A", "/B", "/C"]`; single quotes are not supported. This change restores this behavior without breaking container creation or ending up in an infinite loop. BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2014149 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | pod create: remove need for pause imageValentin Rothberg2021-10-26
|/ / | | | | | | | | | | | | | | | | So far, the infra containers of pods required pulling down an image rendering pods not usable in disconnected environments. Instead, build an image locally which uses local pause binary. Fixes: #10354 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #12028 from edsantiago/test_system_connectionOpenShift Merge Robot2021-10-21
|\ \ | | | | | | Add test for system connection
| * | Add test for system connectionEd Santiago2021-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First a basic (connectionless) one to make sure we 'add', 'ls', and 'rm' work; then an actual one with a service; then (if ssh to localhost is set up and works) test ssh Requires a little trickery to work around the CI definition of $PODMAN, which includes "--url /path/to/sock", which overrides podman's detection of whether to use a connection or not. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | System tests: confirm that -a and -l clashEd Santiago2021-10-20
| | | | | | | | | | | | | | | | | | ...and fix one instance where there was no check Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #12041 from edsantiago/container_envOpenShift Merge Robot2021-10-20
|\ \ \ | | | | | | | | system tests: CONTAINER_* and --help: cleanup
| * | | system tests: CONTAINER_* and --help: cleanupEd Santiago2021-10-19
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A small part of this test was written in a confusing and fragile way: it was very hard to understand, and in fact only worked through pure luck (using 'echo $output', which emitted everything in one long line, vs the standard quoted 'echo "$output"' which would've kept the formatting and caused the test to pass, incorrectly, no matter whether --remote was in the output or not). Plus, the '$?' check in the next line would never trigger on failure anyway, so the failure message would've been unhelpful if the test were ever to fail. Anyhow. Make it readable and make it work. (Followup to #11990) Signed-off-by: Ed Santiago <santiago@redhat.com>
* / / podman run --memory=0 ... should not set memory limitDaniel J Walsh2021-10-19
|/ / | | | | | | | | | | | | | | | | On Docker this is ignored, and it should be on Podman as well. This is documented in the man page. Fixes: https://github.com/containers/podman/issues/12002 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #11959 from rhatdan/selinuxOpenShift Merge Robot2021-10-18
|\ \ | | | | | | We should only be relabeling when on first run
| * | We should only be relabeling when on first runDaniel J Walsh2021-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | On the second runs, the labels should be the same so no need to relabel. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2013548 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | system tests: socket activation: clean upEd Santiago2021-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiarch folks are seeing flakes in this test. I can't reproduce them, but I did notice that the test isn't doing the best possible job of reporting failures nor of confirming what it purports to test. Major fix here is to check the exit status of each curl: if we see the flake again, that will help us track down the failure. Other fixes are just refactoring, cleanup, and disambiguation (using the random service name consistently) Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Move CONTAINER_HOST and _CONNECTION to IsRemote FunctionDaniel J Walsh2021-10-15
|/ / | | | | | | | | | | | | | | Current code does not check early enough. Follow up to https://github.com/containers/podman/pull/11978 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | If CONTAINER_HOST env variable is set default podman --remote=trueDaniel J Walsh2021-10-14
| | | | | | | | | | | | | | | | | | | | | | Users enabling CONTAINER_HOST==PATH is indicating to podman they intend to use remote functionality. Fixes: https://github.com/containers/podman/issues/11196 Update man pages to document all of the environment variables. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | codespell codeDaniel J Walsh2021-10-12
| | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Remove a volume with --force if container is runningDaniel J Walsh2021-10-11
|/ | | | | | | | Currently we are not passing the force flag down to the removal of the running container. If the container is running, and we set --force when removing the volume, the container should be stopped. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #11869 from jwhonce/wip/pprofOpenShift Merge Robot2021-10-10
|\ | | | | Enable /debug/pprof API service endpoints