18761 Commits

Author SHA1 Message Date
1bff0108f6 logformatter: anchors: link to test summary, not name
Super-complicated and ugly code merely to make in-page anchors
link three lines above the subtest name, to the subtest status
and timing line.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-02 11:27:40 +02:00
914ff01f94 WIP: logformatter: handle ginkgo v2 logs
Checkpoint as of Thursday April 13 afternoon.

Please do not merge with this; the .t file (tests) needs to
be updated, and there are probably many more fixes/improvements
I still need to make.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-02 11:27:39 +02:00
b3424f3708 test/e2e: unshare --rootless-netns cleanup slirp4netns
podman unshare --rootless-netns leaks the namespace and slirp4netns by
design as there is no safe way to remove it without any races.

To trigger a cleanup we can spin up a container and it will
automaticallt teardown the netns for us.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:39 +02:00
054154c77d test/e2e: run system reset test serial
USe the new ginkgo `Serial` decorator to make sure system reset is
never executed in parallel. system reset stops teh rootless pause
process which causes major issues when other process in parallel still
use this old namesapce.

Fixes #17903

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:39 +02:00
c5922cc6f0 test/e2e: fix CleanupVolume/Secrets()
Just like Cleanup() they should check the error codes.
While doing this it was clear that some volume tests were calling
Cleanup() twice so remove this.

Instead make sure they call Cleanup() themselves so callers only need to
do one call. This is required because we cannot use Expect().To() before
doing all the cleanup. An error causes panic does results in an early
return thus missing potentially important cleanup.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:39 +02:00
bc1ed07b56 ginkgo v2: fix new Skip() behavior
It looks like AfterEach() is now executed even after Skip(), this is a
good idea because the fact that it did't before caused us to leak tmp
directories. However in case Skip() is called before the podmanTest is
initialized it will no result in a panic. To fix it simply prevent such
panic by checking the pointer against nil and do nothing in such case.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:39 +02:00
cd46e72795 test/e2e: fix pause tests to unpause before cleanup()
The Cleanup() function tries to stop all containers, a paused contianer
cannot be stopped. The tests should make sure it works.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:38 +02:00
2ce4e935be ginkgo v2: drop localbenchmarks
Porting them over to v2 requires a full rewrite.
IT is not clear who actually uses these benchmarks, Valentin who wrote
them originally is in favor of removing them. He recommends to use
script from hack/perf instead.

This commit also drop the CI integration, it is not clear who actually
uses this data. If it is needed for something please speak up.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:38 +02:00
fb7a96638c test/e2e: switch to GinkgoWriter
Directly writing to stdout/err is not safe when run in parallel.
Ginkgo v2 fixed this buffering the output and syncing the output so it
is not mangled between tests.

This means we should use the GinkgoWriter everywhere to make sure the
output stays in sync.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:38 +02:00
cc19091e91 test/e2e: unset CONTAINERS_CONF before Cleanup()
If we do not unset CONTAINERS_CONF before tests that create a invlid
config will cause the Cleanup to fail.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:37 +02:00
8cc7a36183 ginkgo: run on all cores
Using -p autodetect the number of cores and thus spins up workers as
needed, this should help speeding up e2e tests, especially locally.

Also -vv for mor everbose logging.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:37 +02:00
9c1f713c75 test/e2e: fix Cleanup()
Only check exit codes last, othwerwise in case of errors it will return
early and miss other commands.
Also explicitly stop before rm, rm is not working in all cases (#18180).

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:37 +02:00
9bd833bcfd test/e2e: fix "podman run ipcns ipcmk container test"
The test will leak processes because the rm -fa in the cleanup failed.
This happens because podman tried to remove the contianers in the wrong
order and thus ppodman failed with:
`contianer XXX has dependent containers which must be removed before it`

For now I patch the test but it should be much better if we can fix it
in podman to remove in the correct order. `--all` should mean all I do
not care if there is a dependent container, just get rid of it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:37 +02:00
629a6a6e45 test/e2e: actually check for cleanup errors
We blindy trust these commands to work but as it turns out they do not
under certain circumstances.

The "podman run ipcns ipcmk container test" can be used to fail this
reliably, if a container has dependencies the order of rm --all may
cause it to fail because the contianers are deleted in the wrong order.
This is th eonly one I found so far, adding this will uncover many more
of such problems without proper cleanup we leak processes and ginkgo v2
will block because of them.

Of course this cannot be merged without fixing these issues.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:36 +02:00
b9ba850440 Lower e2e timeout to not waste time when it hangs
Ginkgo v2 can result in the test just hanging at the end if there is
some bug which is leaking processes. The tests never take 90 mins
anyway. Just lower that time to 50 mins max. Usually they take between
30-40 mins so we should be fine with 50 mins.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:36 +02:00
fbb7c980aa test/e2e: containers.conf tests add missing Wait()
It is not clear why but without the wait is seems like the podman
process just hangs forever which now causes ginkgo to block until it
exits.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:36 +02:00
c564d9d7af ginkgo v2: remove CurrentGinkgoTestDescription()
This function is deprecated and replaced with CurrentSpecReport().
Also fix inconsitent callers.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:36 +02:00
666e314478 ginkgo v2: remove deprecated flags
- switch long flags to use `--`
- move the renamed flages noColor, flakeAttempts, outputdir
- remove no longer needed flag -progress

also see https://onsi.github.io/ginkgo/MIGRATING_TO_V2

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:35 +02:00
445815036f update to ginkgo v2
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:35 +02:00
3f5f906903 Merge pull request #18376 from Luap99/swagger-info
[CI:DOCS] swagger: fix Info name conflict
2023-05-02 04:39:58 -04:00
1c9d0330c5 Merge pull request #18395 from flouthoc/manifest-push-merge-dest
manifest, push: use `source` as `destination` if not specified
2023-05-02 04:17:22 -04:00
6e34fdb4b5 Merge pull request #18403 from edsantiago/login_logout_flakes
e2e: login_logout: use unique authfile for each test
2023-05-01 16:00:39 -04:00
7b25f362e6 e2e: login_logout: use unique authfile for each test
Set REGISTRY_AUTH_FILE to unique path for each subtest. This
should eliminate collisions where one test runs "podman logout"
just after another does "podman login".

Also, add a test to confirm that the authfile gets written
as expected.

Also, add actual tests for expected error messages, instead
of just ExitWithError()

Fixes: #18397

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-01 11:52:12 -06:00
a9a3b81ac2 Merge pull request #18388 from ashley-cui/uid
Fix clashing subuid
2023-05-01 13:51:54 -04:00
cd9a95922f Merge pull request #18359 from Luap99/machine-connection
machine: qemu only remove connection after confirmation
2023-05-01 13:07:56 -04:00
d06480d99e Fix clashing subuid
When initing a podman machine, we match core's UID to the UID of the user on the host. If the UID is in the subUID range, the machine throws an error. Check if the UID is within the default range for /etc/subuid (10000:1000000), and if it is, we adjust the range to not include it.

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-05-01 10:39:54 -04:00
cda2b6e7ea Merge pull request #18379 from giuseppe/small-fixes
some small fixes
2023-05-01 10:36:34 -04:00
22047c6321 Merge pull request #18377 from containers/dependabot/go_modules/github.com/docker/docker-23.0.5incompatible
build(deps): bump github.com/docker/docker from 23.0.4+incompatible to 23.0.5+incompatible
2023-05-01 10:33:38 -04:00
4dec42c6d8 Merge pull request #18396 from containers/renovate/github.com-moby-term-digest
Update github.com/moby/term digest to 0564e01
2023-05-01 10:01:06 -04:00
adf9fd445d Merge pull request #18381 from cevich/test_name_generator
Add name-generation test
2023-05-01 08:38:18 -04:00
f11ba8dc8c Merge pull request #17639 from arixmkii/provider-choice
Implement machine provider selection
2023-05-01 08:00:45 -04:00
bab4217cd1 manifest, push: use source as destination if not specified
`manifest push <source>` must work as-is if `source` is actually a valid
path and no destination is provided, `podman` must internally choose
`source` as its `destination` just like `podman push`

See: https://github.com/containers/podman/blob/main/cmd/podman/images/push.go#L161
Closes: https://github.com/containers/podman/issues/18360

Signed-off-by: Aditya R <arajan@redhat.com>
2023-05-01 17:04:11 +05:30
202701e653 Update github.com/moby/term digest to 0564e01
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-01 09:44:21 +00:00
0429b6816b Merge pull request #18361 from edsantiago/push_test_cleanup
e2e cleanup: push with auth: add error checks
2023-04-30 07:18:16 -04:00
e8f34e4579 Add name-generation test
Podman's container-name generation depends on the global RNG state being
properly initialized (seeded).  Should this not happen for some reason
(or it's seeded with a static value), podman will generate the exact
same repeating sequence of container names (assuming no clashes with
existing containers).  Add a test to confirm this is always the case.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-04-28 16:30:01 -04:00
b5ef9555ab Implement machine provider selection
GetSystemDefaultProvider reworked to fetch provider value from
the config file.

Additional environment variable CONTAINERS_MACHINE_PROVIDER is
supported to override the config for testing purposes.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2023-04-28 17:47:10 +03:00
70870895b7 libpod: improve errors management in cleanupStorage
fix some issues with the handling of errors, we print an error only
when there is already one set to be returned.  Also the first error is
not printed, since it is reported back to the caller of the function.

Improve some messages with more context that can be helpful when
things go wrong.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-28 11:51:06 +02:00
5592dc12f9 libpod: report unmount idmapped rootfs errors
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-28 11:46:34 +02:00
2932208c2a test: do not wait 10 seconds before killing myyaml
the "run_podman rm -a -f" cleanup would take a long time since myyaml
doesn't exit immediately.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-27 22:07:56 +02:00
891bc117e4 podman: simplify code with a switch
simplify the readerFromArg to avoid the same boilerplate code.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-27 22:07:56 +02:00
bac57409fe test: fix typo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-27 22:07:56 +02:00
19152fa349 Merge pull request #18326 from cevich/f38_update
Cirrus: Update CI VM Image to F38
2023-04-27 12:42:56 -04:00
0146183a57 Merge pull request #18343 from edsantiago/stop-it
e2e: remove "-it" from podman run & exec
2023-04-27 11:56:38 -04:00
bff563210b Merge pull request #18374 from edsantiago/delete_nightly_treadmill
Nightly dependency treadmill: remove
2023-04-27 11:01:07 -04:00
5fefb54d2b build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.4+incompatible to 23.0.5+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v23.0.4...v23.0.5)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-27 13:54:52 +00:00
b7b3a19768 Merge pull request #18365 from nalind/copypasta
Fix a copy/paste error in an error message
2023-04-27 09:36:29 -04:00
129c075669 Merge pull request #18363 from leo8a/patch-1
Update short description for disconnect cmd
2023-04-27 09:33:53 -04:00
0a92b399df swagger: fix Info name conflict
go swagger has a flat namespace so it doesn't handle name conflicts at
all. The libpod info response uses the Info struct from some docker dep
instead. Because we cannot change the docker dependency simply rename
the Info struct, but only via swagger comment not the go actual struct.

I verified locally that this works.

Fixes #18228

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-27 14:44:18 +02:00
20c42489e3 Nightly dependency treadmill: remove
...it never worked as intended. Cron job has been deleted.

(Note: this is not the same as the *buildah* treadmill, #13808,
which continues to be active and necessary)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-27 05:56:23 -06:00
0b51f447b8 Merge pull request #18366 from AndroidKitKat/main
[CI:DOCS] Fix simple typo in podman-network-create.md
2023-04-27 07:34:24 -04:00