17658 Commits

Author SHA1 Message Date
6f4eafe37c Merge pull request #16992 from Luap99/log-since
several podman logs fixes
2023-01-06 12:05:34 -05:00
a7f53932a7 logformatter: nicer formatting for bats failures
add a new failblock style, with light red background all across
the entire page, and use it for bats "FAIL" blocks.

Also highlight logrus level=(debug|info|warning|error|fatal)
messages in increasingly prominent styles

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-06 08:26:37 -07:00
ee3380e6b1 logformatter: refactor verbose line-print
Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-06 08:26:37 -07:00
e82045f73c e2e tests: stop using UBI images
Red Hat registry is too unreliable. (As of this writing
in January 2023, quay.io is not much better, but this is
a new flake. Ubi has been flaking for a year or more).

Instead of UBI, use the new systemd-image added to system tests
in #16814. Since this reduces the number of cached images,
a few unrelated tests (image count) need to be tweaked.

And, sigh, Fedora systemd colorizes boot messages by default,
causing a failure where we don't see an expected Reached Target
message. I don't want to rely on ASCII formatting codes, so
I've updated the build-systemd-image script so it disables
systemd colors, and have built a new systemd-image:20230106.
Made a few small usability improvements to the script as well.

Closes: #16695

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-06 08:21:50 -07:00
609df3ec32 Merge pull request #17002 from containers/dependabot/go_modules/test/tools/golang.org/x/tools-0.5.0
Bump golang.org/x/tools from 0.4.0 to 0.5.0 in /test/tools
2023-01-06 09:40:41 -05:00
6038200fe0 k8s-file: podman logs --until --follow exit after time
When you use podman logs with --until and --follow it should exit after
the requested until time and not keep hanging forever.

This fixes the behavior for the k8s-file backend.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-06 15:19:23 +01:00
767947ab88 journald: podman logs --until --follow exit after time
When you use podman logs with --until and --follow it should exit after
the requested until time and not keep hanging forever.

To make this work I reworked the code to use the better journald event
reading code for logs as well. this correctly uses the sd_journal API
without having to compare the cursors to find the EOF.

The same problems exists for the k8s-file driver, I will fix this in the
next commit.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-06 15:19:22 +01:00
c674b3dd83 journald: seek to time when --since is used
Instead of reading the full journal which can be expensive we can seek
based on the time.

If you have a journald with many podman events just compare the time
`time podman events --since 1s --stream=false` with and without this
patch.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-06 15:19:22 +01:00
5f032256db podman logs: journald fix --since and --follow
The `containerCouldBeLogging` bool should not be false by default, when
--since is used we seek in the journal and can miss the start event so
that bool would stay false forever. This means that a running container
is not followed even when it should.

To fix this we can just set the `containerCouldBeLogging` bool based on
the current contianer state.

Fixes #16950

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-06 15:19:16 +01:00
98d95f0735 Merge pull request #17015 from eschnett/patch-1
[CI:DOCS] Preprocess files in UTF-8 mode
2023-01-05 17:20:40 -05:00
b7314bdc68 Merge pull request #16806 from jakecorrenti/podman-inspect-add-error-info
Add container error message to ContainerState
2023-01-05 16:02:42 -05:00
7826e1ced6 Preprocess files in UTF-8 mode
Some (?) Python versions assume that text files are encoded as 7-bit ASCII and abort when encountering other encoding. Some of podman's markdown documentation files are encoded as UTF-8, and this needs to be specified explicitly when opening files.

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

[NO NEW TESTS NEEDED]

Signed-off-by: Erik Schnetter <schnetter@gmail.com>
2023-01-05 14:15:44 -05:00
7f3dd309c6 Merge pull request #16989 from sstosh/fix-e2e
e2e: fix run_volume_test
2023-01-05 13:56:42 -05:00
4587e7fdb4 Bump golang.org/x/tools from 0.4.0 to 0.5.0 in /test/tools
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-05 18:54:13 +00:00
d0b0d95aa8 Merge pull request #17012 from rhatdan/VENDOR
Vendor in latest containers/(common, image, storage)
2023-01-05 13:53:22 -05:00
eea78ec7b3 Vendor in latest containers/(common, image, storage)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-05 10:40:36 -05:00
8e80c199d7 Merge pull request #16991 from rhatdan/copy
[CI:DOCS] Describe copy volume options
2023-01-05 06:26:03 -05:00
1ba94bc3ca Merge pull request #16987 from n1hility/win-arm64
Add support for Windows on ARM64
2023-01-05 05:38:28 -05:00
54afda22bf Switch to C based msi hooks for win installer
Fixes automated WSL installation on ARM

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-05 01:49:49 -06:00
b89435a820 Merge pull request #16993 from edsantiago/bats_remote
[CI:DOCS] hack/bats: various improvements
2023-01-04 22:47:43 -05:00
710eeb3403 hack/bats: improve usage message
Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-04 14:26:26 -07:00
d7ac11005c hack/bats: add --remote option
Even though we still rely on the user to start the podman
system service, enable the option anyway. It's much, much
friendlier than requiring 'env PODMAN=etc-etc'.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-04 14:04:27 -07:00
1a2e54ce65 hack/bats: fix root/rootless logic
The ROOT{,LESS}_ONLY logic is confusing and unmaintainable.
Change it to an easier-to-read positive check.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-04 14:04:27 -07:00
d0c89e90bf Describe copy volume options
Fixes: https://github.com/containers/podman/issues/16961

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-04 14:58:51 -05:00
e28184e0fe Merge pull request #16986 from rhatdan/docs
[CI:DOCS] Add shared --compress to man pages
2023-01-04 13:40:42 -05:00
49075c3813 Merge pull request #16985 from ashley-cui/attachsig
Support sig-proxy for podman-remote attach and start
2023-01-04 13:15:29 -05:00
bfdffb5b62 Support sig-proxy for podman-remote attach and start
Signals were not proxied for attach and start for podman-remote. Now
they are.

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-01-04 09:38:17 -05:00
1c8b40d097 Merge pull request #16449 from cevich/localbenchmarks
Cirrus: Collect benchmarks on machine instances
2023-01-04 07:31:09 -05:00
ff9d1c1309 Merge pull request #16978 from giuseppe/fix-race-condition-podman-rm-stopping
libpod: fix race condition rm'ing stopping containers
2023-01-04 07:14:33 -05:00
0b1e163057 Merge pull request #16981 from Luap99/format-df
system df: improve json output code
2023-01-04 04:17:56 -05:00
6886e80b45 libpod: fix race condition rm'ing stopping containers
do not allow removing containers that are in the stopping state,
otherwise it can lead to a race condition where a "podman rm" removes
the container from the storage while another process is stopping the
same container.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2155828

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-01-04 08:53:19 +01:00
fb73121c4c e2e: fix run_volume_test
When SELinux is running in enforcing mode,
this test needs to add an suffix :Z to the volume mount.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-04 15:34:37 +09:00
86965f7580 Add support for Windows ARM64
Use system call instead of GOARCH to support Windows userspace x86 emulation, as well as native arm

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-03 16:22:02 -06:00
f9e8e8cfdf Add shared --compress to man pages
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-03 16:39:41 -05:00
b2da34e57d Merge pull request #16980 from vrothberg/fix-kube
kube play: fix the error logic with --quiet
2023-01-03 14:04:04 -05:00
987aeb721a Merge pull request #16982 from edsantiago/man_page_see_also_must_be_canonical
[CI:DOCS] Man page checker: require canonical name in SEE ALSO
2023-01-03 14:02:28 -05:00
f2881afd21 Merge pull request #16926 from odra/quadlet-lint
Quadlet -dryrun arg
2023-01-03 14:00:59 -05:00
df02cb51ee Add container error message to ContainerState
This change aims to store an error message to the ContainerState struct
with the last known error from the Start, StartAndAttach, and Stop OCI
Runtime functions.

The goal was to act in accordance with Docker's behavior.

Fixes: #13729

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-01-03 13:21:24 -05:00
28d04bc524 Merge pull request #16934 from SamirPS/fix-volume
Fix: List container with volume filter
2023-01-03 12:33:19 -05:00
d92bfd244f Man page checker: require canonical name in SEE ALSO
The man-page cross-reference script checks the SEE ALSO section
to confirm that all references are to existing man pages (#12258).
However, it's a little too forgiving: it allows aliases, the
short '.so' files under the 'links/' subdirectory. That means
we could link to non-default command names, and were doing so.

As of this PR, we no longer allow that. Any podman command
referenced in SEE ALSO must be the canonical command name
(and man page). Fix existing non-canonical names, and
remove the exception so we don't allow this again.

See #16848 for discussion of context.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-03 10:24:55 -07:00
2a16e04843 system df: improve json output code
The current code modifies a global variable which works but is bad
design since it could be uses elsewhere. Since we just exit after the df
command this is not an issue right now but it could become one in the
future.

A better fix is to implement a custom `MarshalJSON()` method on the
struct which will be called if this struct will be marshaled.

[NO NEW TESTS NEEDED]
Fixes some changes from 24b1e81c5d76, the test should from there should
still pass.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-03 18:12:06 +01:00
03c7f47aa8 kube play: fix the error logic with --quiet
Fix a bug where kube play would print format errors such as
`Error: %!s(<nil>)`.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-03 17:39:03 +01:00
9f0a37cd47 System tests: quadlet network test
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-01-03 17:25:58 +02:00
2dcf6b1b18 Merge pull request #16572 from mohanboddu/issue_templates
Update the issue templates
2023-01-03 10:25:40 -05:00
a4edd0d310 Merge pull request #16971 from ygalblum/quadlet-network-depend
Quadlet Network - Fix the name of the required network service
2023-01-03 10:17:25 -05:00
66ec8aa5d4 Merge pull request #16962 from jakecorrenti/update-pids-limit
Fixed `podman update --pids-limit`
2023-01-03 10:14:52 -05:00
e479644177 Fix: List container with volume filter
Modify the condition in line 149 in order to list container by mounting
point.
Closes #16019

Signed-off-by: SamirPS <akariohsamir@yahoo.com>
2023-01-03 15:56:29 +01:00
2dd9e0859c Merge pull request #16947 from ygalblum/kube-service-container-logdriver
Kube Play: use passthrough as the default log-driver if service-container is set
2023-01-03 09:28:00 -05:00
535d4d4779 Merge pull request #16887 from cdoern/subpath
Add support for hostPath and configMap subpath usage
2023-01-03 09:05:11 -05:00
74e8654681 Merge pull request #16953 from ygalblum/quadlet-container-env
Quadlet Container: Add support for EnvironmentFile and EnvironmentHost
2023-01-03 09:02:22 -05:00