Commit graph

13078 commits

Author SHA1 Message Date
Ed Santiago
e906e9cd37
[CI:DOCS] logformatter: handle python logs
We've got some python tests running in CI, and they're really hard
to troubleshoot. This PR:

  1) colorizes python unittest lines (ok / skipped / fail), and
  2) links to source files

The color is nice for skimming, but it's the linking that might
make it much easier to diagnose future failures.

(Context: failure today in test/python/docker/compat/test_images.py)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-02-18 12:00:15 -05:00
Brent Baude
2fd1ff9d1e
Changes of docker descriptions
It looks like some descriptions have changed on the docker registry
where we had been searching for images that include 'alpine'.  We are
now seeing an image in the initial list that has 'alpine' in its
description.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-02-18 11:52:02 -05:00
Brent Baude
ce5359f54c
Fix images since/after tests
For the since and after imagve filter tests, instead of using the
read-only cache of images, we just use the empty r/w store.  We then
build three images that are strictly predictable.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-02-18 11:51:46 -05:00
OpenShift Merge Robot
a54320a793
Merge pull request #13020 from zeha/12975-fix-12327
Makefile: fix darwin detection
2022-01-26 17:12:17 +01:00
Chris Hofstaedtler
daeade5421 Makefile: fix darwin detection
NATIVE_GOOS does not exist in the 3.4 branch, only on main.
Fixes my backport #12327. Verified to fix #12975 (again) for me.

Signed-off-by: Chris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
2022-01-26 14:16:31 +01:00
OpenShift Merge Robot
63134a1ef8
Merge pull request #12831 from edsantiago/emergency_buildah_skips
[v3.4] buildah bud tests: skip failing tests
2022-01-12 20:30:19 +01:00
Ed Santiago
1e875c8518 buildah bud tests: skip failing tests
[backport of #12818]

Emergency workaround for github's deprecation of git://

   https://github.blog/2021-09-01-improving-git-protocol-security-github/

Two buildah tests rely on 'git://' URLs. These now fail. They
have been fixed in the buildah repo[1] but it will take time
to vendor that in. ITM, we need to get CI passing. Skip those
two failing tests.

 [1] https://github.com/containers/buildah/pull/3701

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-01-12 10:33:07 -07:00
OpenShift Merge Robot
3f57b6e018
Merge pull request #12795 from edsantiago/rhel8_gating_fix
[v3.4] System tests: fix RHEL8 gating tests
2022-01-10 23:57:08 +01:00
Ed Santiago
e5ecce1da7 System tests: fix RHEL8 gating tests
Add a fix for RHEL8 gating tests. This resolves yet another
journald/file events/logger mismatch bug.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-01-10 14:16:06 -07:00
Daniel J Walsh
17788ed058
Merge pull request #12592 from ashley-cui/backports
[3.4] Backport podman machine ls
2021-12-16 16:17:38 -05:00
Anders F Björklund
2b2ea4da59 Record the image stream along with the path
[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-15 09:19:30 -05:00
Anders F Björklund
789345791e Not all fields in machine list were set properly
When using custom output formats like table, some of the booleans
introduced for json format were not initialized correctly (wrong).

[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-15 09:19:06 -05:00
Anders F Björklund
d00ae6a947 Add completion for machine list format
[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-15 09:18:38 -05:00
Anders F Björklund
8f7d17dc48 Add JSON version of the machine list
[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-15 09:18:07 -05:00
OpenShift Merge Robot
b8fde5c5b2
Merge pull request #12549 from mheon/bump_344
Bump to v3.4.4
2021-12-08 20:02:19 +00:00
Matthew Heon
d46a82d218 Bump to v3.4.5-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-12-08 13:41:37 -05:00
Matthew Heon
f6526ada10 Bump to v3.4.4
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-12-08 13:41:11 -05:00
Matthew Heon
c6989d06d3 Update release notes for v3.4.4
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-12-08 13:40:44 -05:00
Aditya Rajan
e30588a685 specgen: honor empty args for entrypoint
Users should be able to override containers entrypoint using
`--entrypoint ""` following works fine for podman but not for podman
remote.

Specgen ignores empty argument for entrypoint so make specgen honor
empty arguments.

Signed-off-by: Aditya Rajan <arajan@redhat.com>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-12-08 13:39:10 -05:00
Aditya Rajan
db9caa74b7 volume: apply exact permission of target directory without adding extra 0111
While trying to match permissions of target directory podman adds
extra `0111` which should not be needed if target path does not have
execute permission.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-08 13:34:55 -05:00
OpenShift Merge Robot
2d7c4beffc
Merge pull request #12546 from edsantiago/fix_failing_tests
[3.4] Fix failing tests
2021-12-08 16:26:20 +00:00
Valentin Rothberg
921e9ecbb3 fix remote run/start flake
Fix the flake reported in #9597 with a workaround to at least stop
wasting energy until the root cause has been found and fixed.

It seems that a remote run returns before the container has transitioned
into the `exited` state which ultimately breaks a subsequent remote
start with attach.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-08 07:54:18 -07:00
Ed Santiago
9bf0271e6d Disable stty system test
It's failing pretty reliably now, so much so that gating tests
will be unlikely to pass.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-12-08 07:52:57 -07:00
OpenShift Merge Robot
7472aa112a
Merge pull request #12540 from edsantiago/backport_movetocgroup
[v3.4] backport: utils: reintroduce moveToCgroup
2021-12-08 14:38:17 +00:00
Giuseppe Scrivano
2ddd2b76b6 utils: reintroduce moveToCgroup
commit ee62711136 introduced the
regression.

It was mistakenly removed as part of a cleanup, but this code is
needed by another code path, where we move conmon for the exec session
to the same cgroup used by conmon for the process.

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

[NO NEW TESTS NEEDED] it fixes a regression in the CI

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-08 04:54:49 -07:00
OpenShift Merge Robot
49f589d7c3
Merge pull request #12525 from mheon/bump_343
Backports for and bump to v3.4.3
2021-12-06 23:43:25 +00:00
Matthew Heon
014bbdb40a Add library bumps to release notes
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-12-06 16:00:44 -05:00
Matthew Heon
50bc223a2c Bump to v3.4.4-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-12-06 15:55:43 -05:00
Matthew Heon
3450a60d21 Bump to v3.4.3
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-12-06 15:54:55 -05:00
Matthew Heon
b93e3369ad Final release notes for v3.2.3
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-12-06 15:54:30 -05:00
Jason T. Greene
a21c5d184e Escape trailing slash in install directory location so the closing quote is not escaped
Fixes #11416 [NO NEW TESTS NEEDED]

Signed-off-by: Jason Greene <jason.greene@redhat.com>
2021-12-06 15:52:40 -05:00
Miloslav Trmač
0657204161 Improve documentation of (podman image save --format)
- Don't pointlessly repeat the names
- Improve documentation of the formats
- Use a table, per MANPAGE_SYNTAX.md

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-12-06 15:50:53 -05:00
Miloslav Trmač
7dbe5508bb Ensure the generated NodePort values are unique
... at least within a single service.

[NO NEW TESTS NEEDED]
because testing RNGs is problematic. (We _could_
probably inject a mock RNG implementation that always
returns the same value, or something like that.)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-12-06 15:48:51 -05:00
Miloslav Trmač
bb1293133d Allow containerPortsToServicePorts to fail
Add an error return to it and affected callers.

Should not affect behavior, the function can't currently fail.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-12-06 15:48:44 -05:00
Miloslav Trmač
25e5e8f89e Don't use the global math/rand RNG for service ports
Use a private RNG with the desired seed, don't interfere
with the other uses.

Introducing the servicePortState type is rather overkill
for the single member, but we'll add another one immediately.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-12-06 15:48:38 -05:00
Miloslav Trmač
d2602039e7 Move a comment to the relevant place
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-12-06 15:48:31 -05:00
Valentin Rothberg
d952763884 compat: images/json
Do not list manifest lists.  Docker doesn't either.

Fixes: #12453
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-06 15:47:04 -05:00
Shion Tanaka
658d133390 Fixed the containerfile not found during remote build.
[NO NEW TESTS NEEDED]

Signed-off-by: Shion Tanaka <shtanaka@redhat.com>
2021-12-06 15:44:14 -05:00
Giuseppe Scrivano
aa9799b81f container, cgroup: detect pid termination
If the /proc/$PID/cgroup file doesn't exist, then it is likely the
container was terminated in the meanwhile so report ErrCtrStopped that
is already handled instead of ENOENT.

commit a66f40b4df introduced the regression.

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

[NO NEW TESTS NEEDED] it solves a race in the CI that is difficult to reproduce.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-06 15:39:38 -05:00
Valentin Rothberg
39318f1779 top: parse ps(1) args correctly
The arguments of ps(1) should be shlexed.

Fixes: #12452
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-06 15:38:10 -05:00
Daniel J Walsh
e1cf9d4c28 Only open save output file with WRONLY
The previous code fails on a MAC when opening /dev/stdout

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

[NO NEW TESTS NEEDED] No easy way to test this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-06 15:35:50 -05:00
Daniel J Walsh
e2d6948157 List /etc/containers/certs.d as default for --cert-path
Helps Document https://github.com/containers/podman/issues/10116

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-06 15:35:19 -05:00
Daniel J Walsh
75fc7e43e0 Move the chown to after the ADDs
I have noticed that the containers.conf file in the /home/podman
directory is owned by root and not Podman. This change fixes the
ownership.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-06 15:34:37 -05:00
Aditya Rajan
ab5ca6f759 compat: Add compatiblity with Docker/Moby API for scenarios where build fails
In order to maintain compatiblity with `moby API` we must the field
`errorDetail` which is primary error reporting field with stream.

Currently podman is using `error` which is already deprecated by moby.

Check: https://github.com/moby/moby/blob/master/pkg/jsonmessage/jsonmessage.go#L147

[NO NEW TESTS NEEDED]
We can't test this in podman CI since we dont have a docker client.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-06 15:33:29 -05:00
Matej Vasek
7b8e66de0b fix: parsing of HostConfig.Mounts for container create
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-12-06 15:32:15 -05:00
Matej Vasek
741d98fade fix: error reporting for archive endpoint
Returning 500 when copying to read-only destination.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-12-06 15:27:55 -05:00
Giuseppe Scrivano
905eabf0be libpod: improve heuristic to detect cgroup
improve the heuristic to detect the scope that was created for the container.
This is necessary with systemd running as PID 1, since it moves itself
to a different sub-cgroup, thus stats would not account for other
processes in the same container.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-12-06 15:26:18 -05:00
Giuseppe Scrivano
e3a50e7609 libpod, inspect: export cgroup path
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-06 15:25:07 -05:00
Giuseppe Scrivano
5f9f3bbea0 stats: get the memory limit from the spec
OCI runtimes may set the memory limits in different ways, e.g., crun
creates a sub-cgroup where the limits are applied, while runc applies
them directly on the created cgroup.  Since there is standardization
on the cgroup path to use, just use the limit specified in the spec
file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-06 15:25:00 -05:00
Aditya Rajan
05a5fcb45b oci: ack crun output when container is not there
`crun status ctrid` outputs `No such file or directory` when container
is not there so podman much ack it.

[NO NEW TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-06 15:20:28 -05:00