summaryrefslogtreecommitdiff
path: root/test/system
Commit message (Collapse)AuthorAge
* Don't explicitly check for crun|runc in package informationDavid Gibson2022-01-21
| | | | | | | | | | | | Amongst other things 005-info.bats tests that the host.ociRuntime.package field in the output from "podman info" reports something containing "crun" or "runc". While those are obviously the dominant runtimes in practice, it seems undesirable to explicitly exclude them in testing. So, remove this specific test. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* System tests: fix for new systemd on rawhideEd Santiago2022-01-20
| | | | | | | | systemd 250 on f36 has changed the output format of a message our tests rely on. This breaks bodhi gating tests. Fix test so it accepts a continually-growing set of systemd outputs. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #12797 from edsantiago/test_image_scp_sudoOpenShift Merge Robot2022-01-18
|\ | | | | Tests for podman image scp (the sudo form)
| * CI: rootless user: also create in some root testsEd Santiago2022-01-17
| | | | | | | | | | | | | | | | | | | | | | | | viz, rootful system tests. The rootless account will be used by image-scp tests. Unfortunately, having ssh available means the system-connection tests will start running, which is very bad because they will fail, because system connection doesn't actually work (long story). Add a few more checks to prevent this test from running. Signed-off-by: Ed Santiago <santiago@redhat.com>
| * [WIP] Tests for podman image scp (the sudo form)Ed Santiago2022-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start inching our way back to having tests for the sudo form of podman image scp. Basically, copy an image to another user and then back, using a pseudorandom name. Confirm that the image makes it to the remote end, and that when we copy it back, the original image digest is preserved. When scp'ing as root, we identify the destination rootless user account via the $PODMAN_ROOTLESS_USER envariable. Setting this and creating the account is left as an exercise for the CI framework (be it github, or Fedora/CentOS/RHEL gating, or other). Also: amend hack/bats to set and relay $PODMAN_ROOTLESS_USER, so developers can test locally. Also: remove what I'm 99% sure is a debugging printf. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Revamp Libpod state strings for Docker compatMatthew Heon2022-01-17
|/ | | | | | | | | | | | | | | | | | | | | | | | Improve our compatibility with Docker by better handling the state strings that we print in `podman ps`. Docker capitalizes all states in `ps` (we do not) - fix this in our PS code. Also, stop normalizing ContainerStateConfigured to the "Created" state, and instead make it always be Created, with the existing Created state becoming Initialized. I didn't rename the actual states because I'm somewhat reticent to make such a large change a day before we leave for break. It's somewhat confusing that ContainerStateConfigured now returns Created, but internally and externally we're still consistent. [NO NEW TESTS NEEDED] existing tests should catch anything that broke. I also consider this a breaking change. I will flag appropriately on Github. Fixes RHBZ#2010432 and RHBZ#2032561 Signed-off-by: Matthew Heon <mheon@redhat.com>
* fix default branch linksErik Sjölund2022-01-15
| | | | | | | | | | | | | * Replace https://github.com/containers/podman/blob/master with https://github.com/containers/podman/blob/main to match the new default branch "main". Previously the default branch was "master". This is the only occurence found in the code. * Replace https://raw.githubusercontent.com/containers/libpod/master with https://raw.githubusercontent.com/containers/podman/main Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
* test/system: podman run update /etc/hostsDaniel J Walsh2022-01-14
| | | | | | | This test case is used for covering rhbz#1902979. Signed-off-by: Alex Jia <ajia@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* podman container rm: remove podValentin Rothberg2022-01-13
| | | | | | | | Support removing the entire pod when --depend is used on an infra container. --all now implies --depend to properly support removing all containers and not error out when hitting infra containers. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* use events_logfile_path from containers.conf for events log.Daniel J Walsh2022-01-13
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* libpod: fix check for systemd sessionGiuseppe Scrivano2022-01-12
| | | | | | | | | | move the check after the cgroup manager is set, so to correctly detect --cgroup-manager=cgroupfs and do not raise a warning about dbus not being present. Closes: https://github.com/containers/podman/issues/12802 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Add --noout option to prevent the output of idsDaniel J Walsh2022-01-12
| | | | | | Fixes: https://github.com/containers/podman/issues/11515 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Fix permission on secrets directoryDaniel J Walsh2022-01-11
| | | | | | | | | This directory needs to be world searchable so users can access it from different user namespaces. Fixes: https://github.com/containers/podman/issues/12779 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Add podman rm --dependDaniel J Walsh2022-01-11
| | | | | | | | | | | This option causes Podman to not only remove the specified containers but all of the containers that depend on the specified containers. Fixes: https://github.com/containers/podman/issues/10360 Also ran codespell on the code Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #12780 from rhatdan/podOpenShift Merge Robot2022-01-11
|\ | | | | Use the InfraImage defined in containers.conf
| * Use the InfraImage defined in containers.confDaniel J Walsh2022-01-10
| | | | | | | | | | | | | | | | | | Remove hard code use of the DefaultInfraImage and rely on getting this from containers.conf. Fixes: https://github.com/containers/podman/issues/12771 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | System tests: fix RHEL8 gating testsEd Santiago2022-01-10
|/ | | | | | | | | | Add a fix for RHEL8 gating tests. This resolves yet another journald/file events/logger mismatch bug. Also, while I'm at it, more log cleanup: a recently-added test was missing final rm/rmi, resulting in big red scary output in test logs. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #12733 from rhatdan/copyOpenShift Merge Robot2022-01-07
|\ | | | | Set volume NeedsCopyUp to false iff data was copied up
| * Set volume NeedsCopyUp to false iff data was copied upDaniel J Walsh2022-01-06
| | | | | | | | | | | | | | | | | | | | | | | | Currently Docker copies up the first volume on a mountpoint with data. Fixes: https://github.com/containers/podman/issues/12714 Also added NeedsCopyUP, NeedsChown and MountCount to the podman volume inspect code. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Emergency system-test fixesEd Santiago2022-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emergency fix to image-scp tests. DO NOT CREATE A USER! These tests are run in all sorts of environments. We do not have the right to vandalize a production system. Also remove some misleading unneeded tests; and refactor a little; and add a bunch of FIXMEs which will need to be addressed later. Also, super-low priority, add 'crun: ' to expected error message in a run test (minor followup to #12758). Signed-off-by: Ed Santiago <santiago@redhat.com>
* | add OCI Runtime name to errorsDaniel J Walsh2022-01-06
|/ | | | | | | | | It would be easier to diagnose OCI runtime errors if the error actually had the name of the OCI runtime that produced the error. [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #12687 from rhatdan/volumeOpenShift Merge Robot2022-01-06
|\ | | | | Support volume bind mounts for rootless containers
| * Support all volume mounts for rootless containersDaniel J Walsh2022-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix handling of "bind" and "tmpfs" olumes to actually work. Allow bind, tmpfs local volumes to work in rootless mode. Also removed the string "error" from all error messages that begine with it. All Podman commands are printed with Error:, so this causes an ugly stutter. Fixes: https://github.com/containers/podman/issues/12013 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #12750 from rhatdan/errorOpenShift Merge Robot2022-01-05
|\ \ | | | | | | Change Tests to ignore missing containers when removing --all
| * | Change Tests to ignore missing containers when removing --allDaniel J Walsh2022-01-05
| |/ | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/12740 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #12429 from cdoern/scpOpenShift Merge Robot2022-01-05
|\ \ | |/ |/| podman image scp never enter podman user NS
| * podman image scp never enter podman user NScdoern2021-12-23
| | | | | | | | | | | | | | | | | | | | | | Podman image scp should never enter the Podman UserNS unless it needs to. This allows for a sudo exec.Command to transfer images to and from rootful storage. If this command is run using sudo, the simple sudo podman save/load does not work, machinectl/su is necessary here. This modification allows for both rootful and rootless transfers, and an overall change of scp to be more of a wrapper function for different load and save calls as well as the ssh component Signed-off-by: cdoern <cdoern@redhat.com>
* | test/system: podman run image with filesystem permissionDaniel J Walsh2021-12-31
| | | | | | | | | | | | | | | | This test case is used for covering rhbz#1854566. Replaces: #12220 Signed-off-by: Alex Jia <ajia@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | test/system: podman run with log-opt optionDaniel J Walsh2021-12-31
| | | | | | | | | | | | | | | | This test case is used for covering rhbz#1763007. Replaces: #12221 Signed-off-by: Alex Jia <ajia@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Allow users to add host user accounts to /etc/passwdDaniel J Walsh2021-12-23
| | | | | | | | | | | | | | | | | | | | | | Some containers require certain user account(s) to exist within the container when they are run. This option will allow callers to add a bunch of passwd entries from the host to the container even if the entries are not in the local /etc/passwd file on the host. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1935831 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #12599 from rhatdan/kernelmemoryOpenShift Merge Robot2021-12-23
|\ \ | | | | | | Warn on use of --kernel-memory
| * | Warn on use of --kernel-memoryDaniel J Walsh2021-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | It has been deprecated and is no longer supported. Fully remove it and only print a warning if a user uses it. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2011695 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #12375 from rhatdan/hostsOpenShift Merge Robot2021-12-22
|\ \ \ | |/ / |/| | Use hosts public ip address in rootless containers
| * | Use hosts public ip address in rootless containersDaniel J Walsh2021-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add first non localhost ipv4 of all host interfaces as destination for host.contaners.internal for rootless containers. Fixes: https://github.com/containers/podman/issues/12000 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | support hosts without /etc/hostsValentin Rothberg2021-12-22
|/ / | | | | | | | | Fixes: #12667 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | specgen: honor userns=auto from containers.confGiuseppe Scrivano2021-12-20
| | | | | | | | | | | | | | | | | | when using the default userns value, make sure its value is parsed so that userns=auto is parsed and the options for the storage are filled. Closes: https://github.com/containers/podman/issues/12615 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | test: add --rm to podman run commandsGiuseppe Scrivano2021-12-20
| | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #12626 from vrothberg/may-the-force-be-with-removalDaniel J Walsh2021-12-19
|\ \ | | | | | | image rm: allow for force-remove infra images
| * | image rm: allow for force-remove infra imagesValentin Rothberg2021-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Force removal of images will also remove associated containers. Historically, infra containers have been excluded resulting in rather annoying errors, for instance, when running `rmi -af`. Since there is not reasons to exclude infra containers, allow for removing the entire pod when an infra image is force removed. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #12622 from flouthoc/return_exit_code_for_buildOpenShift Merge Robot2021-12-17
|\ \ \ | |/ / |/| | build: relay `exitcode` from imagebuildah to registry
| * | tests: adjust old build test to expect exit codeAditya Rajan2021-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old build tests were expecting genric error code `125` however another commit in this PR ensures that we relay exact exit code from build to registry. Hence adjusting tests Signed-off-by: Aditya Rajan <arajan@redhat.com>
* | | kill: fix outputValentin Rothberg2021-12-16
|/ / | | | | | | | | | | | | Make sure that `kill -a` is printing the IDs of killed containers. Previously, it was only printing empty lines. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #12600 from rhatdan/externalOpenShift Merge Robot2021-12-15
|\ \ | | | | | | Show --external containers even without --all option
| * | Show --external containers even without --all optionDaniel J Walsh2021-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently do not show --external containers when the user specifies it, unless they also specify the --all flag. This has led to confusion. I see no reason not to list them without the --all flag if the user specifies the option. Fixes: https://github.com/containers/podman/issues/12353 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #12534 from Luap99/network-dbOpenShift Merge Robot2021-12-15
|\ \ \ | |/ / |/| | network db rewrite
| * | play kube add support for multiple networksPaul Holzinger2021-12-14
| | | | | | | | | | | | | | | | | | Allow the same --network options for play kube as for podman run/create. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | support advanced network configuration via cliPaul Holzinger2021-12-14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the --network parse logic to support multiple networks with specific network configuration settings. --network can now be set multiple times. For bridge network mode the following options have been added: - **alias=name**: Add network-scoped alias for the container. - **ip=IPv4**: Specify a static ipv4 address for this container. - **ip=IPv6**: Specify a static ipv6 address for this container. - **mac=MAC**: Specify a static mac address address for this container. - **interface_name**: Specify a name for the created network interface inside the container. So now you can set --network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99 for the default bridge network as well as for network names. This is better than using --ip because we can set the ip per network without any confusion which network the ip address should be assigned to. The --ip, --mac-address and --network-alias options are still supported but --ip or --mac-address can only be set when only one network is set. This limitation already existed previously. The ability to specify a custom network interface name is new Fixes #11534 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* / network ls: show networks in deterministic orderPaul Holzinger2021-12-14
|/ | | | | | | | The new network backend stores the networks in a map so the returned order is not deterministic. Lets sort the network names alphabetically to ensure a deterministic order. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* --hostname should be set when using --pod new:foobarDaniel J Walsh2021-12-09
| | | | | | | | | | | | Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2030599 When you create pod, it shares the UTS namespace with Containers. Currently the --hostname is not passed to the pod created when you create a container and pod in the same command. Also fix error message on supported --share flags Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* System tests: remove rm_pause_image()Ed Santiago2021-12-09
| | | | | | | | ...it's not needed: teardown() already does it. Or, it would, if it had been updated to deal with the new pause image naming convention, which I've just done. Signed-off-by: Ed Santiago <santiago@redhat.com>