6157 Commits

Author SHA1 Message Date
35a8b03267 Merge pull request #21949 from edsantiago/more-flake-fixes
CI: try to fix more flakes
2024-03-06 14:04:06 +00:00
9c73326e12 Merge pull request #21948 from edsantiago/fix-checkpoint-race
e2e: fix potential race in file-locks test
2024-03-05 21:10:56 +00:00
39851a0b98 CI: try to fix more flakes
Most of them look like our usual "assume too much about run -d".

One of them is just an unexpected warning, a push retry. Remove
the ExitCleanly() from that test, just rely on Exit(0).

The other two have to do with podman logs, which we know can lag.
Add a short 1-second retry loop.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-03-05 12:15:22 -07:00
945995be10 e2e: fix potential race in file-locks test
Two test flakes in the past week. Looks like the usual race
between "run -d" and "assume the container is ready". I don't
know if this will resolve them, but it's still a good idea.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-03-05 07:55:06 -07:00
9ee96a9569 properly implement pull-error event status
Commit 03f6589f3 added basic support for pull-error event from libimage
but it contains several problems:
1. storing the error as error type prevents it from being unmarshalled,
   thus change it to a string
2. the error was never propagated from the libimage event to the podman
   event struct
3. the error message was not wired into the cli and API

This commit fixes these problems.

Fixes #21458

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-05 10:50:42 +01:00
155cd463da fix(deps): update module golang.org/x/tools to v0.19.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-05 06:58:51 +00:00
ebce0e71da test/e2e: check for stderr errors in cleanup()
There are many code paths which only do logrus but still exit 0 so this
should catch more bugs. Unfortunately runc logs way to much random stuff
so we ignore this check for runc right now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-04 11:25:22 +01:00
0ace66f1ae Merge pull request #21904 from containers/renovate/python-dateutil-2.x
chore(deps): update dependency python-dateutil to ~=2.9.0
2024-03-01 18:15:34 +00:00
0898b338b0 Use stop timeout of zero for system reset
when performing a system reset with containers that run somewhere where
a soft kill wont work (like sleep), containers will wait 10 seconds
before terminating with a sigkill.  But for a forceful action like
system reset, we should outright set no timeout so containers stop
quickly and are not waiting on a timeout

Fixes #21874

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-03-01 10:51:58 -06:00
542883b9ba chore(deps): update dependency python-dateutil to ~=2.9.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-01 14:45:10 +00:00
3abc488c84 Vendor in containers/(buildah, common)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 20:06:28 -05:00
38546de7b6 Merge pull request #21892 from rhatdan/codespell
[SKIP-ci] Run codespell on code
2024-03-01 00:34:01 +00:00
b736c461bb Merge pull request #21563 from mheon/test_pasta_default
Vendor c/common pasta branch for testing
2024-02-29 22:13:47 +00:00
4a03da22ad Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 16:55:31 -05:00
1519c04212 Merge pull request #21886 from containers/renovate/pytest-7.x
Update dependency pytest to v7.4.4
2024-02-29 20:45:48 +00:00
b681209efe Merge pull request #21653 from nalind/fun-with-artifacts
podman manifest add: support creating artifact manifest on the fly
2024-02-29 19:04:03 +00:00
52fd284fd4 Update dependency pytest to v7.4.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-29 18:42:48 +00:00
98a9aee2d2 Merge pull request #21601 from flobz/feature/docker_v1.44_compat
Make inspect compatible with docker v1.44 API
2024-02-29 18:42:01 +00:00
41fa1c2c5c Merge pull request #21878 from giuseppe/fix-manifest-test-assumption
test: fix manifest e2e test assumption
2024-02-29 18:22:45 +00:00
4c1c4c082a Vendor latest c/common and fix tests
This vendors the latest c/common version, including making Pasta
the default rootless network provider. That broke a number of
tests, which have been fixed as part of this PR.

Also includes a change to network stats logic, which simplifies
the code a bit and makes it actually work with Pasta.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-29 12:16:51 -05:00
c50826cea9 test: fix manifest e2e test assumption
fix an assumption in the test, that the --compression-format is
unchanged from the original image.

Instead validate that all the required architectures are part of the
manifest.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-29 18:13:37 +01:00
f168b3c115 podman manifest add: support creating artifact manifest on the fly
Add a --artifact flag to `podman manifest add` which can be used to
create an artifact manifest for one or more files and attach it to a
manifest list.  Corresponding --artifact-type, --artifact-config-type,
--artifact-config, --artifact-layer-type, --artifact-subject, and
--artifact-exclude-titles options can be used to fine-tune the fields in
the artifact manifest that don't refer to the files themselves.

Add a --index option to `podman manifest annotate` that will cause
values passed to the --annotation flag to be applied to the manifest
list as a whole instead of to an entry in the list.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-02-29 11:47:44 -05:00
66d60384f4 add --retry --retry-delay to podman run/create
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
c3c0c4ab96 Add support for podman push --retry --retry-delay
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
98d1ad5a22 Merge pull request #21875 from Luap99/mount-test
test/system: fix mount external container test
2024-02-29 14:58:09 +00:00
99b2f369db test/system: fix mount external container test
Checking for the mountdir is not relevent, a recent c/storage change[1] no
longer deletes the mount point directory so the check will cause a false
positive. findmnt exits 1 when the given path is not a mountpoint so
let's use that to check.

[1] 3f2e81abb3

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-29 13:48:26 +01:00
690b671ecd Merge pull request #20774 from giuseppe/passthrough-tty
logging: new mode -l passthrough-tty
2024-02-29 12:43:36 +00:00
c1ac602d39 Merge pull request #21868 from edsantiago/reenable-boltdb-upgrade-test
Reenable boltdb upgrade tests
2024-02-29 09:47:35 +00:00
064258b496 Reenable boltdb upgrade tests
Upgrade-from-v4.1 was temporarily disabled in #21618: we brought
in new CI VMs, and v4.1 setup no longer works. Nobody quite
understands why, and we've hit diminishing returns in the
investigation (#21863). The current thinking is that it
is related to netavark, and versions < 1.3 do not work
in the current f39 VMs. (No clue why, because f39 kernel
did not change in #21618).

Anyhow, reenable the pre-4.8 upgrade test, using v4.3.1
which has netavark-1.4.0 which seems to work fine. For now.

Also, some upgrade test cleanup:
 - Skip, not fail, if initial setup fails. Makes for less noisy logs.
 - Remove duplicate --pid=host
 - Ports: 808x -> 909x, because 8081 is used by restraint on 1mt

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-28 11:49:54 -07:00
1de94dceb5 ci: fix module not found
Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
2024-02-28 19:45:03 +01:00
facad62afe tests: fix after make podman inspect cmd return compatible with Docker API v1.44
Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
2024-02-28 19:45:03 +01:00
2cd72c272f tests: add docker api compatibility test
Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
2024-02-28 19:45:03 +01:00
950f612b56 logging: new mode -l passthrough-tty
it works in a similar way to passthrough but it allows to be used also
on a TTY.

conmon support: https://github.com/containers/conmon/pull/465

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-28 17:23:59 +01:00
5952486df8 podman network inspect: include running containers
Like docker podman network inspect should output the information of
running container with their ip/mac address on this network.
However the output format is not docker compatible as this cannot
include all the info we have and the previous output was already not
compatible so this is not new.

New example output:
```
[
     {
          ...
          "containers": {
               "7c0d295779cee4a6db7adc07a99e635909413a390eeab9f951edbc4aac406bf1": {
                    "name": "c2",
                    "interfaces": {
                         "eth0": {
                              "subnets": [
                                   {
                                        "ipnet": "10.89.0.4/24",
                                        "gateway": "10.89.0.1"
                                   },
                                   {
                                        "ipnet": "fda3:b4da:da1e:7e9d::4/64",
                                        "gateway": "fda3:b4da:da1e:7e9d::1"
                                   }
                              ],
                              "mac_address": "1a:bd:ca:ea:4b:3a"
                         }
                    }
               },
               "b17c6651ae6d9cc7d5825968e01d6b1e67f44460bb0c140bcc32bd9d436ac11d": {
                    "name": "c1",
                    "interfaces": {
                         "eth0": {
                              "subnets": [
                                   {
                                        "ipnet": "10.89.0.3/24",
                                        "gateway": "10.89.0.1"
                                   },
                                   {
                                        "ipnet": "fda3:b4da:da1e:7e9d::3/64",
                                        "gateway": "fda3:b4da:da1e:7e9d::1"
                                   }
                              ],
                              "mac_address": "f6:50:e6:22:d9:55"
                         }
                    }
               }
          }
     }
]
```

Fixes #14126
Fixes https://issues.redhat.com/browse/RHEL-3153

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-28 16:33:26 +01:00
ee52f9cd7a systests: kube play URL: workaround for ECONNREFUSED
I'm tired of this flake, it's hitting us ~once/day. Root cause
still unknown.

Workaround: add a READY file to the http server, and run 'curl'
until we get it. Tested in #17831 for the last two weeks, flake
has not been seen even once since then.

Closes: #21649

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-27 11:55:20 -07:00
3352111dd6 Merge pull request #21825 from Luap99/compose
some podman compose fixes
2024-02-27 15:11:30 +00:00
a210a4d7c2 test/compose: add test for default connection
Make sure that we use the --connection correctly with podman compose.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:44:34 +01:00
d9aff9b41e podman compose: only trim path suffix when ssh protocol
For a unix socket we should not trim this at all. The problem exists for
ssh only so make sure we only do this when a ssh URL is given.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:44:26 +01:00
7d5a68c9cd CI: e2e: use distinct ports, not just 5000
Too many tests use port 5000. Although there's a putative GetPortLock()
it seems to be unreliable, and we often get what appear to be collisions
between tests.

A proper solution would be to pseudorandomly allocate ports, verify
that they're not being reused, Sprintf() these everywhere that
needs them, and sprinkle some powdered cinnamon on top.

This is not that proper solution.

Fixes: #20655

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-27 04:30:26 -07:00
5b28a2b4a0 Fix podman stop -t -1 CID
Currently if a user specifies a negative time to stop a container the
code ends up specifying the negative time to time.Duration which treats
it as 0. By settine the default to max.Unint32 we end up with a positive
number which indicates > 68 years which is probably close enough to
infinity for our use case.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-26 16:15:10 -05:00
83671ac347 systests: enable ipv6 tests
...commented out long long ago with a now-obsolete TODO

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-26 05:49:31 -07:00
b8e0427a43 Merge pull request #21789 from Romain-Geissler-1A/ignore-docker-endpoint-config-in-non-bridge-mode
Ignore docker's end point config when the final network mode isn't bridge
2024-02-26 09:51:27 +00:00
53b5fc781f Update module golang.org/x/tools to v0.18.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-25 14:34:17 +00:00
127a8060ab Ignore docker's end point config when the final network mode isn't bridge.
Closes #21754

Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2024-02-23 21:11:25 +00:00
a19f4ef988 Merge pull request #21793 from mtrmac/allow-zstd-config
Adjust some tests to work with Zstd in containers.conf
2024-02-22 22:02:55 +00:00
3e76e594b8 Fix assumptions in 'push with --add-compression and --force-compression'
When we want the original image to be gzip, explicitly ask for that
instead of assuming the containers.conf defaults do that.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-02-22 17:13:57 +01:00
8e99c697fc Fix assumptions in 'push test --force-compression"'
When we want the original image to be gzip, explicitly ask for that
instead of assuming the containers.conf defaults do that.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-02-22 17:13:53 +01:00
8f1cebf96f cmd/podman: remove duplicated event ToHumanReadable()
ToHumanReadable() exists twice now, there is no reason for this just
call the function on the backend event type is fine as this still has to
be used there.

It also fixes a bug where the wrong event type was passed to the
template which did not match the docs and json output.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-22 12:10:57 +01:00
a3a1b44c31 libpod/events: Update event time format and add timeNano
Add new event type in cmd/podman to better match the docker format.

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-22 11:32:48 +01:00
70091d57e7 Merge pull request #21699 from vikas-goel/i21663
Comply to Kubernetes specifications for annotation size.
2024-02-21 15:00:25 +00:00