Commit Graph

5133 Commits

Author SHA1 Message Date
OpenShift Merge Robot 0a8113be7b
Merge pull request #18323 from edsantiago/container_exit_signaling
system tests: safer container-stop signaling
2023-04-25 05:07:29 -04:00
Ed Santiago ae5ed6d851 e2e create same-IP: try to fix flake
Our friend #7096 is still not fixed: it continues to flake,
singletons only, and only in the "create" test (not "run").

My guess: maybe there's a race somewhere in IP assignment,
such that container1 can have an IP, but not yet be running,
and a container2 can sneak in and start with that IP, and
container1 is the one that fails?

Solution: tighten the logic so we wait for container1 to
truly be running before we start container2. And, when we
start container2, do so with -a so we get to see stdout.
(Am not expecting it to be helpful, but who knows).

Also very minor cleanup

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-24 14:09:52 -06:00
openshift-ci[bot] 3ecb174eee
Merge pull request #18320 from Luap99/ps-state
ps: --format {{.State}} match docker output
2023-04-24 19:56:32 +00:00
Ed Santiago faeed14f61 system tests: safer container-stop signaling
Having a container spin-wait on a /stop file, then exit, is
unsafe: 'podman exec $ctr touch /stop' can get sucked into
container cleanup before the exec terminates, resulting in
the podman-exec failing and hence the test failing.

Most existing instances of this pattern are unnecessary.
Replace those with just 'podman rm -f'.

When necessary, use a variety of safer alternatives.

Re-Closes: #10825 (already closed; this addresses remaining cases)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-24 11:35:49 -06:00
Paul Holzinger c5a928c5b7
ps: --format {{.State}} match docker output
We should return the raw state string without any extra formatting in
this case.
`{{.Status}}` returns the nicely formatted string used in the default ps
output, e.g. `Up 2 seconds ago`, while `{{.State}}` returns the state as
string, e.g. `running`.

This matches the docker output and allows better use in scripts.

Fixes #18244

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-24 14:18:26 +02:00
Valentin Rothberg b4eecd908a test/system/260-sdnotify.bats: fix test flake
The `exec` session somestimes exits with 137 as the exec session races
with the cleanup process of the exiting container.  Fix the flake by
running a detached exec session.

Fixes: #10825
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-24 14:09:09 +02:00
openshift-ci[bot] e9c13354eb
Merge pull request #18276 from sstosh/e2e-journald
e2e: skip journald test if journald is unavailable
2023-04-21 11:05:20 +00:00
openshift-ci[bot] 1821f97ade
Merge pull request #18284 from vrothberg/fix-18216
support `--digestfile` for remote push
2023-04-21 10:24:15 +00:00
Valentin Rothberg 1f1525f2e1 support `--digestfile` for remote push
Wire in support for writing the digest of the pushed image to a
user-specified file.  Requires some massaging of _internal_ APIs
and the extension of the push endpoint to integrate the raw manifest
(i.e., in bytes) in the stream.

Closes: #18216
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-21 10:28:40 +02:00
Toshiki Sonoda d640461ced e2e: skip journald test if journald is unavailable
If journald is unavailable, journald logging driver tests
should be skipped.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-04-21 11:16:18 +09:00
openshift-ci[bot] 69ec2d6ae6
Merge pull request #18213 from rbagd/main
Fixes format inconsistencies with docker for certain history fields
2023-04-20 23:13:21 +00:00
openshift-ci[bot] f21388c51d
Merge pull request #18291 from containers/renovate/setuptools-67.x
chore(deps): update dependency setuptools to ~=67.7.0
2023-04-20 23:08:27 +00:00
Matt Heon 147f1987fc
Merge pull request #18283 from Luap99/e2e-fixes
Several e2e fixes
2023-04-20 15:05:21 -04:00
openshift-ci[bot] 9a750045ea
Merge pull request #18212 from rhatdan/docker
Specify format to buildah before commit
2023-04-20 17:12:29 +00:00
Ed Santiago 252959879b
Merge pull request #18281 from Luap99/e2e-network-prune
test/e2e: use custom network config v2
2023-04-20 10:15:06 -06:00
renovate[bot] 77f86f48ef
chore(deps): update dependency setuptools to ~=67.7.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-20 15:40:33 +00:00
Paul Holzinger 15664b4b02
test/e2e: correctly reap service process
When running the remote integration test I have over 1000 zombies
because each test creates a single service process. Only after ginkgo
exists they get finally reaped by the init process. This only effected
the rootless runs.

For some reason the test use different logic between root and rootless.
This doesn't make much sense. I also see no reason to manually kill
child processes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 16:26:56 +02:00
Paul Holzinger c9d8610239
test/e2e: add missing options to remote service
This is a rather big deal. All system services shared the same tmpdir
which causes big issues for the rootless netns setup.
Also use --events-backend file like the local ones. This is important
otherwise reading events and takes ages as the jounal is shared for all
tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 16:26:55 +02:00
Paul Holzinger 1f45c715df
test/e2e: fix incorrect usage of CreateTempDirInTempDir()
Creating a new diretory results in the test leaking it when it is not
removed via a defer call. All tests have already access to
`podmanTest.TempDir` which will be automatically removed in the
`AfterEach()` block.

While some test were fine other forgot the defer call. To keep the test
consitent and prevent other from making the same mistake convert all
users to `podmanTest.TempDir`. `CreateTempDirInTempDir()` is only used
for the `podmanTest.Setup()` call.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 16:26:55 +02:00
Paul Holzinger 601d228cae
test/e2e: "podman-remote send correct path to copier" do not leak file
Remove the file from the cwd after the test.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 16:26:55 +02:00
Paul Holzinger 08c651016f
test/e2e: fix network create flake due same subnet
Some network test use the same subnet as others, because the network
config direcory is shared we must ensure subnets do not conflict as
tests are run in parallel. I see this locally when running with 12
threads.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 16:26:55 +02:00
Paul Holzinger 525c27fe1d
test/e2e: fix SkipIfNotActive()
If a unit is not active the exit code from systemctl is 3. Thus this
test always failed because it checked the error.

Fix this by checking the exit code and remove the unnecessary output
parsing.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 16:26:55 +02:00
Paul Holzinger 01d518a975
test/e2e: do not try to use docker as rootless
Running these locally always created a popup to ask me for my password
as I am in the wheel group.
I would also argue that such a test should not be run on any local
system ever even as root. First docker could be a symlink to podman so
the check if the image is there would fail. Second starting the docker
deamon in a podman test suite just feels very unexpected.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 16:26:55 +02:00
Paul Holzinger 6e97976ad4
test/e2e: do not leak "hello" file
Because the test mounts the current dir it does not need to create a new
file in it. Just check if the current test file is there should fulfill
the same purpose.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 16:26:54 +02:00
Paul Holzinger 08d6b7b27e
Merge pull request #18282 from Luap99/remote-logs-fix
podman-remote logs: handle server error correctly
2023-04-20 16:25:52 +02:00
OpenShift Merge Robot 653261aa2c
Merge pull request #18278 from vrothberg/fix/compat-image-remove-noprune
compat: Translate `noprune` into ImageRemoveOptions.NoPrune
2023-04-20 09:30:57 -04:00
Paul Holzinger 750442d093
podman-remote logs: handle server error correctly
If the server responds with an error we must report it correct back to
the user.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 14:11:03 +02:00
Paul Holzinger 3aaa2793da
test/e2e: use custom network config v2
Adds two custom config dirs to tests that were missed in
commit dc9a65e348.

Fixes #17946 (hopefully finally)

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 13:34:47 +02:00
OpenShift Merge Robot 85d383bb35
Merge pull request #18277 from giuseppe/fix-race-test-rm-cgroup
test: fix race when listing cgroups
2023-04-20 07:03:41 -04:00
Daniel J Walsh 81621ce8af
Specify format to buildah before commit
If user specifies commit --format, we were not setting it before
commit, this caused warning messages that made no sense to be
printed that made no sense.

Fixes: https://github.com/containers/podman/issues/17773

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-20 06:24:35 -04:00
Giuseppe Scrivano 0364aef1e0
test: fix race when listing cgroups
A cgroup could have been deleted by the time WalkDir is trying to
access it.  Ignore the error and continue.

Closes: https://github.com/containers/podman/issues/17989

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-20 11:21:10 +02:00
Andreas Kohn b65ab52d8d compat: Translate `noprune` into ImageRemoveOptions.NoPrune
PR #15093 implemented support for NoPrune in the ImageRemoveOptions,
this PR simply brings that also to the compat API along with
regression tests.

Signed-off-by: Andreas Kohn <andreas.kohn@gmail.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-20 11:11:19 +02:00
Ed Santiago a089f1b5c3 e2e networking test: better way to get host IP
uber/jaeger-client-go library is deprecated. Remove it.

Only place it's used is in one e2e test, a test that is flaking
in a way that suggests that the HostIP() weighting heuristic from
that module was not actually getting the best outgoing IP address.
So, switch to using what seems to be the current best practice.
No need to make it reusable, since it's only used in one place.

Oh, also remove undesired "-dt" from two "podman run"s. In one
it's harmless, in the other it would cause a test failure under
some circumstances.

Closes: #18269   (optimistic, aren't I?)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-19 13:35:32 -06:00
rbagd bce38c1afb Updated system test to be easier to read
Following @edsantiago guidance,

* Additional explanations for each step of the test
* Timezone for tests normalized to UTC
* Smarter choice of separator and use of shell substring extraction

Signed-off-by: rbagd <mail@rbagd.eu>
2023-04-19 21:10:40 +02:00
OpenShift Merge Robot 190fb30dd1
Merge pull request #18166 from containers/renovate/setuptools-67.x
chore(deps): update dependency setuptools to v67
2023-04-19 11:10:57 -04:00
OpenShift Merge Robot 339344c50e
Merge pull request #18198 from vrothberg/fix-18153
fix remote start --filter
2023-04-19 05:19:06 -04:00
OpenShift Merge Robot 8de9014ff5
Merge pull request #18246 from sstosh/fix-quadlet-test
e2e: quadlet uses PODMAN env for podman binary path
2023-04-19 04:48:56 -04:00
renovate[bot] 8125bab9b8
chore(deps): update dependency setuptools to v67
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-19 08:46:21 +00:00
Toshiki Sonoda da83364eb0 e2e: quadlet uses PODMAN env for podman binary path
Adapts to pass the test even if
podman binary path is not `/usr/local/bin/podman`.

[NO NEW TESTS NEEDED]

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-04-19 16:17:57 +09:00
rbagd 6e0cf93447 Fixes format inconsistencies with docker for certain history fields
Closes #17767
Closes #17768

System test for image list and history dates

* Changed field separator in the test to `;` for easier parsing
* Converted date output from image history and image list to be comparable

Signed-off-by: rbagd <mail@rbagd.eu>
2023-04-19 00:20:47 +02:00
Valentin Rothberg 41d5164125 fix remote start --filter
Fix a number of bugs wrt. filtering remote containers and how to
process specified names or IDs.  I _really_ do not like the duplication
between remote and local Podman but want to focus on fixing #18153
for now.

What I desire in the future is to consolidate all functionality of
looking up containers (all, latest, filters, specified names/IDs, etc.)
and for remote clients to just call containers/list etc.

Fixes: #18153
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-17 15:11:40 +02:00
Jakob Ahrer a0204f1dd0
Add missing security options to /info response
Signed-off-by: Jakob Ahrer <jakob@ahrer.dev>
2023-04-16 18:27:16 +02:00
OpenShift Merge Robot 2b78157935
Merge pull request #18136 from rhatdan/docker
Return title fields as a list
2023-04-13 15:32:43 -04:00
Chris Evich 54ba17f691
Remove disused test/install
Fixes: https://github.com/containers/podman/pull/18175

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-04-13 12:29:05 -04:00
Daniel J Walsh 1fa4e45a95
Return title fields as a list
Podman is attempting to split the headers returned by the ps
command into a list of headers. Problem is that some headers
are multi-word, and headers are not guaranteed to be split via
a tab. This PR splits the headers bases on white space, and for
the select group of CAPS headers which are multi-word, combines
them back together.

Fixes: https://github.com/containers/podman/issues/17524

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-13 11:45:40 -04:00
OpenShift Merge Robot 66498483c1
Merge pull request #18170 from containers/renovate/registry.centos.org-centos-centos-8.x
chore(deps): update registry.centos.org/centos/centos docker tag to v8
2023-04-13 09:38:52 -04:00
OpenShift Merge Robot 2d16f43d4a
Merge pull request #18169 from edsantiago/systest_kubero_flake
system tests: fix race in kube-play read-only
2023-04-13 09:36:02 -04:00
OpenShift Merge Robot 5e6c0647c0
Merge pull request #18171 from edsantiago/instrument_copyhardlinks
system tests: address COPY-hardlink flake
2023-04-13 05:10:13 -04:00
Ygal Blum 4aced7e3eb Quadlet - do not set log-driver by default
Update e2e tests not to expect the flag
System tests - explicitly set the log driver to be able to parse the output

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-04-13 09:14:40 +03:00
Ed Santiago 51b582d0ea system tests: address COPY-hardlink flake
Possible cause: on Debian, maybe because of fuse-overlayfs(??),
we sometimes see unexpected inode numbers.

This PR tightens the test logic, so it runs one 'stat' command
in only one podman invocation, then cross-checks multiple lines
of output. I don't know if this will really fix the flake, but
even if it doesn't, it will at least give us much more useful
diagnostic output than before.

And, as long as I'm in here, clean up test, remove duplication,
make error messages distinct (hence more useful), and comment.

Fixes: #17979

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-12 14:58:20 -06:00