18814 Commits

Author SHA1 Message Date
3d56e4f3ab fix(deps): update github.com/containers/buildah digest to e925b58
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-04 06:35:57 +00:00
b98960d1cb Merge pull request #18441 from Luap99/remote-connect-err
remote: return better connect error
2023-05-03 18:27:34 -04:00
8308a6f24f Merge pull request #18367 from rhatdan/man
[CI:DOCS]  Add missing man page links for Docker man pages
2023-05-03 16:28:56 -04:00
e40c920b01 Merge pull request #18440 from edsantiago/egrep_deprecated
Replace egrep/fgrep with grep -E/-F
2023-05-03 12:28:21 -04:00
021b702585 Merge pull request #18437 from Luap99/exec-inspect-remote
remote: exec inspect update exec session status
2023-05-03 12:25:50 -04:00
df8cc7af33 remote: return better connect error
We have a spacial logic to create a better user error that hints at
podman machine, however because we string matched it missed the case of
the ssh connection.

Stop doing string comparison and return a proper error and match it with
errors.As()

[NO NEW TESTS NEEDED]

see https://github.com/containers/podman/discussions/18426

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-03 18:19:58 +02:00
b638341bcb Merge pull request #18393 from containers/renovate/github.com-digitalocean-go-qemu-digest
fix(deps): update github.com/digitalocean/go-qemu digest to f035778
2023-05-03 10:28:11 -04:00
61985a6104 Add missing man page links for Docker man pages
Generate all docker man pages to match podman man pages
including links.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-05-03 10:26:30 -04:00
cf29dad400 Merge pull request #18402 from baude/applehvpass1
MVP for Podman Machine with AppleHV
2023-05-03 10:17:51 -04:00
f877d7dcd0 Replace egrep/fgrep with grep -E/-F
There are days when I really, really, really hate GNU. Remember
when someone decided that 'head -1' would no longer work, and
that it was OK to break an infinite number of legacy production
scripts? Someone now decided that egrep/fgrep are deprecated,
and our CI logs (especially pr-should-include-tests) are now
filled with hundreds of warning lines, making it difficult
to find actual errors.

I expect that those warnings will be removed quickly after
furious community backlash, just like the 'head -1' fiasco
was quietly reverted, but ITM the warnings are annoying
so I capitulate.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-03 07:32:42 -06:00
19aabf440e remote: exec inspect update exec session status
The remote API will wait 300s by default before conmon will call the
cleanup. In the meantime when you inspect an exec session started with
ExecStart() (so not attached) and it did exit we do not know that. If
a caller inspects it they think it is still running. To prevent this we
should sync the session based on the exec pid and update the state
accordingly.

For a reproducer see the test in this commit or the issue.

Fixes #18424

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-03 14:54:00 +02:00
f149d49335 Merge pull request #18394 from containers/renovate/github.com-godbus-dbus-v5-digest
fix(deps): update github.com/godbus/dbus/v5 digest to 6cc540d
2023-05-03 08:17:44 -04:00
1502e2258c Merge pull request #18433 from containers/renovate/github.com-containers-buildah-digest
fix(deps): update github.com/containers/buildah digest to f353690
2023-05-03 07:16:05 -04:00
a4e37ad659 Merge pull request #18354 from Luap99/reset
system reset: show graphRoot/runRoot before removal
2023-05-03 05:26:01 -04:00
0d9b5f6f6e Merge pull request #18429 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.9.3
2023-05-03 05:20:02 -04:00
ac61657504 Merge pull request #18418 from containers/renovate/github.com-moby-term-0.x
fix(deps): update module github.com/moby/term to v0.5.0
2023-05-03 05:17:02 -04:00
305bad1846 fix(deps): update github.com/digitalocean/go-qemu digest to f035778
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-03 09:16:54 +00:00
999c620d5a fix(deps): update github.com/godbus/dbus/v5 digest to 6cc540d
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-03 09:15:18 +00:00
38f9935432 fix(deps): update github.com/containers/buildah digest to f353690
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-03 08:13:50 +00:00
04c45cebcd Merge pull request #18411 from flouthoc/bindings-fix-invalid-platform
bindings, build: don't pass invalid platform in case of none
2023-05-03 04:12:02 -04:00
1b2b0d0315 fix(deps): update module github.com/onsi/ginkgo/v2 to v2.9.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-03 05:35:43 +00:00
0851d6475d Merge pull request #18345 from vrothberg/fix-18092
api: fix parsing filters
2023-05-02 17:09:53 -04:00
09c11a8d95 Merge pull request #17627 from umohnani8/pod-restart
Add --restart flag to pod create
2023-05-02 16:46:52 -04:00
6577e3f297 Merge pull request #18409 from Luap99/e2e-cni
test/e2e: do not remove CNI directory
2023-05-02 15:29:54 -04:00
31a5573cd1 Merge pull request #18422 from edsantiago/ginkgo_try_json
e2e tests: try writing & preserving ginkgo json artifacts
2023-05-02 14:45:47 -04:00
dc7515dc32 MVP for Podman Machine with AppleHV
this pr is the first pass at enabling podman machine to use the apple hypervisor. there are still several TODO
areas like host networking.  once the decision is handled on what host networking should look like, these TODOs
should be fairly quick to resolve.  they also will impact the remove methods.

you must also have vfkit (https://github.com/crc-org/vfkit)

Signed-off-by: Brent Baude <bbaude@redhat.com>

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-05-02 13:09:56 -05:00
434f4a2e57 Merge pull request #18420 from edsantiago/rollback_logformatter_stream
Revert "logformatter: anchors: link to test summary, not name"
2023-05-02 13:52:58 -04:00
54fd0d752e e2e tests: try writing & preserving ginkgo json artifacts
ginkgo v2 has new options, --junit-report and --json-report.
The JUNIT one is utterly worthless: no timing data, no
separation between test output (podman commands) and
ginkgo output (filenames, linenumbers). JSON goes the
other direction, super-complicated, but I think I can
work with it. Let's try it.

This PR does not actually _do_ anything with the json; all
we do is save it. Over time, I'll download and play with it
and see what I can do with it.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-02 10:57:39 -06:00
1c5ab9e7bf vendor: bump buildah to v1.30.1-0.20230501124043-3908816d5310
Signed-off-by: Aditya R <arajan@redhat.com>
2023-05-02 21:47:01 +05:30
e1e03a0e34 bindings, build: don't pass invalid platform in case of none
In case of no `platform` , bindings should not add `platform` to
parameters at all instead it adds `/` as platform string which is
invalid.

[NO NEW TESTS NEEDED]
Exsiting test should pass with new buildah from upstream.

Closes: https://github.com/containers/buildah/issues/4768

Signed-off-by: Aditya R <arajan@redhat.com>
2023-05-02 21:46:57 +05:30
28573fa9d2 Merge pull request #18255 from edsantiago/cleanup
e2e test cleanup
2023-05-02 12:15:49 -04:00
ae5305134f Revert "logformatter: anchors: link to test summary, not name"
It looks like tell/seek don't work in CI-land: important test log
information is being lost. Revert this commit, maybe some day I'll
come up with a better solution.

This reverts commit 1bff0108f6275cc8290e649833f3a194cd6e9ee1.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-02 10:03:29 -06:00
d494af9647 Merge pull request #18414 from vrothberg/fix-17763
history: correctly set tags
2023-05-02 11:57:23 -04:00
fbe62f329a More cleanup: volumes: do not export to stdout
This one got complicated, and deserves its own commit.

Problem: ginkgo logs have a lot of NUL characters, making them
difficult for logformatter to process and for humans to read.

Cause: Paul tracked it down to "podman volume export" without "-o"
(hence spitting out tar data to stdout).

Solution: add "-o tmpfile" to named podman-volume-export. In
the process, fix all sorts of other problems with that test.
And, since the e2e test no longer tests "volume export" by
itself, add a system test that does.

It is possible that there are other places that emit NULs.
One step at a time.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-02 08:36:26 -06:00
3050a64373 e2e test cleanup
- fix a typo that was resulting in a test being a NOP, and
   add actual testing to it.

 - fix two Expects() with incorrectly-ordered actual/expects

 - remove leading whitespace from an It() test name

 - To(BeTrue()) is evil. Wherever possible, replace it with
   useful string or field checks. When not possible, use
   the annotation field to indicate what failed. I got
   carried away here, #sorrynotsorry

 - remove unused system-test code

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-02 08:36:26 -06:00
fa1ba17bc1 Update kube gen & play to use pod restart policy
Podman kube generate now uses the pod's restart policy
when generating the kube yaml. If generating from containers
only, use the restart policy of the first non-init container.
Podman kube play applies the pod restart policy from the yaml
file to the pod. The containers within a pod inherit this restart
policy.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-05-02 10:30:07 -04:00
db4ad54f92 Add {{.Restarts}} to podman pod ps
Add Restarts column to the podman pod ps output to show the total number
of times the containers in a pod were restarted. This is the same as the
restarts column displayed by kubernetes with kubectl get pods. This will
only be displayed when --format={{.Restarts}}.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-05-02 10:30:07 -04:00
0fef113a4b Add {{.Restarts}} to podman ps
Add Restarts column to the podman ps output to show how many times a
container was restarted based on its restart policy. This column will be
displayed when --format={{.Restarts}}.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-05-02 10:30:07 -04:00
edbeee5238 Add --restart flag to pod create
Add --restart flag to pod create to allow users to set the
restart policy for the pod, which applies to all the containers
in the pod. This reuses the restart policy already there for
containers and has the same restart policy options.
Add "never" to the restart policy options to match k8s syntax.
It is a synonym for "no" and does the exact same thing where the
containers are not restarted once exited.
Only the containers that have exited will be restarted based on the
restart policy, running containers will not be restarted when an exited
container is restarted in the same pod (same as is done in k8s).

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-05-02 10:29:58 -04:00
f173db755d Merge pull request #18163 from Luap99/ginkgo-v2
update to ginkgo v2
2023-05-02 10:29:41 -04:00
9e9bcec9ec history: correctly set tags
Requires vendoring fixes from c/common and to update the transformation
code.  Also add a test to avoid future regressions.

Fixes: #17763
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-05-02 16:21:09 +02:00
073cd4bb47 fix(deps): update module github.com/moby/term to v0.5.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-02 13:51:31 +00:00
3858a833bf Makefile: do not run machine test in parallel
while reworking ginkgo to use -p by default we also forced the machine
tests to be run in parallel. Right now this does not work at all
(something that should be fixed).

Using -p is easier becuase that will let ginkgo decide how many parallel
nodes to use so it much faster on high core counts.

So use some makefile magic to instaed of using `GINKGONODES` use
`GINKGO_PARALLEL` and set it to `y` by default. The machine tests will
then use that var to disable it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 12:30:18 +02:00
5af4339237 pkg/machine/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 is the same as for the podman integration tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 12:07:42 +02:00
1720042d04 api: fix parsing filters
Podman and Docker clients split the filter map slightly different, so
account for that when parsing the filters in the image-listing endpoint.

Fixes: #18092
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-05-02 11:45:36 +02:00
c4b9f4b34e ginkgo-v2 cleanup workaround for #18180
Add a workaround for #18180 so the ginkgo work can be merged without
being blocked by the issue. Please revert this commit when the issue
is fixed.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:40 +02:00
5eb99a0ac8 test/e2e: fix custom timing reporting
This never worked when ginkgo runs with more than one thread, we use 3
in CI. The problem is that the SynchronizedAfterSuite() function accepts
two functions. The first one is run for each ginkgo node while the
second one is only run once for the whole suite.

Because the timings are stored as slice thus in memory we loose all
timings from the other nodes as they were only reported on node 1.
Moving the printing in the first function solves this but causes the
problem that the result is now no longer sorted. To fix this we let
each node write the result to a tmp file and only then let the final
after suite function collect the timings from all these files, then
sort them and print the output like we did before.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-02 11:27:40 +02:00
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